Get
Returns the specified proxy.
To get the list of all available proxies, make a List request.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetProxyRequest =
cloudApi.serverless.mdbproxy_proxy_service.GetProxyRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ProxyServiceClient);
const result = await client.get(
GetProxyRequest.fromPartial({
proxyId: "proxyId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.serverless.mdbproxy.v1.proxy_service_pb2 import GetProxyRequest
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.Get(GetProxyRequest(proxy_id="proxyId"))
print(response)
GetProxyRequest
proxyId
: string
ID of the proxy to return.
To get a proxy ID make a ProxyService.List request.
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.