List
Retrieves the list of available resource presets.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListResourcePresetsRequest =
cloudApi.dataproc.resource_preset_service.ListResourcePresetsRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ResourcePresetServiceClient);
const result = await client.list(
ListResourcePresetsRequest.fromPartial({
// pageSize: 0,
// pageToken: "pageToken"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.dataproc.v1.resource_preset_service_pb2 import ListResourcePresetsRequest
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.List(
ListResourcePresetsRequest(
# page_size = 0,
# page_token = "pageToken"
)
)
print(response)
ListResourcePresetsRequest
pageSize
: int64
The maximum number of results per page to return.
If the number of available results is larger than page_size, the service returns a ListResourcePresetsResponse.next_page_token that can be used to get the next page of results in subsequent list requests.
pageToken
: string
Page token. To get the next page of results, set page_token to the ListResourcePresetsResponse.next_page_token returned by the previous list request.
type
: ResourcePreset.Type
Required. ResourcePreset type - master or segment.
ListResourcePresetsResponse
resourcePresets
: ResourcePreset
List of resource presets.
nextPageToken
: string
This token allows you to get the next page of results for list requests.
If the number of results is larger than ListResourcePresetsRequest.page_size, use the next_page_token as the value for the ListResourcePresetsRequest.page_token parameter in the next list request.
Each subsequent list request has its own next_page_token to continue paging through the results.
ResourcePreset
A preset of resources for hardware configuration of Greenplum® hosts.
Type
TYPE_UNSPECIFIED
MASTER
Greenplum® master host.
SEGMENT
Greenplum® segment host.
id
: string
ID of the resource preset.
zoneIds
: string
IDs of availability zones where the resource preset is available.
diskTypeIds
: string
IDs of availability disk types available in the resource preset.
cores
: int64
Number of CPU cores for a Greenplum® host created with the preset.
memory
: int64
RAM volume for a Greenplum® host created with the preset, in bytes.
type
: Type
Host type.
hostCountDivider
: int64
The number of hosts must be divisible by host_count_divider.
maxSegmentInHostCount
: int64
Maximum number of segments in segment host.