Compute Cloud Instance Groups API, REST: InstanceGroup.List
- HTTP request
- Query parameters
- Response
- 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.
HTTP request
GET https://compute.api.cloud.yandex.net/compute/v1/instanceGroups
Query parameters
|
Field |
Description |
|
folderId |
string Required field. ID of the folder to list instance groups in. |
|
pageSize |
string (int64) The maximum number of results per page to return. If the number of available |
|
pageToken |
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.
|
Response
HTTP Code: 200 - OK
{
"instanceGroups": [
{
"id": "string",
"folderId": "string",
"createdAt": "string",
"name": "string",
"description": "string",
"labels": "object",
"instanceTemplate": {
"description": "string",
"labels": "object",
"platformId": "string",
"resourcesSpec": {
"memory": "string",
"cores": "string",
"coreFraction": "string",
"gpus": "string"
},
"metadata": "object",
"bootDiskSpec": {
"mode": "string",
"deviceName": "string",
"diskSpec": {
"description": "string",
"typeId": "string",
"size": "string",
// Includes only one of the fields `imageId`, `snapshotId`
"imageId": "string",
"snapshotId": "string",
// end of the list of possible fields
"preserveAfterInstanceDelete": "boolean"
},
"diskId": "string",
"name": "string"
},
"secondaryDiskSpecs": [
{
"mode": "string",
"deviceName": "string",
"diskSpec": {
"description": "string",
"typeId": "string",
"size": "string",
// Includes only one of the fields `imageId`, `snapshotId`
"imageId": "string",
"snapshotId": "string",
// end of the list of possible fields
"preserveAfterInstanceDelete": "boolean"
},
"diskId": "string",
"name": "string"
}
],
"networkInterfaceSpecs": [
{
"networkId": "string",
"subnetIds": [
"string"
],
"primaryV4AddressSpec": {
"oneToOneNatSpec": {
"ipVersion": "string",
"address": "string",
"dnsRecordSpecs": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": "boolean"
}
]
},
"address": "string",
"dnsRecordSpecs": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": "boolean"
}
]
},
"primaryV6AddressSpec": {
"oneToOneNatSpec": {
"ipVersion": "string",
"address": "string",
"dnsRecordSpecs": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": "boolean"
}
]
},
"address": "string",
"dnsRecordSpecs": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": "boolean"
}
]
},
"securityGroupIds": [
"string"
]
}
],
"schedulingPolicy": {
"preemptible": "boolean"
},
"serviceAccountId": "string",
"name": "string",
"hostname": "string",
"networkSettings": {
"type": "string"
},
"placementPolicy": {
"placementGroupId": "string",
"hostAffinityRules": [
{
"key": "string",
"op": "string",
"values": [
"string"
]
}
]
},
"filesystemSpecs": [
{
"mode": "string",
"deviceName": "string",
"filesystemId": "string"
}
],
"reservedInstancePoolId": "string",
"metadataOptions": {
"gceHttpEndpoint": "string",
"awsV1HttpEndpoint": "string",
"gceHttpToken": "string",
"awsV1HttpToken": "string",
"awsV2HttpEndpoint": "string",
"awsV2HttpToken": "string"
}
},
"scalePolicy": {
// Includes only one of the fields `fixedScale`, `autoScale`
"fixedScale": {
"size": "string"
},
"autoScale": {
"minZoneSize": "string",
"maxSize": "string",
"measurementDuration": "string",
"warmupDuration": "string",
"stabilizationDuration": "string",
"initialSize": "string",
"cpuUtilizationRule": {
"utilizationTarget": "string"
},
"customRules": [
{
"ruleType": "string",
"metricType": "string",
"metricName": "string",
"labels": "object",
"target": "string",
"folderId": "string",
"service": "string"
}
],
"autoScaleType": "string"
},
// end of the list of possible fields
"testAutoScale": {
"minZoneSize": "string",
"maxSize": "string",
"measurementDuration": "string",
"warmupDuration": "string",
"stabilizationDuration": "string",
"initialSize": "string",
"cpuUtilizationRule": {
"utilizationTarget": "string"
},
"customRules": [
{
"ruleType": "string",
"metricType": "string",
"metricName": "string",
"labels": "object",
"target": "string",
"folderId": "string",
"service": "string"
}
],
"autoScaleType": "string"
}
},
"deployPolicy": {
"maxUnavailable": "string",
"maxDeleting": "string",
"maxCreating": "string",
"maxExpansion": "string",
"startupDuration": "string",
"strategy": "string",
"minimalAction": "string"
},
"allocationPolicy": {
"zones": [
{
"zoneId": "string",
"instanceTagsPool": [
"string"
]
}
]
},
"loadBalancerState": {
"targetGroupId": "string",
"statusMessage": "string"
},
"managedInstancesState": {
"targetSize": "string",
"runningActualCount": "string",
"runningOutdatedCount": "string",
"processingCount": "string"
},
"loadBalancerSpec": {
"targetGroupSpec": {
"name": "string",
"description": "string",
"labels": "object"
},
"maxOpeningTrafficDuration": "string",
"ignoreHealthChecks": "boolean"
},
"healthChecksSpec": {
"healthCheckSpecs": [
{
"interval": "string",
"timeout": "string",
"unhealthyThreshold": "string",
"healthyThreshold": "string",
// Includes only one of the fields `tcpOptions`, `httpOptions`
"tcpOptions": {
"port": "string"
},
"httpOptions": {
"port": "string",
"path": "string"
}
// end of the list of possible fields
}
],
"maxCheckingHealthDuration": "string"
},
"serviceAccountId": "string",
"status": "string",
"variables": [
{
"key": "string",
"value": "string"
}
],
"deletionProtection": "boolean",
"applicationLoadBalancerSpec": {
"targetGroupSpec": {
"name": "string",
"description": "string",
"labels": "object"
},
"maxOpeningTrafficDuration": "string",
"ignoreHealthChecks": "boolean"
},
"applicationLoadBalancerState": {
"targetGroupId": "string",
"statusMessage": "string"
},
"autoHealingPolicy": {
"autoHealingAction": "string"
},
"disableZoneStatuses": [
{
"zoneId": "string",
"disabledUntil": "string"
}
]
}
],
"nextPageToken": "string"
}
|
Field |
Description |
|
instanceGroups[] |
Lists instance groups for the specified folder. |
|
nextPageToken |
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. |
|
folderId |
string ID of the folder that the instance group belongs to. |
|
createdAt |
string (date-time) Creation timestamp in RFC3339 String in RFC3339 To work with values in this field, use the APIs described in the |
|
name |
string Name of the instance group. |
|
description |
string Description of the instance group. |
|
labels |
object (map<string, string>) Resource labels as |
|
instanceTemplate |
Instance template for creating the instance group. |
|
scalePolicy |
Scaling policy of the instance group. |
|
deployPolicy |
Deployment policy of the instance group. |
|
allocationPolicy |
Allocation policy of the instance group by zones and regions. |
|
loadBalancerState |
Status of the Network Load Balancer target group attributed to the instance group. |
|
managedInstancesState |
States of instances for this instance group. |
|
loadBalancerSpec |
Settings for balancing load between instances via Network Load Balancer |
|
healthChecksSpec |
Health checking specification. For more information, see Health check. |
|
serviceAccountId |
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. |
|
deletionProtection |
boolean Flag prohibiting deletion of the instance group. |
|
applicationLoadBalancerSpec |
Settings for balancing load between instances via Application Load Balancer |
|
applicationLoadBalancerState |
Status of the Application Load Balancer target group attributed to the instance group. |
|
autoHealingPolicy |
AutoHealingPolicy policy of the instance group. |
|
disableZoneStatuses[] |
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 |
|
platformId |
string Required field. ID of the hardware platform configuration for the instance. |
|
resourcesSpec |
Required field. Computing resources of the instance such as the amount of memory and number of cores. |
|
metadata |
object (map<string, string>) The metadata |
|
bootDiskSpec |
Boot disk specification that will be attached to the instance. |
|
secondaryDiskSpecs[] |
Array of secondary disks that will be attached to the instance. |
|
networkInterfaceSpecs[] |
Array of network interfaces that will be attached to the instance. |
|
schedulingPolicy |
Scheduling policy for the instance. |
|
serviceAccountId |
string Service account ID for the instance. |
|
name |
string Name of the instance. |
|
hostname |
string Host name for the instance. |
|
networkSettings |
Network settings for the instance. |
|
placementPolicy |
Placement Group |
|
filesystemSpecs[] |
Array of filesystems to attach to the instance. |
|
reservedInstancePoolId |
string ID of the reserved instance pool that the instance should belong to. |
|
metadataOptions |
Metadata options for the instance |
ResourcesSpec
|
Field |
Description |
|
memory |
string (int64) The amount of memory available to the instance, specified in bytes. |
|
cores |
string (int64) The number of cores available to the instance. |
|
coreFraction |
string (int64) Baseline level of CPU performance with the ability to burst performance above that baseline level. |
|
gpus |
string (int64) The number of GPUs available to the instance. |
AttachedDiskSpec
|
Field |
Description |
|
mode |
enum (Mode) Required field. Access mode to the Disk resource.
|
|
deviceName |
string Serial number that is reflected in the /dev/disk/by-id/ tree Value must match the regular expression |
|
diskSpec |
oneof disk_spec or disk_id |
|
diskId |
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. |
|
typeId |
string Required field. ID of the disk type. |
|
size |
string (int64) Size of the disk, specified in bytes. |
|
imageId |
string ID of the image that will be used for disk creation. Includes only one of the fields |
|
snapshotId |
string ID of the snapshot that will be used for disk creation. Includes only one of the fields |
|
preserveAfterInstanceDelete |
boolean When set to true, disk will not be deleted even after managed instance is deleted. |
NetworkInterfaceSpec
|
Field |
Description |
|
networkId |
string ID of the network. |
|
subnetIds[] |
string IDs of the subnets. |
|
primaryV4AddressSpec |
Primary IPv4 address that is assigned to the instance for this network interface. |
|
primaryV6AddressSpec |
Primary IPv6 address that is assigned to the instance for this network interface. IPv6 not available yet. |
|
securityGroupIds[] |
string IDs of security groups. |
PrimaryAddressSpec
|
Field |
Description |
|
oneToOneNatSpec |
An external IP address configuration. |
|
address |
string Optional. Manual set static internal IP. To set use variables. Value must match the regular expression |
|
dnsRecordSpecs[] |
Internal DNS configuration |
OneToOneNatSpec
|
Field |
Description |
|
ipVersion |
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 |
|
dnsRecordSpecs[] |
External DNS configuration |
DnsRecordSpec
|
Field |
Description |
|
fqdn |
string FQDN (required) |
|
dnsZoneId |
string DNS zone id (optional, if not set, private zone used) |
|
ttl |
string (int64) DNS record ttl, values in 0-86400 (optional) |
|
ptr |
boolean When set to true, also create PTR DNS record (optional) |
SchedulingPolicy
|
Field |
Description |
|
preemptible |
boolean 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 |
|
placementGroupId |
string Identifier of placement group |
|
hostAffinityRules[] |
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.
|
|
deviceName |
string Name of the device representing the filesystem on the instance. Value must match the regular expression |
|
filesystemId |
string ID of the filesystem that should be attached. Value must match the regular expression |
MetadataOptions
|
Field |
Description |
|
gceHttpEndpoint |
enum (MetadataOption) Enabled access to GCE flavored metadata
|
|
awsV1HttpEndpoint |
enum (MetadataOption) Enabled access to AWS flavored metadata (IMDSv1)
|
|
gceHttpToken |
enum (MetadataOption) Enabled access to IAM credentials with GCE flavored metadata
|
|
awsV1HttpToken |
enum (MetadataOption) Enabled access to IAM credentials with AWS flavored metadata (IMDSv1)
|
|
awsV2HttpEndpoint |
enum (MetadataOption) Enabled access to AWS flavored metadata with session token (IMDSv2)
|
|
awsV2HttpToken |
enum (MetadataOption) Enabled access to STS credentials with AWS flavored metadata with session token (IMDSv2)
|
ScalePolicy
|
Field |
Description |
|
fixedScale |
Manual scaling policy of the instance group. Includes only one of the fields |
|
autoScale |
Automatic scaling policy of the instance group. Includes only one of the fields |
|
testAutoScale |
Test spec for automatic scaling policy of the instance group. |
FixedScale
|
Field |
Description |
|
size |
string (int64) Number of instances in the instance group. |
AutoScale
|
Field |
Description |
|
minZoneSize |
string (int64) Lower limit for instance count in each zone. |
|
maxSize |
string (int64) Upper limit for total instance count (across all zones). |
|
measurementDuration |
string (duration) Time in seconds allotted for averaging metrics. |
|
warmupDuration |
string (duration) The warmup time of the instance in seconds. During this time, |
|
stabilizationDuration |
string (duration) Minimum amount of time in seconds allotted for monitoring before |
|
initialSize |
string (int64) Target group size. |
|
cpuUtilizationRule |
Defines an autoscaling rule based on the average CPU utilization of the instance group. |
|
customRules[] |
Defines an autoscaling rule based on a custom metric from Monitoring. |
|
autoScaleType |
enum (AutoScaleType) Autoscaling type.
|
CpuUtilizationRule
|
Field |
Description |
|
utilizationTarget |
string Target CPU utilization level. Instance Groups maintains this level for each availability zone. |
CustomRule
|
Field |
Description |
|
ruleType |
enum (RuleType) Required field. Custom metric rule type. This field affects which label from
|
|
metricType |
enum (MetricType) Required field. Type of custom metric. This field affects how Instance Groups calculates the average metric value.
|
|
metricName |
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 |
string Target value for the custom metric. Instance Groups maintains this level for each availability zone. |
|
folderId |
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 |
|
maxUnavailable |
string (int64) The maximum number of running instances that can be taken offline (i.e., stopped or deleted) at the same time |
|
maxDeleting |
string (int64) The maximum number of instances that can be deleted at the same time. |
|
maxCreating |
string (int64) The maximum number of instances that can be created at the same time. |
|
maxExpansion |
string (int64) The maximum number of instances that can be temporarily allocated above the group's target size |
|
startupDuration |
string (duration) Instance startup duration. |
|
strategy |
enum (Strategy) Affects the lifecycle of the instance during deployment.
|
|
minimalAction |
enum (MinimalAction) If instance update requires a less disruptive action than
|
AllocationPolicy
|
Field |
Description |
|
zones[] |
List of availability zones. |
Zone
|
Field |
Description |
|
zoneId |
string Required field. ID of the availability zone where the instance resides. |
|
instanceTagsPool[] |
string Each instance in a zone will be associated with exactly one of a tag from a pool below. |
LoadBalancerState
|
Field |
Description |
|
targetGroupId |
string ID of the Network Load Balancer target group attributed to the instance group. |
|
statusMessage |
string Status message of the target group. |
ManagedInstancesState
|
Field |
Description |
|
targetSize |
string (int64) Target number of instances for this instance group. |
|
runningActualCount |
string (int64) The number of running instances that match the current instance template. For more information, see ManagedInstance.Status.RUNNING_ACTUAL. |
|
runningOutdatedCount |
string (int64) The number of running instances that does not match the current instance template. For more information, see ManagedInstance.Status.RUNNING_OUTDATED. |
|
processingCount |
string (int64) The number of instances in flight (for example, updating, starting, deleting). For more information, see ManagedInstance.Status. |
LoadBalancerSpec
|
Field |
Description |
|
targetGroupSpec |
Required field. Specification of the target group that the instance group will be added to. For more information, see Target groups and resources. |
|
maxOpeningTrafficDuration |
string (duration) Timeout for waiting for the VM to be checked by the load balancer. If the timeout is exceeded, |
|
ignoreHealthChecks |
boolean 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 |
|
healthCheckSpecs[] |
Health checking specification. For more information, see Health check. |
|
maxCheckingHealthDuration |
string (duration) Timeout for waiting for the VM to become healthy. If the timeout is exceeded, |
HealthCheckSpec
|
Field |
Description |
|
interval |
string (duration) The interval between health checks. The default is 2 seconds. |
|
timeout |
string (duration) Timeout for the managed instance to return a response for the health check. The default is 1 second. |
|
unhealthyThreshold |
string (int64) The number of failed health checks for the managed instance to be considered unhealthy. The default (0) is 2. |
|
healthyThreshold |
string (int64) The number of successful health checks required in order for the managed instance to be considered healthy. The default (0) is 2. |
|
tcpOptions |
Configuration options for a TCP health check. Includes only one of the fields |
|
httpOptions |
Configuration options for an HTTP health check. Includes only one of the fields |
TcpOptions
|
Field |
Description |
|
port |
string (int64) Port to use for TCP health checks. |
HttpOptions
|
Field |
Description |
|
port |
string (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 |
|
targetGroupSpec |
Required field. Basic properties of the Application Load Balancer target group attributed to the instance group. |
|
maxOpeningTrafficDuration |
string (duration) Timeout for waiting for the VM to be checked by the load balancer. If the timeout is exceeded, |
|
ignoreHealthChecks |
boolean 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 |
|
targetGroupId |
string ID of the Application Load Balancer target group attributed to the instance group. |
|
statusMessage |
string Status message of the target group. |
AutoHealingPolicy
|
Field |
Description |
|
autoHealingAction |
enum (AutoHealingAction) Instance Groups performs
|
DisableZoneStatus
Status of the disabled zone.
|
Field |
Description |
|
zoneId |
string ID of zone. |
|
disabledUntil |
string (date-time) Timestamp until which the zone will be disabled. String in RFC3339 To work with values in this field, use the APIs described in the |