Skip to main content

Get

Returns the specified connection info.

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

const GetConnectionRequest =
cloudApi.serverless.apigateway_websocket_connection_service
.GetConnectionRequest;

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

const result = await client.get(
GetConnectionRequest.fromPartial({
connectionId: "connectionId",
})
);
console.log(result);
})();

GetConnectionRequest

connectionId : string

ID of the connection to get.

Connection

id : string

ID of the connection.

gatewayId : string

ID of the API Gateway.

identity : Identity

The information about the caller making the request to API Gateway.

connectedAt : google.protobuf.Timestamp

The timestamp at which connection was established.

lastActiveAt : google.protobuf.Timestamp

The timestamp at which connection was last accessed.

Identity

sourceIp : string

The source IP address of the caller making the request to API Gateway.

userAgent : string

The User Agent of the caller making the request to API Gateway.