Get
Returns the specified subcluster.
To get the list of all available subclusters, make a SubclusterService.List request.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetSubclusterRequest =
cloudApi.dataproc.subcluster_service.GetSubclusterRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.SubclusterServiceClient);
const result = await client.get(
GetSubclusterRequest.fromPartial({
clusterId: "clusterId",
subclusterId: "subclusterId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.dataproc.v1.subcluster_service_pb2 import GetSubclusterRequest
from yandex.cloud.dataproc.v1.subcluster_service_pb2_grpc import SubclusterServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(SubclusterServiceStub)
response = service.Get(GetSubclusterRequest(cluster_id="clusterId", subcluster_id="subclusterId"))
print(response)
GetSubclusterRequest
clusterId
: string
ID of the Data Proc cluster that the subcluster belongs to.
subclusterId
: string
ID of the subcluster to return.
To get a subcluster ID make a SubclusterService.List request.
Subcluster
A Data Proc subcluster. For details about the concept, see documentation.
id
: string
ID of the subcluster. Generated at creation time.
clusterId
: string
ID of the Data Proc cluster that the subcluster belongs to.
createdAt
: google.protobuf.Timestamp
Creation timestamp.
name
: string
Name of the subcluster. The name is unique within the cluster.
role
: Role
Role that is fulfilled by hosts of the subcluster.
resources
: Resources
Resources allocated for each host in the subcluster.
subnetId
: string
ID of the VPC subnet used for hosts in the subcluster.
hostsCount
: int64
Number of hosts in the subcluster.
assignPublicIp
: bool
Assign public ip addresses for all hosts in subcluter.
autoscalingConfig
: AutoscalingConfig
Configuration for instance group based subclusters
instanceGroupId
: string
ID of Compute Instance Group for autoscaling subclusters
Resources
resourcePresetId
: string
ID of the resource preset for computational resources available to a host (CPU, memory etc.). All available presets are listed in the documentation.
diskTypeId
: string
Type of the storage environment for the host. Possible values:
- network-hdd - network HDD drive,
- network-ssd - network SSD drive.
diskSize
: int64
Volume of the storage available to a host, in bytes.
AutoscalingConfig
maxHostsCount
: int64
Upper limit for total instance subcluster count.
preemptible
: bool
Preemptible instances are stopped at least once every 24 hours, and can be stopped at any time if their resources are needed by Compute. For more information, see Preemptible Virtual Machines.
measurementDuration
: google.protobuf.Duration
Time in seconds allotted for averaging metrics.
warmupDuration
: google.protobuf.Duration
The warmup time of the instance in seconds. During this time, traffic is sent to the instance, but instance metrics are not collected.
stabilizationDuration
: google.protobuf.Duration
Minimum amount of time in seconds allotted for monitoring before Instance Groups can reduce the number of instances in the group. During this time, the group size doesn't decrease, even if the new metric values indicate that it should.
cpuUtilizationTarget
: double
Defines an autoscaling rule based on the average CPU utilization of the instance group.
decommissionTimeout
: int64
Timeout to gracefully decommission nodes during downscaling. In seconds. Default value: 120