List
Retrieves the list of PrivateEndpoint resources in the specified folder.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListPrivateEndpointsRequest =
cloudApi.vpc.privatelink_private_endpoint_service.ListPrivateEndpointsRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.PrivateEndpointServiceClient);
const result = await client.list(
ListPrivateEndpointsRequest.fromPartial({
// folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.vpc.v1.privatelink.private_endpoint_service_pb2 import ListPrivateEndpointsRequest
from yandex.cloud.vpc.v1.privatelink.private_endpoint_service_pb2_grpc import (
PrivateEndpointServiceStub,
)
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(PrivateEndpointServiceStub)
response = service.List(
ListPrivateEndpointsRequest(
# folder_id = "folderId",
# page_size = 0,
# page_token = "pageToken",
# filter = "filter"
)
)
print(response)
ListPrivateEndpointsRequest
One of container
folderId: stringID of the folder to list private endpoints in.
To get the folder ID use 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
ListPrivateEndpointsResponse.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
ListPrivateEndpointsResponse.next_page_token returned by a previous list
request.
filter : string
A filter expression that filters PrivateEndpoint listed in the response.
The expression must specify:
- The field name. Currently you can use filtering only on PrivateEndpoint.name field.
- An
=operator. - 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-private-endpoint.
ListPrivateEndpointsResponse
privateEndpoints : PrivateEndpoint
List of private endpoints.
nextPageToken : string
Token for getting the next page of the list. If the number of results is
greater than the specified ListPrivateEndpointsRequest.page_size, use
next_page_token as the value for the
ListPrivateEndpointsRequest.page_token parameter in the next list
request.
Each subsequent page will have its own next_page_token to continue paging
through the results.
PrivateEndpoint
Status
Status of the private endpoint.
STATUS_UNSPECIFIEDStatus of the private endpoint.
PENDINGPrivate endpoint is still creating / updating.
AVAILABLEPrivate endpoint is available.
DELETINGPrivate endpoint is deleting.
ObjectStorage
Yandex Cloud Object Storage.
DnsOptions
privateDnsRecordsEnabled : bool
If enabled - vpc will create private dns records for specified service.
EndpointAddress
Private endpoint ip address details.
subnetId : string
ID of the subnet that the private endpoint address belongs to.
address : string
IP address of the private endpoint.
addressId : string
ID of the private endpoint address.
id : string
ID of the private endpoint. Generated at creation time.
folderId : string
ID of the folder that the private endpoint belongs to.
createdAt : google.protobuf.Timestamp
Creation timestamp.
name : string
Name of the private endpoint.
The name is unique within the folder.
Value must match the regular expression
\|[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])?.
description : string
Description of the private endpoint. 0-256 characters long.
labels : string
Private endpoint labels as key:value pairs.
No more than 64 per resource.
The maximum string length in characters for each value is 63.
Each value must match the regular expression [-_0-9a-z]*.
The string length in characters for each key must be 1-63.
Each key must match the regular expression [a-z][-_0-9a-z]*.
networkId : string
ID of the network that the private endpoint belongs to.
status : Status
Status of the private endpoint.
address : EndpointAddress
Private endpoint ip address details.
dnsOptions : DnsOptions
Private endpoint dns options.
One of service
Service to connect with via private endpoint.
objectStorage: ObjectStorageYandex Cloud Object Storage.
EndpointAddress
Private endpoint ip address details.
subnetId : string
ID of the subnet that the private endpoint address belongs to.
address : string
IP address of the private endpoint.
addressId : string
ID of the private endpoint address.
DnsOptions
privateDnsRecordsEnabled : bool
If enabled - vpc will create private dns records for specified service.
ObjectStorage
Yandex Cloud Object Storage.