Get
Returns the specified location.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetLocationRequest = cloudApi.ydb.location_service.GetLocationRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.LocationServiceClient);
const result = await client.get(
GetLocationRequest.fromPartial({
locationId: "locationId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.ydb.v1.location_service_pb2 import GetLocationRequest
from yandex.cloud.ydb.v1.location_service_pb2_grpc import LocationServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(LocationServiceStub)
response = service.Get(GetLocationRequest(location_id="locationId"))
print(response)
GetLocationRequest
locationId
: string
Required. ID of the location to return.