CLI
https://docs.aws.amazon.com/cli/latest/reference/apigatewaymanagementapi/get-connection.html
aws apigatewaymanagementapi get-connection \
--connection-id c4lbndwAIAMCFHA= \
--endpoint-url https://1rz9jj0did.execute-api.us-east-1.amazonaws.com/gitpod
Node SDK
AwsSocket
static clientEndpoint = `https://${process.env.SOCKETS_API_URL_DEV || process.env.SOCKETS_API_URL
}`;
static client = new ApiGatewayManagementApiClient({
region: "us-east-1",
endpoint: AwsSocket.clientEndpoint,
});
static checkConnectionStatus = async (connectionId) => {
try {
const command = new GetConnectionCommand({ ConnectionId: connectionId });
const response = await AwsSocket.client.send(command);
return response;
} catch (e) {
ti(e);
}
}