Skip to main content

Get

Returns the information about the specified availability zone.

To get the list of availability zones, make a List request.

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);
})();

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.