Get
Returns the information about specified disk type.
To get the list of available disk types, make a List request.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetDiskTypeRequest =
cloudApi.compute.disk_type_service.GetDiskTypeRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.DiskTypeServiceClient);
const result = await client.get(
GetDiskTypeRequest.fromPartial({
diskTypeId: "diskTypeId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.compute.v1.disk_type_service_pb2_grpc import DiskTypeServiceStub
from yandex.cloud.compute.v1.disk_type_service_pb2 import GetDiskTypeRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(DiskTypeServiceStub)
response = service.Get(GetDiskTypeRequest(disk_type_id="diskTypeId"))
print(response)
GetDiskTypeRequest
diskTypeId
: string
ID of the disk type to return information about. To get the disk type ID use a DiskTypeService.List request.
DiskType
id
: string
ID of the disk type.
description
: string
Description of the disk type. 0-256 characters long.
zoneIds
: string
Array of availability zones where the disk type is available.