Skip to main content

ListInstances

Lists instances for the specified instance group.

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

const ListInstanceGroupInstancesRequest =
cloudApi.compute.instancegroup_instance_group_service
.ListInstanceGroupInstancesRequest;

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

const result = await client.listInstances(
ListInstanceGroupInstancesRequest.fromPartial({
instanceGroupId: "instanceGroupId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter"
})
);
console.log(result);
})();

ListInstanceGroupInstancesRequest​

instanceGroupId : string​

ID of the InstanceGroup resource to list instances for. To get the instance group ID, use a InstanceGroupService.List request.

pageSize : int64​

The maximum number of results per page to return. If the number of available results is larger than page_size, the service returns a ListInstanceGroupInstancesResponse.next_page_token that can be used to get the next page of results in subsequent list requests.

pageToken : string​

Page token. To get the next page of results, set page_token to the ListInstanceGroupInstancesResponse.next_page_token returned by a previous list request.

filter : string​

A filter expression that filters resources listed in the response. Currently you can use filtering only on the ManagedInstance.name field.

ListInstanceGroupInstancesResponse​

instances : ManagedInstance​

Lists instances for the specified instance group.

nextPageToken : string​

This token allows you to get the next page of results for list requests. If the number of results is more than ListInstanceGroupInstancesRequest.page_size, use next_page_token as the value for the ListInstanceGroupInstancesRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

ManagedInstance​

A ManagedInstance resource. For more information, see Instance Groups Concepts.

Status​
  • STATUS_UNSPECIFIED

  • CREATING_INSTANCE

    Instance is being created.

  • UPDATING_INSTANCE

    Instance is being updated.

  • DELETING_INSTANCE

    Instance is being deleted.

  • STARTING_INSTANCE

    Instance is being started.

  • STOPPING_INSTANCE

    Instance is being stopped.

  • AWAITING_STARTUP_DURATION

    Instance has been created successfully, but startup duration has not elapsed yet.

  • CHECKING_HEALTH

    Instance has been created successfully and startup duration has elapsed, but health checks have not passed yet and the managed instance is not ready to receive traffic.

  • OPENING_TRAFFIC

    Instance Groups is initiating health checks and routing traffic to the instances.

  • AWAITING_WARMUP_DURATION

    Instance is now receiving traffic, but warmup duration has not elapsed yet.

  • CLOSING_TRAFFIC

    Instance Groups has initiated the process of stopping routing traffic to the instances.

  • RUNNING_ACTUAL

    Instance is running normally and its attributes match the current InstanceTemplate.

  • RUNNING_OUTDATED

    Instance is running normally, but its attributes do not match the current InstanceTemplate. It will be updated, recreated or deleted shortly.

  • STOPPED

    Instance was stopped.

  • DELETED

    Instance was deleted.

  • PREPARING_RESOURCES

    Instance Groups is preparing dependent resources.

id : string​

ID of the managed instance.

status : Status​

Status of the managed instance.

instanceId : string​

ID of the instance.

fqdn : string​

Fully Qualified Domain Name.

name : string​

The name of the managed instance.

statusMessage : string​

Status message for the managed instance.

zoneId : string​

ID of the availability zone where the instance resides.

networkInterfaces : NetworkInterface​

Array of network interfaces that are attached to the managed instance.

statusChangedAt : google.protobuf.Timestamp​

The timestamp in RFC3339 text format when the status of the managed instance was last changed.

instanceTag : string​

Managed instance tag.

NetworkInterface​

index : string​

The index of the network interface, generated by the server, 0,1,2... etc.

macAddress : string​

MAC address that is assigned to the network interface.

subnetId : string​

ID of the subnet.

primaryV4Address : PrimaryAddress​

Primary IPv4 address that is assigned to the instance for this network interface.

primaryV6Address : PrimaryAddress​

Primary IPv6 address that is assigned to the instance for this network interface. IPv6 is not available yet.

PrimaryAddress​

address : string​

An IPv4 internal network address that is assigned to the managed instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.

oneToOneNat : OneToOneNat​

One-to-one NAT configuration. If missing, NAT has not been set up.

dnsRecords : DnsRecord​

Internal DNS configuration.

OneToOneNat​

address : string​

An IPv4 external network address that is assigned to the managed instance for this network interface.

ipVersion : IpVersion​

External IP address version.

dnsRecords : DnsRecord​

External DNS configuration.

DnsRecord​

fqdn : string​

Name of the A/AAAA record as specified when creating the instance. Note that if `fqdn' has no trailing '.', it is specified relative to the zone (@see dns_zone_id).

dnsZoneId : string​

DNS zone id (optional, if not set, some private zone is used).

ttl : int64​

DNS record ttl (optional, if 0, a reasonable default is used).

ptr : bool​

When true, indicates there is a corresponding auto-created PTR DNS record.