List
Retrieves the list of proxies in the specified folder.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListProxyRequest =
cloudApi.serverless.mdbproxy_proxy_service.ListProxyRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ProxyServiceClient);
const result = await client.list(
ListProxyRequest.fromPartial({
folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.serverless.mdbproxy.v1.proxy_service_pb2 import ListProxyRequest
from yandex.cloud.serverless.mdbproxy.v1.proxy_service_pb2_grpc import ProxyServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ProxyServiceStub)
response = service.List(
ListProxyRequest(
folder_id="folderId",
# page_size = 0,
# page_token = "pageToken",
# filter = "filter"
)
)
print(response)
ListProxyRequest
folderId
: string
ID of the folder to list proxies in.
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 pageSize
, the service returns a ListProxyResponse.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
ListProxyResponse.next_page_token returned by a previous list request.
filter
: string
A filter expression that filters proxies listed in the response.
The expression must specify:
- The field name. Currently filtering can only be applied to the Proxy.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-proxy
.
ListProxyResponse
proxies
: Proxy
List of proxies 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 ListProxyRequest.page_size, use nextPageToken
as the value
for the ListProxyRequest.page_token parameter in the next list request.
Each subsequent page will have its own nextPageToken
to continue paging through the results.
Proxy
id
: string
ID of the proxy.
folderId
: string
ID of the folder that the proxy belongs to.
createdAt
: google.protobuf.Timestamp
Creation timestamp for the proxy.
name
: string
Name of the proxy.
description
: string
Description of the proxy.
labels
: string
Resource labels as key:value
pairs.
target
: Target
MDB specific settings.
Target
PostgreSQL
clusterId
: string
Cluster identifier for postgresql.
user
: string
PostgreSQL user.
password
: string
PostgreSQL password, input only field.
db
: string
PostgreSQL database name.
endpoint
: string
PostgreSQL proxy-host for connection, output only field.
ClickHouse
clusterId
: string
Cluster identifier for clickhouse.
user
: string
Clickhouse user.
password
: string
Clickhouse password, input only field.
db
: string
Clickhouse database name.
endpoint
: string
Clickhouse proxy-host for connection, output only field.
One of mdb
clickhouse
: ClickHouseClickhouse settings for proxy.
postgresql
: PostgreSQLPostgreSQL settings for proxy.
ClickHouse
clusterId
: string
Cluster identifier for clickhouse.
user
: string
Clickhouse user.
password
: string
Clickhouse password, input only field.
db
: string
Clickhouse database name.
endpoint
: string
Clickhouse proxy-host for connection, output only field.
PostgreSQL
clusterId
: string
Cluster identifier for postgresql.
user
: string
PostgreSQL user.
password
: string
PostgreSQL password, input only field.
db
: string
PostgreSQL database name.
endpoint
: string
PostgreSQL proxy-host for connection, output only field.