Compute Cloud Instance Groups API, gRPC: InstanceGroupService.List
- gRPC request
- ListInstanceGroupsRequest
- ListInstanceGroupsResponse
- InstanceGroup
- InstanceTemplate
- ResourcesSpec
- AttachedDiskSpec
- DiskSpec
- NetworkInterfaceSpec
- PrimaryAddressSpec
- OneToOneNatSpec
- DnsRecordSpec
- SchedulingPolicy
- NetworkSettings
- PlacementPolicy
- HostAffinityRule
- AttachedFilesystemSpec
- MetadataOptions
- ScalePolicy
- FixedScale
- AutoScale
- CpuUtilizationRule
- CustomRule
- DeployPolicy
- AllocationPolicy
- Zone
- LoadBalancerState
- ManagedInstancesState
- LoadBalancerSpec
- TargetGroupSpec
- HealthChecksSpec
- HealthCheckSpec
- TcpOptions
- HttpOptions
- Variable
- ApplicationLoadBalancerSpec
- ApplicationTargetGroupSpec
- ApplicationLoadBalancerState
- AutoHealingPolicy
- DisableZoneStatus
Retrieves the list of InstanceGroup resources in the specified folder.
gRPC request
rpc List (ListInstanceGroupsRequest) returns (ListInstanceGroupsResponse)
ListInstanceGroupsRequest
{
"folder_id": "string",
"page_size": "int64",
"page_token": "string",
"filter": "string",
"view": "InstanceGroupView"
}
|
Field |
Description |
|
folder_id |
string Required field. ID of the folder to list instance groups in. |
|
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. |
|
view |
enum InstanceGroupView Defines which information about the Instance template should be returned in the server response.
|
ListInstanceGroupsResponse
{
"instance_groups": [
{
"id": "string",
"folder_id": "string",
"created_at": "google.protobuf.Timestamp",
"name": "string",
"description": "string",
"labels": "map<string, string>",
"instance_template": {
"description": "string",
"labels": "map<string, string>",
"platform_id": "string",
"resources_spec": {
"memory": "int64",
"cores": "int64",
"core_fraction": "int64",
"gpus": "int64"
},
"metadata": "map<string, string>",
"boot_disk_spec": {
"mode": "Mode",
"device_name": "string",
"disk_spec": {
"description": "string",
"type_id": "string",
"size": "int64",
// Includes only one of the fields `image_id`, `snapshot_id`
"image_id": "string",
"snapshot_id": "string",
// end of the list of possible fields
"preserve_after_instance_delete": "bool"
},
"disk_id": "string",
"name": "string"
},
"secondary_disk_specs": [
{
"mode": "Mode",
"device_name": "string",
"disk_spec": {
"description": "string",
"type_id": "string",
"size": "int64",
// Includes only one of the fields `image_id`, `snapshot_id`
"image_id": "string",
"snapshot_id": "string",
// end of the list of possible fields
"preserve_after_instance_delete": "bool"
},
"disk_id": "string",
"name": "string"
}
],
"network_interface_specs": [
{
"network_id": "string",
"subnet_ids": [
"string"
],
"primary_v4_address_spec": {
"one_to_one_nat_spec": {
"ip_version": "IpVersion",
"address": "string",
"dns_record_specs": [
{
"fqdn": "string",
"dns_zone_id": "string",
"ttl": "int64",
"ptr": "bool"
}
]
},
"address": "string",
"dns_record_specs": [
{
"fqdn": "string",
"dns_zone_id": "string",
"ttl": "int64",
"ptr": "bool"
}
]
},
"primary_v6_address_spec": {
"one_to_one_nat_spec": {
"ip_version": "IpVersion",
"address": "string",
"dns_record_specs": [
{
"fqdn": "string",
"dns_zone_id": "string",
"ttl": "int64",
"ptr": "bool"
}
]
},
"address": "string",
"dns_record_specs": [
{
"fqdn": "string",
"dns_zone_id": "string",
"ttl": "int64",
"ptr": "bool"
}
]
},
"security_group_ids": [
"string"
]
}
],
"scheduling_policy": {
"preemptible": "bool"
},
"service_account_id": "string",
"name": "string",
"hostname": "string",
"network_settings": {
"type": "Type"
},
"placement_policy": {
"placement_group_id": "string",
"host_affinity_rules": [
{
"key": "string",
"op": "Operator",
"values": [
"string"
]
}
]
},
"filesystem_specs": [
{
"mode": "Mode",
"device_name": "string",
"filesystem_id": "string"
}
],
"reserved_instance_pool_id": "string",
"metadata_options": {
"gce_http_endpoint": "MetadataOption",
"aws_v1_http_endpoint": "MetadataOption",
"gce_http_token": "MetadataOption",
"aws_v1_http_token": "MetadataOption",
"aws_v2_http_endpoint": "MetadataOption",
"aws_v2_http_token": "MetadataOption"
}
},
"scale_policy": {
// Includes only one of the fields `fixed_scale`, `auto_scale`
"fixed_scale": {
"size": "int64"
},
"auto_scale": {
"min_zone_size": "int64",
"max_size": "int64",
"measurement_duration": "google.protobuf.Duration",
"warmup_duration": "google.protobuf.Duration",
"stabilization_duration": "google.protobuf.Duration",
"initial_size": "int64",
"cpu_utilization_rule": {
"utilization_target": "double"
},
"custom_rules": [
{
"rule_type": "RuleType",
"metric_type": "MetricType",
"metric_name": "string",
"labels": "map<string, string>",
"target": "double",
"folder_id": "string",
"service": "string"
}
],
"auto_scale_type": "AutoScaleType"
},
// end of the list of possible fields
"test_auto_scale": {
"min_zone_size": "int64",
"max_size": "int64",
"measurement_duration": "google.protobuf.Duration",
"warmup_duration": "google.protobuf.Duration",
"stabilization_duration": "google.protobuf.Duration",
"initial_size": "int64",
"cpu_utilization_rule": {
"utilization_target": "double"
},
"custom_rules": [
{
"rule_type": "RuleType",
"metric_type": "MetricType",
"metric_name": "string",
"labels": "map<string, string>",
"target": "double",
"folder_id": "string",
"service": "string"
}
],
"auto_scale_type": "AutoScaleType"
}
},
"deploy_policy": {
"max_unavailable": "int64",
"max_deleting": "int64",
"max_creating": "int64",
"max_expansion": "int64",
"startup_duration": "google.protobuf.Duration",
"strategy": "Strategy",
"minimal_action": "MinimalAction"
},
"allocation_policy": {
"zones": [
{
"zone_id": "string",
"instance_tags_pool": [
"string"
]
}
]
},
"load_balancer_state": {
"target_group_id": "string",
"status_message": "string"
},
"managed_instances_state": {
"target_size": "int64",
"running_actual_count": "int64",
"running_outdated_count": "int64",
"processing_count": "int64"
},
"load_balancer_spec": {
"target_group_spec": {
"name": "string",
"description": "string",
"labels": "map<string, string>"
},
"max_opening_traffic_duration": "google.protobuf.Duration",
"ignore_health_checks": "bool"
},
"health_checks_spec": {
"health_check_specs": [
{
"interval": "google.protobuf.Duration",
"timeout": "google.protobuf.Duration",
"unhealthy_threshold": "int64",
"healthy_threshold": "int64",
// Includes only one of the fields `tcp_options`, `http_options`
"tcp_options": {
"port": "int64"
},
"http_options": {
"port": "int64",
"path": "string"
}
// end of the list of possible fields
}
],
"max_checking_health_duration": "google.protobuf.Duration"
},
"service_account_id": "string",
"status": "Status",
"variables": [
{
"key": "string",
"value": "string"
}
],
"deletion_protection": "bool",
"application_load_balancer_spec": {
"target_group_spec": {
"name": "string",
"description": "string",
"labels": "map<string, string>"
},
"max_opening_traffic_duration": "google.protobuf.Duration",
"ignore_health_checks": "bool"
},
"application_load_balancer_state": {
"target_group_id": "string",
"status_message": "string"
},
"auto_healing_policy": {
"auto_healing_action": "AutoHealingAction"
},
"disable_zone_statuses": [
{
"zone_id": "string",
"disabled_until": "google.protobuf.Timestamp"
}
]
}
],
"next_page_token": "string"
}
|
Field |
Description |
|
instance_groups[] |
Lists instance groups for the specified folder. |
|
next_page_token |
string This token allows you to get the next page of results for list requests. If the number of results |
InstanceGroup
|
Field |
Description |
|
id |
string ID of the instance group. |
|
folder_id |
string ID of the folder that the instance group belongs to. |
|
created_at |
Creation timestamp in RFC3339 |
|
name |
string Name of the instance group. |
|
description |
string Description of the instance group. |
|
labels |
object (map<string, string>) Resource labels as |
|
instance_template |
Instance template for creating the instance group. |
|
scale_policy |
Scaling policy of the instance group. |
|
deploy_policy |
Deployment policy of the instance group. |
|
allocation_policy |
Allocation policy of the instance group by zones and regions. |
|
load_balancer_state |
Status of the Network Load Balancer target group attributed to the instance group. |
|
managed_instances_state |
States of instances for this instance group. |
|
load_balancer_spec |
Settings for balancing load between instances via Network Load Balancer |
|
health_checks_spec |
Health checking specification. For more information, see Health check. |
|
service_account_id |
string ID of the service account. The service account will be used for all API calls |
|
status |
enum Status Status of the instance group.
|
|
variables[] |
User-defined variables for instance template rendering. |
|
deletion_protection |
bool Flag prohibiting deletion of the instance group. |
|
application_load_balancer_spec |
Settings for balancing load between instances via Application Load Balancer |
|
application_load_balancer_state |
Status of the Application Load Balancer target group attributed to the instance group. |
|
auto_healing_policy |
AutoHealingPolicy policy of the instance group. |
|
disable_zone_statuses[] |
List of disabled zones for the instance group. |
InstanceTemplate
|
Field |
Description |
|
description |
string Description of the instance template. |
|
labels |
object (map<string, string>) Resource labels as |
|
platform_id |
string Required field. ID of the hardware platform configuration for the instance. |
|
resources_spec |
Required field. Computing resources of the instance such as the amount of memory and number of cores. |
|
metadata |
object (map<string, string>) The metadata |
|
boot_disk_spec |
Boot disk specification that will be attached to the instance. |
|
secondary_disk_specs[] |
Array of secondary disks that will be attached to the instance. |
|
network_interface_specs[] |
Array of network interfaces that will be attached to the instance. |
|
scheduling_policy |
Scheduling policy for the instance. |
|
service_account_id |
string Service account ID for the instance. |
|
name |
string Name of the instance. |
|
hostname |
string Host name for the instance. |
|
network_settings |
Network settings for the instance. |
|
placement_policy |
Placement Group |
|
filesystem_specs[] |
Array of filesystems to attach to the instance. |
|
reserved_instance_pool_id |
string ID of the reserved instance pool that the instance should belong to. |
|
metadata_options |
Metadata options for the instance |
ResourcesSpec
|
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. |
AttachedDiskSpec
|
Field |
Description |
|
mode |
enum Mode Required field. Access mode to the Disk resource.
|
|
device_name |
string Serial number that is reflected in the /dev/disk/by-id/ tree Value must match the regular expression |
|
disk_spec |
oneof disk_spec or disk_id |
|
disk_id |
string Set to use an existing disk. To set use variables. Value must match the regular expression |
|
name |
string When set can be later used to change DiskSpec of actual disk. |
DiskSpec
|
Field |
Description |
|
description |
string Description of the disk. |
|
type_id |
string Required field. ID of the disk type. |
|
size |
int64 Size of the disk, specified in bytes. |
|
image_id |
string ID of the image that will be used for disk creation. Includes only one of the fields |
|
snapshot_id |
string ID of the snapshot that will be used for disk creation. Includes only one of the fields |
|
preserve_after_instance_delete |
bool When set to true, disk will not be deleted even after managed instance is deleted. |
NetworkInterfaceSpec
|
Field |
Description |
|
network_id |
string ID of the network. |
|
subnet_ids[] |
string IDs of the subnets. |
|
primary_v4_address_spec |
Primary IPv4 address that is assigned to the instance for this network interface. |
|
primary_v6_address_spec |
Primary IPv6 address that is assigned to the instance for this network interface. IPv6 not available yet. |
|
security_group_ids[] |
string IDs of security groups. |
PrimaryAddressSpec
|
Field |
Description |
|
one_to_one_nat_spec |
An external IP address configuration. |
|
address |
string Optional. Manual set static internal IP. To set use variables. Value must match the regular expression |
|
dns_record_specs[] |
Internal DNS configuration |
OneToOneNatSpec
|
Field |
Description |
|
ip_version |
enum IpVersion IP version for the public IP address.
|
|
address |
string Manual set static public IP. To set use variables. (optional) Value must match the regular expression |
|
dns_record_specs[] |
External DNS configuration |
DnsRecordSpec
|
Field |
Description |
|
fqdn |
string FQDN (required) |
|
dns_zone_id |
string DNS zone id (optional, if not set, private zone used) |
|
ttl |
int64 DNS record ttl, values in 0-86400 (optional) |
|
ptr |
bool When set to true, also create PTR DNS record (optional) |
SchedulingPolicy
|
Field |
Description |
|
preemptible |
bool Preemptible instances are stopped at least once every 24 hours, and can be stopped at any time |
NetworkSettings
|
Field |
Description |
|
type |
enum Type Required field. Type of instance network.
|
PlacementPolicy
|
Field |
Description |
|
placement_group_id |
string Identifier of placement group |
|
host_affinity_rules[] |
List of affinity rules. Scheduler will attempt to allocate instances according to order of rules. |
HostAffinityRule
Affinity definition
|
Field |
Description |
|
key |
string Required field. 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 |
AttachedFilesystemSpec
|
Field |
Description |
|
mode |
enum Mode Mode of access to the filesystem that should be attached.
|
|
device_name |
string Name of the device representing the filesystem on the instance. Value must match the regular expression |
|
filesystem_id |
string ID of the filesystem that should be attached. Value must match the regular expression |
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)
|
|
aws_v2_http_endpoint |
enum MetadataOption Enabled access to AWS flavored metadata with session token (IMDSv2)
|
|
aws_v2_http_token |
enum MetadataOption Enabled access to STS credentials with AWS flavored metadata with session token (IMDSv2)
|
ScalePolicy
|
Field |
Description |
|
fixed_scale |
Manual scaling policy of the instance group. Includes only one of the fields |
|
auto_scale |
Automatic scaling policy of the instance group. Includes only one of the fields |
|
test_auto_scale |
Test spec for automatic scaling policy of the instance group. |
FixedScale
|
Field |
Description |
|
size |
int64 Number of instances in the instance group. |
AutoScale
|
Field |
Description |
|
min_zone_size |
int64 Lower limit for instance count in each zone. |
|
max_size |
int64 Upper limit for total instance count (across all zones). |
|
measurement_duration |
Time in seconds allotted for averaging metrics. |
|
warmup_duration |
The warmup time of the instance in seconds. During this time, |
|
stabilization_duration |
Minimum amount of time in seconds allotted for monitoring before |
|
initial_size |
int64 Target group size. |
|
cpu_utilization_rule |
Defines an autoscaling rule based on the average CPU utilization of the instance group. |
|
custom_rules[] |
Defines an autoscaling rule based on a custom metric from Monitoring. |
|
auto_scale_type |
enum AutoScaleType Autoscaling type.
|
CpuUtilizationRule
|
Field |
Description |
|
utilization_target |
double Target CPU utilization level. Instance Groups maintains this level for each availability zone. |
CustomRule
|
Field |
Description |
|
rule_type |
enum RuleType Required field. Custom metric rule type. This field affects which label from
|
|
metric_type |
enum MetricType Required field. Type of custom metric. This field affects how Instance Groups calculates the average metric value.
|
|
metric_name |
string Required field. Name of custom metric in Monitoring that should be used for scaling. Value must match the regular expression |
|
labels |
object (map<string, string>) Labels of custom metric in Monitoring that should be used for scaling. Each value must match the regular expression |
|
target |
double Target value for the custom metric. Instance Groups maintains this level for each availability zone. |
|
folder_id |
string Folder id of custom metric in Monitoring that should be used for scaling. |
|
service |
string Service of custom metric in Monitoring that should be used for scaling. |
DeployPolicy
|
Field |
Description |
|
max_unavailable |
int64 The maximum number of running instances that can be taken offline (i.e., stopped or deleted) at the same time |
|
max_deleting |
int64 The maximum number of instances that can be deleted at the same time. |
|
max_creating |
int64 The maximum number of instances that can be created at the same time. |
|
max_expansion |
int64 The maximum number of instances that can be temporarily allocated above the group's target size |
|
startup_duration |
Instance startup duration. |
|
strategy |
enum Strategy Affects the lifecycle of the instance during deployment.
|
|
minimal_action |
enum MinimalAction If instance update requires a less disruptive action than
|
AllocationPolicy
|
Field |
Description |
|
zones[] |
List of availability zones. |
Zone
|
Field |
Description |
|
zone_id |
string Required field. ID of the availability zone where the instance resides. |
|
instance_tags_pool[] |
string Each instance in a zone will be associated with exactly one of a tag from a pool below. |
LoadBalancerState
|
Field |
Description |
|
target_group_id |
string ID of the Network Load Balancer target group attributed to the instance group. |
|
status_message |
string Status message of the target group. |
ManagedInstancesState
|
Field |
Description |
|
target_size |
int64 Target number of instances for this instance group. |
|
running_actual_count |
int64 The number of running instances that match the current instance template. For more information, see ManagedInstance.Status.RUNNING_ACTUAL. |
|
running_outdated_count |
int64 The number of running instances that does not match the current instance template. For more information, see ManagedInstance.Status.RUNNING_OUTDATED. |
|
processing_count |
int64 The number of instances in flight (for example, updating, starting, deleting). For more information, see ManagedInstance.Status. |
LoadBalancerSpec
|
Field |
Description |
|
target_group_spec |
Required field. Specification of the target group that the instance group will be added to. For more information, see Target groups and resources. |
|
max_opening_traffic_duration |
Timeout for waiting for the VM to be checked by the load balancer. If the timeout is exceeded, |
|
ignore_health_checks |
bool Do not wait load balancer health checks. |
TargetGroupSpec
|
Field |
Description |
|
name |
string Name of the target group. Value must match the regular expression |
|
description |
string Description of the target group. |
|
labels |
object (map<string, string>) Resource labels as Each value must match the regular expression |
HealthChecksSpec
|
Field |
Description |
|
health_check_specs[] |
Health checking specification. For more information, see Health check. |
|
max_checking_health_duration |
Timeout for waiting for the VM to become healthy. If the timeout is exceeded, |
HealthCheckSpec
|
Field |
Description |
|
interval |
The interval between health checks. The default is 2 seconds. |
|
timeout |
Timeout for the managed instance to return a response for the health check. The default is 1 second. |
|
unhealthy_threshold |
int64 The number of failed health checks for the managed instance to be considered unhealthy. The default (0) is 2. |
|
healthy_threshold |
int64 The number of successful health checks required in order for the managed instance to be considered healthy. The default (0) is 2. |
|
tcp_options |
Configuration options for a TCP health check. Includes only one of the fields |
|
http_options |
Configuration options for an HTTP health check. Includes only one of the fields |
TcpOptions
|
Field |
Description |
|
port |
int64 Port to use for TCP health checks. |
HttpOptions
|
Field |
Description |
|
port |
int64 Port to use for HTTP health checks. |
|
path |
string URL path to set for health checking requests. |
Variable
|
Field |
Description |
|
key |
string Name of the variable. Value must match the regular expression |
|
value |
string Value of the variable. |
ApplicationLoadBalancerSpec
|
Field |
Description |
|
target_group_spec |
Required field. Basic properties of the Application Load Balancer target group attributed to the instance group. |
|
max_opening_traffic_duration |
Timeout for waiting for the VM to be checked by the load balancer. If the timeout is exceeded, |
|
ignore_health_checks |
bool Do not wait load balancer health checks. |
ApplicationTargetGroupSpec
|
Field |
Description |
|
name |
string Name of the target group. Value must match the regular expression |
|
description |
string Description of the target group. |
|
labels |
object (map<string, string>) Resource labels as Each value must match the regular expression |
ApplicationLoadBalancerState
|
Field |
Description |
|
target_group_id |
string ID of the Application Load Balancer target group attributed to the instance group. |
|
status_message |
string Status message of the target group. |
AutoHealingPolicy
|
Field |
Description |
|
auto_healing_action |
enum AutoHealingAction Instance Groups performs
|
DisableZoneStatus
Status of the disabled zone.
|
Field |
Description |
|
zone_id |
string ID of zone. |
|
disabled_until |
Timestamp until which the zone will be disabled. |