ListConnectedResources
Retrieves the list of serverless resources connected to any network from the specified scope.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListConnectedResourcesRequest =
cloudApi.serverless.functions_network_service.ListConnectedResourcesRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.NetworkServiceClient);
const result = await client.listConnectedResources(
ListConnectedResourcesRequest.fromPartial({
// pageSize: 0,
// pageToken: "pageToken",
// networkId: "networkId",
// cloudId: "cloudId",
// folderId: "folderId"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.serverless.functions.v1.network_service_pb2 import ListConnectedResourcesRequest
from yandex.cloud.serverless.functions.v1.network_service_pb2_grpc import NetworkServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(NetworkServiceStub)
response = service.ListConnectedResources(
ListConnectedResourcesRequest(
# page_size = 0,
# page_token = "pageToken",
# network_id = "networkId",
# cloud_id = "cloudId",
# folder_id = "folderId"
)
)
print(response)
ListConnectedResourcesRequest
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 ListConnectedResourcesResponse.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
ListConnectedResourcesResponse.next_page_token returned by a previous list request.
One of networkScope
networkId
: stringID of the network to list serverless resources connected to it.
cloudId
: stringID of the cloud to list serverless resources connected to any network from it.
folderId
: stringID of the folder to list serverless resources connected to any network from it.
ListConnectedResourcesResponse
ConnectedResource
Serverless resource connected to VPC network.
networkId
: string
ID of the network to which the resource is connected.
resourceType
: string
Type of the serverless resource.
resourceId
: string
ID of the serverless resource.
subresourceType
: string
Type of the serverless subresource.
subresourceId
: string
ID of the serverless subresource.
resourceCloudId
: string
ID of the cloud that the resource belongs to.
resourceFolderId
: string
ID of the folder thar the resource belongs to.
resources
: ConnectedResource
List of serverless resources connected to any network from the specified scope.
nextPageToken
: string
Token for getting the next page of the list. If the number of results is greater than
the specified ListConnectedResourcesRequest.page_size, use nextPageToken
as the value
for the ListConnectedResourcesRequest.page_token parameter in the next list request.
Each subsequent page will have its own nextPageToken
to continue paging through the results.
ConnectedResource
Serverless resource connected to VPC network.
networkId
: string
ID of the network to which the resource is connected.
resourceType
: string
Type of the serverless resource.
resourceId
: string
ID of the serverless resource.
subresourceType
: string
Type of the serverless subresource.
subresourceId
: string
ID of the serverless subresource.
resourceCloudId
: string
ID of the cloud that the resource belongs to.
resourceFolderId
: string
ID of the folder thar the resource belongs to.