Get
Retrieves information about a resource preset.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetResourcePresetRequest =
cloudApi.dataproc.resource_preset_service.GetResourcePresetRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ResourcePresetServiceClient);
const result = await client.get(
GetResourcePresetRequest.fromPartial({
resourcePresetId: "resourcePresetId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.dataproc.v1.resource_preset_service_pb2 import GetResourcePresetRequest
from yandex.cloud.dataproc.v1.resource_preset_service_pb2_grpc import ResourcePresetServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ResourcePresetServiceStub)
response = service.Get(GetResourcePresetRequest(resource_preset_id="resourcePresetId"))
print(response)
GetResourcePresetRequest
resourcePresetId
: string
ID of the resource preset to return information about.
To get this ID, make a ResourcePresetService.List request.
ResourcePreset
An object that represents MySQL resource preset. A resource preset defines hardware configuration for cluster hosts.
See the documentation for details.
id
: string
ID of the resource preset that defines available computational resources (vCPU, RAM, etc.) for a cluster host.
zoneIds
: string
IDs of availability zones where the resource preset is available.
cores
: int64
Number of CPU cores for a MySQL host created with the preset.
memory
: int64
RAM volume for a MySQL host created with the preset, in bytes.