Get
Returns the specified Gateway resource.
To get the list of all available Gateway resources, make a List request.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetGatewayRequest = cloudApi.vpc.gateway_service.GetGatewayRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.GatewayServiceClient);
const result = await client.get(
GetGatewayRequest.fromPartial({
gatewayId: "gatewayId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.vpc.v1.gateway_service_pb2_grpc import GatewayServiceStub
from yandex.cloud.vpc.v1.gateway_service_pb2 import GetGatewayRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(GatewayServiceStub)
response = service.Get(GetGatewayRequest(gateway_id="gatewayId"))
print(response)
GetGatewayRequest
gatewayId
: string
ID of the Gateway resource to return.
To get Gateway resource ID make a GatewayService.List request.
Gateway
A Gateway resource. For more information, see Gateway.
id
: string
ID of the gateway. Generated at creation time.
folderId
: string
ID of the folder that the gateway belongs to.
createdAt
: google.protobuf.Timestamp
Creation timestamp.
name
: string
Name of the gateway.
The name is unique within the folder.
Value must match the regular expression \|[a-z]([-a-z0-9]{0,61}[a-z0-9])?
.
description
: string
Description of the gateway. 0-256 characters long.
labels
: string
Gateway 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]*
.
One of gateway
Gateway specification
sharedEgressGateway
: SharedEgressGateway
SharedEgressGateway
Shared Egress Gateway configuration