Skip to main content

ListUsed

Retrieves the list of networks in the specified scope that are used in serverless resources.

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

const ListUsedNetworksRequest =
cloudApi.serverless.functions_network_service.ListUsedNetworksRequest;

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

const result = await client.listUsed(
ListUsedNetworksRequest.fromPartial({
// pageSize: 0,
// pageToken: "pageToken",
// cloudId: "cloudId",
// folderId: "folderId"
})
);
console.log(result);
})();

ListUsedNetworksRequest

pageSize : int64

The maximum number of results per page to return. If the number of available results is larger than pageSize, the service returns a ListUsedNetworksResponse.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 pageToken to the ListUsedNetworksResponse.next_page_token returned by a previous list request.

One of scope

  • cloudId : string

    ID of the cloud to list used networks in.

  • folderId : string

    ID of the folder to list used networks in.

ListUsedNetworksResponse

networks : UsedNetwork

List of used networks in the specified scope.

nextPageToken : string

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

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

UsedNetwork

A VPC network used in serverless resources.

Status
  • STATUS_UNSPECIFIED

  • CREATING

    Network is connecting to its first serverless resource.

  • ACTIVE

    Network is already being used by some serverless resources.

  • OBSOLETE

    Network is no longer used by any serverless resources. It will be cleaned-up after a while.

networkId : string

ID of the VPC network.

cloudId : string

ID of the cloud that the network belongs to.

folderId : string

ID of the folder that the network belongs to.

status : Status

Status of the network.

willBeCleanedUpAt : google.protobuf.Timestamp

Clean-up timestamp of the obsolete network.

connectionsCount : int64

Number of serverless resources connected to the network.