Get
Returns the specified RouteTable resource.
To get the list of available RouteTable resources, make a List request.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetRouteTableRequest =
cloudApi.vpc.route_table_service.GetRouteTableRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.RouteTableServiceClient);
const result = await client.get(
GetRouteTableRequest.fromPartial({
routeTableId: "routeTableId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.vpc.v1.route_table_service_pb2 import GetRouteTableRequest
from yandex.cloud.vpc.v1.route_table_service_pb2_grpc import RouteTableServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(RouteTableServiceStub)
response = service.Get(GetRouteTableRequest(route_table_id="routeTableId"))
print(response)
GetRouteTableRequest
routeTableId
: string
ID of the RouteTable resource to return. To get the route table ID use a RouteTableService.List request.
RouteTable
A RouteTable resource. For more information, see Static Routes.
id
: string
ID of the route table.
folderId
: string
ID of the folder that the route table belongs to.
createdAt
: google.protobuf.Timestamp
Creation timestamp in RFC3339 text format.
name
: string
Name of the route table.
The name must be unique within the folder.
Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])?
.
description
: string
Optional description of the route table. 0-256 characters long.
labels
: string
Resource labels, key:value
pairs.
No more than 64 per resource.
The string length in characters for each key must be 1-63.
Each value must match the regular expression [-_0-9a-z]*
.
Each key must match the regular expression [a-z][-_0-9a-z]*
.
networkId
: string
ID of the network the route table belongs to.
staticRoutes
: StaticRoute
List of static routes.
StaticRoute
A StaticRoute resource. For more information, see Static Routes.
One of destination
destinationPrefix
: stringDestination subnet in CIDR notation
One of nextHop
labels
: string
Resource labels as key:value
pairs. Maximum of 64 per resource.