Skip to main content

List

Retrieves the list of exports in the specified folder.

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

const ListExportsRequest = cloudApi.logging.export_service.ListExportsRequest;

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

const result = await client.list(
ListExportsRequest.fromPartial({
folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter"
})
);
console.log(result);
})();

ListExportsRequest

folderId : string

Folder ID of the exports to return.

To get a folder ID make a yandex.cloud.resourcemanager.v1.FolderService.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 ListExportssResponse.next_page_token that can be used to get the next page of results in subsequent list requests.

Default value: 100.

pageToken : string

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

filter : string

A filter expression that filters exports listed in the response.

The expression must specify:

  1. The field name. Currently filtering can only be applied to the Export.name field.
  2. An = operator.
  3. The value in double quotes ("). Must be 3-63 characters long and match the regular expression [a-z][-a-z0-9]{1,61}[a-z0-9]. Example of a filter: name="my-export".

ListExportsResponse

exports : Export

List of exports in the specified folder.

nextPageToken : string

Token for getting the next page of the list. If the number of results is greater than the specified ListExportsRequest.page_size, use next_page_token as the value for the ListExportsRequest.page_token parameter in the next list request.

Each subsequent page will have its own next_page_token to continue paging through the results.

Export

id : string

Export ID.

folderId : string

Export folder ID.

cloudId : string

Export cloud ID.

createdAt : google.protobuf.Timestamp

Export creation time.

name : string

Export name.

description : string

Export description.

labels : string

Export lables.

groupId : string

Group logs are exported from.

sinkId : string

Sink logs are exported to.

params : ExportParams

Parameters of logs filtration.

ExportParams

resourceTypes : string
resourceIds : string
streamNames : string
levels : LogLevel.Level
filter : string