Skip to main content

ListLogRecords

Lists logs for the specified instance group.

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

const ListInstanceGroupLogRecordsRequest =
cloudApi.compute.instancegroup_instance_group_service
.ListInstanceGroupLogRecordsRequest;

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

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

ListInstanceGroupLogRecordsRequest

instanceGroupId : string

ID of the InstanceGroup resource to list logs 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 ListInstanceGroupLogRecordsResponse.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 ListInstanceGroupLogRecordsResponse.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 InstanceGroup.name field.

ListInstanceGroupLogRecordsResponse

logRecords : LogRecord

Lists logs 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 larger than ListInstanceGroupLogRecordsRequest.page_size, use next_page_token as the value for the ListInstanceGroupLogRecordsRequest.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.

LogRecord

timestamp : google.protobuf.Timestamp

Log timestamp in RFC3339 text format.

message : string

The log message.