Get
Returns the information about the specified availability zone.
To get the list of availability zones, make a List request.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetZoneRequest = cloudApi.compute.zone_service.GetZoneRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ZoneServiceClient);
const result = await client.get(
GetZoneRequest.fromPartial({
zoneId: "zoneId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.compute.v1.zone_service_pb2 import GetZoneRequest
from yandex.cloud.compute.v1.zone_service_pb2_grpc import ZoneServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ZoneServiceStub)
response = service.Get(GetZoneRequest(zone_id="zoneId"))
print(response)
GetZoneRequest
zoneId
: string
ID of the availability zone to return information about.
Zone
Availability zone. For more information, see Availability zones.
Status
STATUS_UNSPECIFIED
UP
Zone is available. You can access the resources allocated in this zone.
DOWN
Zone is not available.
id
: string
ID of the zone.
regionId
: string
ID of the region.
status
: Status
Status of the zone.