clusters.proto 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.dataproc.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/dataproc/v1/shared.proto";
  21. import "google/longrunning/operations.proto";
  22. import "google/protobuf/duration.proto";
  23. import "google/protobuf/field_mask.proto";
  24. import "google/protobuf/timestamp.proto";
  25. option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc";
  26. option java_multiple_files = true;
  27. option java_outer_classname = "ClustersProto";
  28. option java_package = "com.google.cloud.dataproc.v1";
  29. option (google.api.resource_definition) = {
  30. type: "container.googleapis.com/Cluster"
  31. pattern: "projects/{project}/locations/{location}/clusters/{cluster}"
  32. };
  33. option (google.api.resource_definition) = {
  34. type: "metastore.googleapis.com/Service"
  35. pattern: "projects/{project}/locations/{location}/services/{service}"
  36. };
  37. // The ClusterControllerService provides methods to manage clusters
  38. // of Compute Engine instances.
  39. service ClusterController {
  40. option (google.api.default_host) = "dataproc.googleapis.com";
  41. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  42. // Creates a cluster in a project. The returned
  43. // [Operation.metadata][google.longrunning.Operation.metadata] will be
  44. // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
  45. rpc CreateCluster(CreateClusterRequest) returns (google.longrunning.Operation) {
  46. option (google.api.http) = {
  47. post: "/v1/projects/{project_id}/regions/{region}/clusters"
  48. body: "cluster"
  49. };
  50. option (google.api.method_signature) = "project_id,region,cluster";
  51. option (google.longrunning.operation_info) = {
  52. response_type: "Cluster"
  53. metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata"
  54. };
  55. }
  56. // Updates a cluster in a project. The returned
  57. // [Operation.metadata][google.longrunning.Operation.metadata] will be
  58. // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
  59. // The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error
  60. // is returned.
  61. rpc UpdateCluster(UpdateClusterRequest) returns (google.longrunning.Operation) {
  62. option (google.api.http) = {
  63. patch: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}"
  64. body: "cluster"
  65. };
  66. option (google.api.method_signature) = "project_id,region,cluster_name,cluster,update_mask";
  67. option (google.longrunning.operation_info) = {
  68. response_type: "Cluster"
  69. metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata"
  70. };
  71. }
  72. // Stops a cluster in a project.
  73. rpc StopCluster(StopClusterRequest) returns (google.longrunning.Operation) {
  74. option (google.api.http) = {
  75. post: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:stop"
  76. body: "*"
  77. };
  78. option (google.longrunning.operation_info) = {
  79. response_type: "Cluster"
  80. metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata"
  81. };
  82. }
  83. // Starts a cluster in a project.
  84. rpc StartCluster(StartClusterRequest) returns (google.longrunning.Operation) {
  85. option (google.api.http) = {
  86. post: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:start"
  87. body: "*"
  88. };
  89. option (google.longrunning.operation_info) = {
  90. response_type: "Cluster"
  91. metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata"
  92. };
  93. }
  94. // Deletes a cluster in a project. The returned
  95. // [Operation.metadata][google.longrunning.Operation.metadata] will be
  96. // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
  97. rpc DeleteCluster(DeleteClusterRequest) returns (google.longrunning.Operation) {
  98. option (google.api.http) = {
  99. delete: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}"
  100. };
  101. option (google.api.method_signature) = "project_id,region,cluster_name";
  102. option (google.longrunning.operation_info) = {
  103. response_type: "google.protobuf.Empty"
  104. metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata"
  105. };
  106. }
  107. // Gets the resource representation for a cluster in a project.
  108. rpc GetCluster(GetClusterRequest) returns (Cluster) {
  109. option (google.api.http) = {
  110. get: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}"
  111. };
  112. option (google.api.method_signature) = "project_id,region,cluster_name";
  113. }
  114. // Lists all regions/{region}/clusters in a project alphabetically.
  115. rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) {
  116. option (google.api.http) = {
  117. get: "/v1/projects/{project_id}/regions/{region}/clusters"
  118. };
  119. option (google.api.method_signature) = "project_id,region";
  120. option (google.api.method_signature) = "project_id,region,filter";
  121. }
  122. // Gets cluster diagnostic information. The returned
  123. // [Operation.metadata][google.longrunning.Operation.metadata] will be
  124. // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
  125. // After the operation completes,
  126. // [Operation.response][google.longrunning.Operation.response]
  127. // contains
  128. // [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults).
  129. rpc DiagnoseCluster(DiagnoseClusterRequest) returns (google.longrunning.Operation) {
  130. option (google.api.http) = {
  131. post: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:diagnose"
  132. body: "*"
  133. };
  134. option (google.api.method_signature) = "project_id,region,cluster_name";
  135. option (google.longrunning.operation_info) = {
  136. response_type: "DiagnoseClusterResults"
  137. metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata"
  138. };
  139. }
  140. }
  141. // Describes the identifying information, config, and status of
  142. // a Dataproc cluster
  143. message Cluster {
  144. // Required. The Google Cloud Platform project ID that the cluster belongs to.
  145. string project_id = 1 [(google.api.field_behavior) = REQUIRED];
  146. // Required. The cluster name. Cluster names within a project must be
  147. // unique. Names of deleted clusters can be reused.
  148. string cluster_name = 2 [(google.api.field_behavior) = REQUIRED];
  149. // Optional. The cluster config for a cluster of Compute Engine Instances.
  150. // Note that Dataproc may set default values, and values may change
  151. // when clusters are updated.
  152. ClusterConfig config = 3 [(google.api.field_behavior) = OPTIONAL];
  153. // Optional. The virtual cluster config, used when creating a Dataproc cluster that
  154. // does not directly control the underlying compute resources, for example,
  155. // when creating a [Dataproc-on-GKE
  156. // cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
  157. // Note that Dataproc may set default values, and values may change when
  158. // clusters are updated. Exactly one of config or virtualClusterConfig must be
  159. // specified.
  160. VirtualClusterConfig virtual_cluster_config = 10 [(google.api.field_behavior) = OPTIONAL];
  161. // Optional. The labels to associate with this cluster.
  162. // Label **keys** must contain 1 to 63 characters, and must conform to
  163. // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
  164. // Label **values** may be empty, but, if present, must contain 1 to 63
  165. // characters, and must conform to [RFC
  166. // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
  167. // associated with a cluster.
  168. map<string, string> labels = 8 [(google.api.field_behavior) = OPTIONAL];
  169. // Output only. Cluster status.
  170. ClusterStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  171. // Output only. The previous cluster status.
  172. repeated ClusterStatus status_history = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  173. // Output only. A cluster UUID (Unique Universal Identifier). Dataproc
  174. // generates this value when it creates the cluster.
  175. string cluster_uuid = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  176. // Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
  177. //
  178. // **Beta Feature**: This report is available for testing purposes only. It
  179. // may be changed before final release.
  180. ClusterMetrics metrics = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  181. }
  182. // The cluster config.
  183. message ClusterConfig {
  184. // Optional. A Cloud Storage bucket used to stage job
  185. // dependencies, config files, and job driver console output.
  186. // If you do not specify a staging bucket, Cloud
  187. // Dataproc will determine a Cloud Storage location (US,
  188. // ASIA, or EU) for your cluster's staging bucket according to the
  189. // Compute Engine zone where your cluster is deployed, and then create
  190. // and manage this project-level, per-location bucket (see
  191. // [Dataproc staging and temp
  192. // buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
  193. // **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
  194. // a Cloud Storage bucket.**
  195. string config_bucket = 1 [(google.api.field_behavior) = OPTIONAL];
  196. // Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
  197. // such as Spark and MapReduce history files.
  198. // If you do not specify a temp bucket,
  199. // Dataproc will determine a Cloud Storage location (US,
  200. // ASIA, or EU) for your cluster's temp bucket according to the
  201. // Compute Engine zone where your cluster is deployed, and then create
  202. // and manage this project-level, per-location bucket. The default bucket has
  203. // a TTL of 90 days, but you can use any TTL (or none) if you specify a
  204. // bucket (see
  205. // [Dataproc staging and temp
  206. // buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
  207. // **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
  208. // a Cloud Storage bucket.**
  209. string temp_bucket = 2 [(google.api.field_behavior) = OPTIONAL];
  210. // Optional. The shared Compute Engine config settings for
  211. // all instances in a cluster.
  212. GceClusterConfig gce_cluster_config = 8 [(google.api.field_behavior) = OPTIONAL];
  213. // Optional. The Compute Engine config settings for
  214. // the cluster's master instance.
  215. InstanceGroupConfig master_config = 9 [(google.api.field_behavior) = OPTIONAL];
  216. // Optional. The Compute Engine config settings for
  217. // the cluster's worker instances.
  218. InstanceGroupConfig worker_config = 10 [(google.api.field_behavior) = OPTIONAL];
  219. // Optional. The Compute Engine config settings for
  220. // a cluster's secondary worker instances
  221. InstanceGroupConfig secondary_worker_config = 12 [(google.api.field_behavior) = OPTIONAL];
  222. // Optional. The config settings for cluster software.
  223. SoftwareConfig software_config = 13 [(google.api.field_behavior) = OPTIONAL];
  224. // Optional. Commands to execute on each node after config is
  225. // completed. By default, executables are run on master and all worker nodes.
  226. // You can test a node's `role` metadata to run an executable on
  227. // a master or worker node, as shown below using `curl` (you can also use
  228. // `wget`):
  229. //
  230. // ROLE=$(curl -H Metadata-Flavor:Google
  231. // http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
  232. // if [[ "${ROLE}" == 'Master' ]]; then
  233. // ... master specific actions ...
  234. // else
  235. // ... worker specific actions ...
  236. // fi
  237. repeated NodeInitializationAction initialization_actions = 11 [(google.api.field_behavior) = OPTIONAL];
  238. // Optional. Encryption settings for the cluster.
  239. EncryptionConfig encryption_config = 15 [(google.api.field_behavior) = OPTIONAL];
  240. // Optional. Autoscaling config for the policy associated with the cluster.
  241. // Cluster does not autoscale if this field is unset.
  242. AutoscalingConfig autoscaling_config = 18 [(google.api.field_behavior) = OPTIONAL];
  243. // Optional. Security settings for the cluster.
  244. SecurityConfig security_config = 16 [(google.api.field_behavior) = OPTIONAL];
  245. // Optional. Lifecycle setting for the cluster.
  246. LifecycleConfig lifecycle_config = 17 [(google.api.field_behavior) = OPTIONAL];
  247. // Optional. Port/endpoint configuration for this cluster
  248. EndpointConfig endpoint_config = 19 [(google.api.field_behavior) = OPTIONAL];
  249. // Optional. Metastore configuration.
  250. MetastoreConfig metastore_config = 20 [(google.api.field_behavior) = OPTIONAL];
  251. // Optional. The config for Dataproc metrics.
  252. DataprocMetricConfig dataproc_metric_config = 23 [(google.api.field_behavior) = OPTIONAL];
  253. }
  254. // Dataproc cluster config for a cluster that does not directly control the
  255. // underlying compute resources, such as a [Dataproc-on-GKE
  256. // cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
  257. message VirtualClusterConfig {
  258. // Optional. A Storage bucket used to stage job
  259. // dependencies, config files, and job driver console output.
  260. // If you do not specify a staging bucket, Cloud
  261. // Dataproc will determine a Cloud Storage location (US,
  262. // ASIA, or EU) for your cluster's staging bucket according to the
  263. // Compute Engine zone where your cluster is deployed, and then create
  264. // and manage this project-level, per-location bucket (see
  265. // [Dataproc staging and temp
  266. // buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
  267. // **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
  268. // a Cloud Storage bucket.**
  269. string staging_bucket = 1 [(google.api.field_behavior) = OPTIONAL];
  270. oneof infrastructure_config {
  271. // Required. The configuration for running the Dataproc cluster on Kubernetes.
  272. KubernetesClusterConfig kubernetes_cluster_config = 6 [(google.api.field_behavior) = REQUIRED];
  273. }
  274. // Optional. Configuration of auxiliary services used by this cluster.
  275. AuxiliaryServicesConfig auxiliary_services_config = 7 [(google.api.field_behavior) = OPTIONAL];
  276. }
  277. // Auxiliary services configuration for a Cluster.
  278. message AuxiliaryServicesConfig {
  279. // Optional. The Hive Metastore configuration for this workload.
  280. MetastoreConfig metastore_config = 1 [(google.api.field_behavior) = OPTIONAL];
  281. // Optional. The Spark History Server configuration for the workload.
  282. SparkHistoryServerConfig spark_history_server_config = 2 [(google.api.field_behavior) = OPTIONAL];
  283. }
  284. // Endpoint config for this cluster
  285. message EndpointConfig {
  286. // Output only. The map of port descriptions to URLs. Will only be populated
  287. // if enable_http_port_access is true.
  288. map<string, string> http_ports = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  289. // Optional. If true, enable http access to specific ports on the cluster
  290. // from external sources. Defaults to false.
  291. bool enable_http_port_access = 2 [(google.api.field_behavior) = OPTIONAL];
  292. }
  293. // Autoscaling Policy config associated with the cluster.
  294. message AutoscalingConfig {
  295. // Optional. The autoscaling policy used by the cluster.
  296. //
  297. // Only resource names including projectid and location (region) are valid.
  298. // Examples:
  299. //
  300. // * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
  301. // * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
  302. //
  303. // Note that the policy must be in the same project and Dataproc region.
  304. string policy_uri = 1 [(google.api.field_behavior) = OPTIONAL];
  305. }
  306. // Encryption settings for the cluster.
  307. message EncryptionConfig {
  308. // Optional. The Cloud KMS key name to use for PD disk encryption for all
  309. // instances in the cluster.
  310. string gce_pd_kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL];
  311. }
  312. // Common config settings for resources of Compute Engine cluster
  313. // instances, applicable to all instances in the cluster.
  314. message GceClusterConfig {
  315. // `PrivateIpv6GoogleAccess` controls whether and how Dataproc cluster nodes
  316. // can communicate with Google Services through gRPC over IPv6.
  317. // These values are directly mapped to corresponding values in the
  318. // [Compute Engine Instance
  319. // fields](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
  320. enum PrivateIpv6GoogleAccess {
  321. // If unspecified, Compute Engine default behavior will apply, which
  322. // is the same as [INHERIT_FROM_SUBNETWORK][google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.INHERIT_FROM_SUBNETWORK].
  323. PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0;
  324. // Private access to and from Google Services configuration
  325. // inherited from the subnetwork configuration. This is the
  326. // default Compute Engine behavior.
  327. INHERIT_FROM_SUBNETWORK = 1;
  328. // Enables outbound private IPv6 access to Google Services from the Dataproc
  329. // cluster.
  330. OUTBOUND = 2;
  331. // Enables bidirectional private IPv6 access between Google Services and the
  332. // Dataproc cluster.
  333. BIDIRECTIONAL = 3;
  334. }
  335. // Optional. The zone where the Compute Engine cluster will be located.
  336. // On a create request, it is required in the "global" region. If omitted
  337. // in a non-global Dataproc region, the service will pick a zone in the
  338. // corresponding Compute Engine region. On a get request, zone will
  339. // always be present.
  340. //
  341. // A full URL, partial URI, or short name are valid. Examples:
  342. //
  343. // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
  344. // * `projects/[project_id]/zones/[zone]`
  345. // * `us-central1-f`
  346. string zone_uri = 1 [(google.api.field_behavior) = OPTIONAL];
  347. // Optional. The Compute Engine network to be used for machine
  348. // communications. Cannot be specified with subnetwork_uri. If neither
  349. // `network_uri` nor `subnetwork_uri` is specified, the "default" network of
  350. // the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
  351. // [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for
  352. // more information).
  353. //
  354. // A full URL, partial URI, or short name are valid. Examples:
  355. //
  356. // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
  357. // * `projects/[project_id]/regions/global/default`
  358. // * `default`
  359. string network_uri = 2 [(google.api.field_behavior) = OPTIONAL];
  360. // Optional. The Compute Engine subnetwork to be used for machine
  361. // communications. Cannot be specified with network_uri.
  362. //
  363. // A full URL, partial URI, or short name are valid. Examples:
  364. //
  365. // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
  366. // * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
  367. // * `sub0`
  368. string subnetwork_uri = 6 [(google.api.field_behavior) = OPTIONAL];
  369. // Optional. If true, all instances in the cluster will only have internal IP
  370. // addresses. By default, clusters are not restricted to internal IP
  371. // addresses, and will have ephemeral external IP addresses assigned to each
  372. // instance. This `internal_ip_only` restriction can only be enabled for
  373. // subnetwork enabled networks, and all off-cluster dependencies must be
  374. // configured to be accessible without external IP addresses.
  375. bool internal_ip_only = 7 [(google.api.field_behavior) = OPTIONAL];
  376. // Optional. The type of IPv6 access for a cluster.
  377. PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(google.api.field_behavior) = OPTIONAL];
  378. // Optional. The [Dataproc service
  379. // account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc)
  380. // (also see [VM Data Plane
  381. // identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity))
  382. // used by Dataproc cluster VM instances to access Google Cloud Platform
  383. // services.
  384. //
  385. // If not specified, the
  386. // [Compute Engine default service
  387. // account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
  388. // is used.
  389. string service_account = 8 [(google.api.field_behavior) = OPTIONAL];
  390. // Optional. The URIs of service account scopes to be included in
  391. // Compute Engine instances. The following base set of scopes is always
  392. // included:
  393. //
  394. // * https://www.googleapis.com/auth/cloud.useraccounts.readonly
  395. // * https://www.googleapis.com/auth/devstorage.read_write
  396. // * https://www.googleapis.com/auth/logging.write
  397. //
  398. // If no scopes are specified, the following defaults are also provided:
  399. //
  400. // * https://www.googleapis.com/auth/bigquery
  401. // * https://www.googleapis.com/auth/bigtable.admin.table
  402. // * https://www.googleapis.com/auth/bigtable.data
  403. // * https://www.googleapis.com/auth/devstorage.full_control
  404. repeated string service_account_scopes = 3 [(google.api.field_behavior) = OPTIONAL];
  405. // The Compute Engine tags to add to all instances (see [Tagging
  406. // instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
  407. repeated string tags = 4;
  408. // The Compute Engine metadata entries to add to all instances (see
  409. // [Project and instance
  410. // metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
  411. map<string, string> metadata = 5;
  412. // Optional. Reservation Affinity for consuming Zonal reservation.
  413. ReservationAffinity reservation_affinity = 11 [(google.api.field_behavior) = OPTIONAL];
  414. // Optional. Node Group Affinity for sole-tenant clusters.
  415. NodeGroupAffinity node_group_affinity = 13 [(google.api.field_behavior) = OPTIONAL];
  416. // Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
  417. // VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
  418. ShieldedInstanceConfig shielded_instance_config = 14 [(google.api.field_behavior) = OPTIONAL];
  419. // Optional. Confidential Instance Config for clusters using [Confidential
  420. // VMs](https://cloud.google.com/compute/confidential-vm/docs).
  421. ConfidentialInstanceConfig confidential_instance_config = 15 [(google.api.field_behavior) = OPTIONAL];
  422. }
  423. // Node Group Affinity for clusters using sole-tenant node groups.
  424. message NodeGroupAffinity {
  425. // Required. The URI of a
  426. // sole-tenant [node group
  427. // resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
  428. // that the cluster will be created on.
  429. //
  430. // A full URL, partial URI, or node group name are valid. Examples:
  431. //
  432. // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
  433. // * `projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
  434. // * `node-group-1`
  435. string node_group_uri = 1 [(google.api.field_behavior) = REQUIRED];
  436. }
  437. // Shielded Instance Config for clusters using [Compute Engine Shielded
  438. // VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
  439. message ShieldedInstanceConfig {
  440. // Optional. Defines whether instances have Secure Boot enabled.
  441. bool enable_secure_boot = 1 [(google.api.field_behavior) = OPTIONAL];
  442. // Optional. Defines whether instances have the vTPM enabled.
  443. bool enable_vtpm = 2 [(google.api.field_behavior) = OPTIONAL];
  444. // Optional. Defines whether instances have integrity monitoring enabled.
  445. bool enable_integrity_monitoring = 3 [(google.api.field_behavior) = OPTIONAL];
  446. }
  447. // Confidential Instance Config for clusters using [Confidential
  448. // VMs](https://cloud.google.com/compute/confidential-vm/docs)
  449. message ConfidentialInstanceConfig {
  450. // Optional. Defines whether the instance should have confidential compute enabled.
  451. bool enable_confidential_compute = 1 [(google.api.field_behavior) = OPTIONAL];
  452. }
  453. // The config settings for Compute Engine resources in
  454. // an instance group, such as a master or worker group.
  455. message InstanceGroupConfig {
  456. // Controls the use of
  457. // [preemptible instances]
  458. // (https://cloud.google.com/compute/docs/instances/preemptible)
  459. // within the group.
  460. enum Preemptibility {
  461. // Preemptibility is unspecified, the system will choose the
  462. // appropriate setting for each instance group.
  463. PREEMPTIBILITY_UNSPECIFIED = 0;
  464. // Instances are non-preemptible.
  465. //
  466. // This option is allowed for all instance groups and is the only valid
  467. // value for Master and Worker instance groups.
  468. NON_PREEMPTIBLE = 1;
  469. // Instances are preemptible.
  470. //
  471. // This option is allowed only for secondary worker groups.
  472. PREEMPTIBLE = 2;
  473. }
  474. // Optional. The number of VM instances in the instance group.
  475. // For [HA
  476. // cluster](/dataproc/docs/concepts/configuring-clusters/high-availability)
  477. // [master_config](#FIELDS.master_config) groups, **must be set to 3**.
  478. // For standard cluster [master_config](#FIELDS.master_config) groups,
  479. // **must be set to 1**.
  480. int32 num_instances = 1 [(google.api.field_behavior) = OPTIONAL];
  481. // Output only. The list of instance names. Dataproc derives the names
  482. // from `cluster_name`, `num_instances`, and the instance group.
  483. repeated string instance_names = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  484. // Optional. The Compute Engine image resource used for cluster instances.
  485. //
  486. // The URI can represent an image or image family.
  487. //
  488. // Image examples:
  489. //
  490. // * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]`
  491. // * `projects/[project_id]/global/images/[image-id]`
  492. // * `image-id`
  493. //
  494. // Image family examples. Dataproc will use the most recent
  495. // image from the family:
  496. //
  497. // * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]`
  498. // * `projects/[project_id]/global/images/family/[custom-image-family-name]`
  499. //
  500. // If the URI is unspecified, it will be inferred from
  501. // `SoftwareConfig.image_version` or the system default.
  502. string image_uri = 3 [(google.api.field_behavior) = OPTIONAL];
  503. // Optional. The Compute Engine machine type used for cluster instances.
  504. //
  505. // A full URL, partial URI, or short name are valid. Examples:
  506. //
  507. // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
  508. // * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
  509. // * `n1-standard-2`
  510. //
  511. // **Auto Zone Exception**: If you are using the Dataproc
  512. // [Auto Zone
  513. // Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
  514. // feature, you must use the short name of the machine type
  515. // resource, for example, `n1-standard-2`.
  516. string machine_type_uri = 4 [(google.api.field_behavior) = OPTIONAL];
  517. // Optional. Disk option config settings.
  518. DiskConfig disk_config = 5 [(google.api.field_behavior) = OPTIONAL];
  519. // Output only. Specifies that this instance group contains preemptible
  520. // instances.
  521. bool is_preemptible = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  522. // Optional. Specifies the preemptibility of the instance group.
  523. //
  524. // The default value for master and worker groups is
  525. // `NON_PREEMPTIBLE`. This default cannot be changed.
  526. //
  527. // The default value for secondary instances is
  528. // `PREEMPTIBLE`.
  529. Preemptibility preemptibility = 10 [(google.api.field_behavior) = OPTIONAL];
  530. // Output only. The config for Compute Engine Instance Group
  531. // Manager that manages this group.
  532. // This is only used for preemptible instance groups.
  533. ManagedGroupConfig managed_group_config = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  534. // Optional. The Compute Engine accelerator configuration for these
  535. // instances.
  536. repeated AcceleratorConfig accelerators = 8 [(google.api.field_behavior) = OPTIONAL];
  537. // Optional. Specifies the minimum cpu platform for the Instance Group.
  538. // See [Dataproc -> Minimum CPU
  539. // Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
  540. string min_cpu_platform = 9 [(google.api.field_behavior) = OPTIONAL];
  541. }
  542. // Specifies the resources used to actively manage an instance group.
  543. message ManagedGroupConfig {
  544. // Output only. The name of the Instance Template used for the Managed
  545. // Instance Group.
  546. string instance_template_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  547. // Output only. The name of the Instance Group Manager for this group.
  548. string instance_group_manager_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  549. }
  550. // Specifies the type and number of accelerator cards attached to the instances
  551. // of an instance. See [GPUs on Compute
  552. // Engine](https://cloud.google.com/compute/docs/gpus/).
  553. message AcceleratorConfig {
  554. // Full URL, partial URI, or short name of the accelerator type resource to
  555. // expose to this instance. See
  556. // [Compute Engine
  557. // AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).
  558. //
  559. // Examples:
  560. //
  561. // * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
  562. // * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
  563. // * `nvidia-tesla-k80`
  564. //
  565. // **Auto Zone Exception**: If you are using the Dataproc
  566. // [Auto Zone
  567. // Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
  568. // feature, you must use the short name of the accelerator type
  569. // resource, for example, `nvidia-tesla-k80`.
  570. string accelerator_type_uri = 1;
  571. // The number of the accelerator cards of this type exposed to this instance.
  572. int32 accelerator_count = 2;
  573. }
  574. // Specifies the config of disk options for a group of VM instances.
  575. message DiskConfig {
  576. // Optional. Type of the boot disk (default is "pd-standard").
  577. // Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive),
  578. // "pd-ssd" (Persistent Disk Solid State Drive),
  579. // or "pd-standard" (Persistent Disk Hard Disk Drive).
  580. // See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types).
  581. string boot_disk_type = 3 [(google.api.field_behavior) = OPTIONAL];
  582. // Optional. Size in GB of the boot disk (default is 500GB).
  583. int32 boot_disk_size_gb = 1 [(google.api.field_behavior) = OPTIONAL];
  584. // Optional. Number of attached SSDs, from 0 to 4 (default is 0).
  585. // If SSDs are not attached, the boot disk is used to store runtime logs and
  586. // [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data.
  587. // If one or more SSDs are attached, this runtime bulk
  588. // data is spread across them, and the boot disk contains only basic
  589. // config and installed binaries.
  590. int32 num_local_ssds = 2 [(google.api.field_behavior) = OPTIONAL];
  591. // Optional. Interface type of local SSDs (default is "scsi").
  592. // Valid values: "scsi" (Small Computer System Interface),
  593. // "nvme" (Non-Volatile Memory Express).
  594. // See [local SSD
  595. // performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance).
  596. string local_ssd_interface = 4 [(google.api.field_behavior) = OPTIONAL];
  597. }
  598. // Specifies an executable to run on a fully configured node and a
  599. // timeout period for executable completion.
  600. message NodeInitializationAction {
  601. // Required. Cloud Storage URI of executable file.
  602. string executable_file = 1 [(google.api.field_behavior) = REQUIRED];
  603. // Optional. Amount of time executable has to complete. Default is
  604. // 10 minutes (see JSON representation of
  605. // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
  606. //
  607. // Cluster creation fails with an explanatory error message (the
  608. // name of the executable that caused the error and the exceeded timeout
  609. // period) if the executable is not completed at end of the timeout period.
  610. google.protobuf.Duration execution_timeout = 2 [(google.api.field_behavior) = OPTIONAL];
  611. }
  612. // The status of a cluster and its instances.
  613. message ClusterStatus {
  614. // The cluster state.
  615. enum State {
  616. // The cluster state is unknown.
  617. UNKNOWN = 0;
  618. // The cluster is being created and set up. It is not ready for use.
  619. CREATING = 1;
  620. // The cluster is currently running and healthy. It is ready for use.
  621. //
  622. // **Note:** The cluster state changes from "creating" to "running" status
  623. // after the master node(s), first two primary worker nodes (and the last
  624. // primary worker node if primary workers > 2) are running.
  625. RUNNING = 2;
  626. // The cluster encountered an error. It is not ready for use.
  627. ERROR = 3;
  628. // The cluster has encountered an error while being updated. Jobs can
  629. // be submitted to the cluster, but the cluster cannot be updated.
  630. ERROR_DUE_TO_UPDATE = 9;
  631. // The cluster is being deleted. It cannot be used.
  632. DELETING = 4;
  633. // The cluster is being updated. It continues to accept and process jobs.
  634. UPDATING = 5;
  635. // The cluster is being stopped. It cannot be used.
  636. STOPPING = 6;
  637. // The cluster is currently stopped. It is not ready for use.
  638. STOPPED = 7;
  639. // The cluster is being started. It is not ready for use.
  640. STARTING = 8;
  641. }
  642. // The cluster substate.
  643. enum Substate {
  644. // The cluster substate is unknown.
  645. UNSPECIFIED = 0;
  646. // The cluster is known to be in an unhealthy state
  647. // (for example, critical daemons are not running or HDFS capacity is
  648. // exhausted).
  649. //
  650. // Applies to RUNNING state.
  651. UNHEALTHY = 1;
  652. // The agent-reported status is out of date (may occur if
  653. // Dataproc loses communication with Agent).
  654. //
  655. // Applies to RUNNING state.
  656. STALE_STATUS = 2;
  657. }
  658. // Output only. The cluster's state.
  659. State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  660. // Optional. Output only. Details of cluster's state.
  661. string detail = 2 [
  662. (google.api.field_behavior) = OUTPUT_ONLY,
  663. (google.api.field_behavior) = OPTIONAL
  664. ];
  665. // Output only. Time when this state was entered (see JSON representation of
  666. // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
  667. google.protobuf.Timestamp state_start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  668. // Output only. Additional state information that includes
  669. // status reported by the agent.
  670. Substate substate = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  671. }
  672. // Security related configuration, including encryption, Kerberos, etc.
  673. message SecurityConfig {
  674. // Optional. Kerberos related configuration.
  675. KerberosConfig kerberos_config = 1 [(google.api.field_behavior) = OPTIONAL];
  676. // Optional. Identity related configuration, including service account based
  677. // secure multi-tenancy user mappings.
  678. IdentityConfig identity_config = 2 [(google.api.field_behavior) = OPTIONAL];
  679. }
  680. // Specifies Kerberos related configuration.
  681. message KerberosConfig {
  682. // Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set
  683. // this field to true to enable Kerberos on a cluster.
  684. bool enable_kerberos = 1 [(google.api.field_behavior) = OPTIONAL];
  685. // Optional. The Cloud Storage URI of a KMS encrypted file containing the root
  686. // principal password.
  687. string root_principal_password_uri = 2 [(google.api.field_behavior) = OPTIONAL];
  688. // Optional. The uri of the KMS key used to encrypt various sensitive
  689. // files.
  690. string kms_key_uri = 3 [(google.api.field_behavior) = OPTIONAL];
  691. // Optional. The Cloud Storage URI of the keystore file used for SSL
  692. // encryption. If not provided, Dataproc will provide a self-signed
  693. // certificate.
  694. string keystore_uri = 4 [(google.api.field_behavior) = OPTIONAL];
  695. // Optional. The Cloud Storage URI of the truststore file used for SSL
  696. // encryption. If not provided, Dataproc will provide a self-signed
  697. // certificate.
  698. string truststore_uri = 5 [(google.api.field_behavior) = OPTIONAL];
  699. // Optional. The Cloud Storage URI of a KMS encrypted file containing the
  700. // password to the user provided keystore. For the self-signed certificate,
  701. // this password is generated by Dataproc.
  702. string keystore_password_uri = 6 [(google.api.field_behavior) = OPTIONAL];
  703. // Optional. The Cloud Storage URI of a KMS encrypted file containing the
  704. // password to the user provided key. For the self-signed certificate, this
  705. // password is generated by Dataproc.
  706. string key_password_uri = 7 [(google.api.field_behavior) = OPTIONAL];
  707. // Optional. The Cloud Storage URI of a KMS encrypted file containing the
  708. // password to the user provided truststore. For the self-signed certificate,
  709. // this password is generated by Dataproc.
  710. string truststore_password_uri = 8 [(google.api.field_behavior) = OPTIONAL];
  711. // Optional. The remote realm the Dataproc on-cluster KDC will trust, should
  712. // the user enable cross realm trust.
  713. string cross_realm_trust_realm = 9 [(google.api.field_behavior) = OPTIONAL];
  714. // Optional. The KDC (IP or hostname) for the remote trusted realm in a cross
  715. // realm trust relationship.
  716. string cross_realm_trust_kdc = 10 [(google.api.field_behavior) = OPTIONAL];
  717. // Optional. The admin server (IP or hostname) for the remote trusted realm in
  718. // a cross realm trust relationship.
  719. string cross_realm_trust_admin_server = 11 [(google.api.field_behavior) = OPTIONAL];
  720. // Optional. The Cloud Storage URI of a KMS encrypted file containing the
  721. // shared password between the on-cluster Kerberos realm and the remote
  722. // trusted realm, in a cross realm trust relationship.
  723. string cross_realm_trust_shared_password_uri = 12 [(google.api.field_behavior) = OPTIONAL];
  724. // Optional. The Cloud Storage URI of a KMS encrypted file containing the
  725. // master key of the KDC database.
  726. string kdc_db_key_uri = 13 [(google.api.field_behavior) = OPTIONAL];
  727. // Optional. The lifetime of the ticket granting ticket, in hours.
  728. // If not specified, or user specifies 0, then default value 10
  729. // will be used.
  730. int32 tgt_lifetime_hours = 14 [(google.api.field_behavior) = OPTIONAL];
  731. // Optional. The name of the on-cluster Kerberos realm.
  732. // If not specified, the uppercased domain of hostnames will be the realm.
  733. string realm = 15 [(google.api.field_behavior) = OPTIONAL];
  734. }
  735. // Identity related configuration, including service account based
  736. // secure multi-tenancy user mappings.
  737. message IdentityConfig {
  738. // Required. Map of user to service account.
  739. map<string, string> user_service_account_mapping = 1 [(google.api.field_behavior) = REQUIRED];
  740. }
  741. // Specifies the selection and config of software inside the cluster.
  742. message SoftwareConfig {
  743. // Optional. The version of software inside the cluster. It must be one of the
  744. // supported [Dataproc
  745. // Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions),
  746. // such as "1.2" (including a subminor version, such as "1.2.29"), or the
  747. // ["preview"
  748. // version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).
  749. // If unspecified, it defaults to the latest Debian version.
  750. string image_version = 1 [(google.api.field_behavior) = OPTIONAL];
  751. // Optional. The properties to set on daemon config files.
  752. //
  753. // Property keys are specified in `prefix:property` format, for example
  754. // `core:hadoop.tmp.dir`. The following are supported prefixes
  755. // and their mappings:
  756. //
  757. // * capacity-scheduler: `capacity-scheduler.xml`
  758. // * core: `core-site.xml`
  759. // * distcp: `distcp-default.xml`
  760. // * hdfs: `hdfs-site.xml`
  761. // * hive: `hive-site.xml`
  762. // * mapred: `mapred-site.xml`
  763. // * pig: `pig.properties`
  764. // * spark: `spark-defaults.conf`
  765. // * yarn: `yarn-site.xml`
  766. //
  767. // For more information, see [Cluster
  768. // properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
  769. map<string, string> properties = 2 [(google.api.field_behavior) = OPTIONAL];
  770. // Optional. The set of components to activate on the cluster.
  771. repeated Component optional_components = 3 [(google.api.field_behavior) = OPTIONAL];
  772. }
  773. // Specifies the cluster auto-delete schedule configuration.
  774. message LifecycleConfig {
  775. // Optional. The duration to keep the cluster alive while idling (when no jobs
  776. // are running). Passing this threshold will cause the cluster to be
  777. // deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
  778. // representation of
  779. // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
  780. google.protobuf.Duration idle_delete_ttl = 1 [(google.api.field_behavior) = OPTIONAL];
  781. // Either the exact time the cluster should be deleted at or
  782. // the cluster maximum age.
  783. oneof ttl {
  784. // Optional. The time when cluster will be auto-deleted (see JSON representation of
  785. // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
  786. google.protobuf.Timestamp auto_delete_time = 2 [(google.api.field_behavior) = OPTIONAL];
  787. // Optional. The lifetime duration of cluster. The cluster will be
  788. // auto-deleted at the end of this period. Minimum value is 10 minutes;
  789. // maximum value is 14 days (see JSON representation of
  790. // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
  791. google.protobuf.Duration auto_delete_ttl = 3 [(google.api.field_behavior) = OPTIONAL];
  792. }
  793. // Output only. The time when cluster became idle (most recent job finished)
  794. // and became eligible for deletion due to idleness (see JSON representation
  795. // of
  796. // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
  797. google.protobuf.Timestamp idle_start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  798. }
  799. // Specifies a Metastore configuration.
  800. message MetastoreConfig {
  801. // Required. Resource name of an existing Dataproc Metastore service.
  802. //
  803. // Example:
  804. //
  805. // * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]`
  806. string dataproc_metastore_service = 1 [
  807. (google.api.field_behavior) = REQUIRED,
  808. (google.api.resource_reference) = {
  809. type: "metastore.googleapis.com/Service"
  810. }
  811. ];
  812. }
  813. // Dataproc metric config.
  814. message DataprocMetricConfig {
  815. // A source for the collection of Dataproc OSS metrics (see [available OSS
  816. // metrics]
  817. // (https://cloud.google.com//dataproc/docs/guides/monitoring#available_oss_metrics)).
  818. enum MetricSource {
  819. // Required unspecified metric source.
  820. METRIC_SOURCE_UNSPECIFIED = 0;
  821. // Default monitoring agent metrics. If this source is enabled,
  822. // Dataproc enables the monitoring agent in Compute Engine,
  823. // and collects default monitoring agent metrics, which are published
  824. // with an `agent.googleapis.com` prefix.
  825. MONITORING_AGENT_DEFAULTS = 1;
  826. // HDFS metric source.
  827. HDFS = 2;
  828. // Spark metric source.
  829. SPARK = 3;
  830. // YARN metric source.
  831. YARN = 4;
  832. // Spark History Server metric source.
  833. SPARK_HISTORY_SERVER = 5;
  834. // Hiveserver2 metric source.
  835. HIVESERVER2 = 6;
  836. }
  837. // A Dataproc OSS metric.
  838. message Metric {
  839. // Required. Default metrics are collected unless `metricOverrides` are
  840. // specified for the metric source (see [Available OSS metrics]
  841. // (https://cloud.google.com/dataproc/docs/guides/monitoring#available_oss_metrics)
  842. // for more information).
  843. MetricSource metric_source = 1 [(google.api.field_behavior) = REQUIRED];
  844. // Optional. Specify one or more [available OSS metrics]
  845. // (https://cloud.google.com/dataproc/docs/guides/monitoring#available_oss_metrics)
  846. // to collect for the metric course (for the `SPARK` metric source, any
  847. // [Spark metric]
  848. // (https://spark.apache.org/docs/latest/monitoring.html#metrics) can be
  849. // specified).
  850. //
  851. // Provide metrics in the following format:
  852. // <code><var>METRIC_SOURCE</var>:<var>INSTANCE</var>:<var>GROUP</var>:<var>METRIC</var></code>
  853. // Use camelcase as appropriate.
  854. //
  855. // Examples:
  856. //
  857. // ```
  858. // yarn:ResourceManager:QueueMetrics:AppsCompleted
  859. // spark:driver:DAGScheduler:job.allJobs
  860. // sparkHistoryServer:JVM:Memory:NonHeapMemoryUsage.committed
  861. // hiveserver2:JVM:Memory:NonHeapMemoryUsage.used
  862. // ```
  863. //
  864. // Notes:
  865. //
  866. // * Only the specified overridden metrics will be collected for the
  867. // metric source. For example, if one or more `spark:executive` metrics
  868. // are listed as metric overrides, other `SPARK` metrics will not be
  869. // collected. The collection of the default metrics for other OSS metric
  870. // sources is unaffected. For example, if both `SPARK` andd `YARN` metric
  871. // sources are enabled, and overrides are provided for Spark metrics only,
  872. // all default YARN metrics will be collected.
  873. repeated string metric_overrides = 2 [(google.api.field_behavior) = OPTIONAL];
  874. }
  875. // Required. Metrics sources to enable.
  876. repeated Metric metrics = 1 [(google.api.field_behavior) = REQUIRED];
  877. }
  878. // Contains cluster daemon metrics, such as HDFS and YARN stats.
  879. //
  880. // **Beta Feature**: This report is available for testing purposes only. It may
  881. // be changed before final release.
  882. message ClusterMetrics {
  883. // The HDFS metrics.
  884. map<string, int64> hdfs_metrics = 1;
  885. // The YARN metrics.
  886. map<string, int64> yarn_metrics = 2;
  887. }
  888. // A request to create a cluster.
  889. message CreateClusterRequest {
  890. // Required. The ID of the Google Cloud Platform project that the cluster
  891. // belongs to.
  892. string project_id = 1 [(google.api.field_behavior) = REQUIRED];
  893. // Required. The Dataproc region in which to handle the request.
  894. string region = 3 [(google.api.field_behavior) = REQUIRED];
  895. // Required. The cluster to create.
  896. Cluster cluster = 2 [(google.api.field_behavior) = REQUIRED];
  897. // Optional. A unique ID used to identify the request. If the server receives two
  898. // [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
  899. // with the same id, then the second request will be ignored and the
  900. // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
  901. // is returned.
  902. //
  903. // It is recommended to always set this value to a
  904. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
  905. //
  906. // The ID must contain only letters (a-z, A-Z), numbers (0-9),
  907. // underscores (_), and hyphens (-). The maximum length is 40 characters.
  908. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  909. // Optional. Failure action when primary worker creation fails.
  910. FailureAction action_on_failed_primary_workers = 5 [(google.api.field_behavior) = OPTIONAL];
  911. }
  912. // A request to update a cluster.
  913. message UpdateClusterRequest {
  914. // Required. The ID of the Google Cloud Platform project the
  915. // cluster belongs to.
  916. string project_id = 1 [(google.api.field_behavior) = REQUIRED];
  917. // Required. The Dataproc region in which to handle the request.
  918. string region = 5 [(google.api.field_behavior) = REQUIRED];
  919. // Required. The cluster name.
  920. string cluster_name = 2 [(google.api.field_behavior) = REQUIRED];
  921. // Required. The changes to the cluster.
  922. Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED];
  923. // Optional. Timeout for graceful YARN decomissioning. Graceful
  924. // decommissioning allows removing nodes from the cluster without
  925. // interrupting jobs in progress. Timeout specifies how long to wait for jobs
  926. // in progress to finish before forcefully removing nodes (and potentially
  927. // interrupting jobs). Default timeout is 0 (for forceful decommission), and
  928. // the maximum allowed timeout is 1 day. (see JSON representation of
  929. // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
  930. //
  931. // Only supported on Dataproc image versions 1.2 and higher.
  932. google.protobuf.Duration graceful_decommission_timeout = 6 [(google.api.field_behavior) = OPTIONAL];
  933. // Required. Specifies the path, relative to `Cluster`, of
  934. // the field to update. For example, to change the number of workers
  935. // in a cluster to 5, the `update_mask` parameter would be
  936. // specified as `config.worker_config.num_instances`,
  937. // and the `PATCH` request body would specify the new value, as follows:
  938. //
  939. // {
  940. // "config":{
  941. // "workerConfig":{
  942. // "numInstances":"5"
  943. // }
  944. // }
  945. // }
  946. // Similarly, to change the number of preemptible workers in a cluster to 5,
  947. // the `update_mask` parameter would be
  948. // `config.secondary_worker_config.num_instances`, and the `PATCH` request
  949. // body would be set as follows:
  950. //
  951. // {
  952. // "config":{
  953. // "secondaryWorkerConfig":{
  954. // "numInstances":"5"
  955. // }
  956. // }
  957. // }
  958. // <strong>Note:</strong> Currently, only the following fields can be updated:
  959. //
  960. // <table>
  961. // <tbody>
  962. // <tr>
  963. // <td><strong>Mask</strong></td>
  964. // <td><strong>Purpose</strong></td>
  965. // </tr>
  966. // <tr>
  967. // <td><strong><em>labels</em></strong></td>
  968. // <td>Update labels</td>
  969. // </tr>
  970. // <tr>
  971. // <td><strong><em>config.worker_config.num_instances</em></strong></td>
  972. // <td>Resize primary worker group</td>
  973. // </tr>
  974. // <tr>
  975. // <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
  976. // <td>Resize secondary worker group</td>
  977. // </tr>
  978. // <tr>
  979. // <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
  980. // change autoscaling policies</td>
  981. // </tr>
  982. // </tbody>
  983. // </table>
  984. google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED];
  985. // Optional. A unique ID used to identify the request. If the server
  986. // receives two
  987. // [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s
  988. // with the same id, then the second request will be ignored and the
  989. // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
  990. // backend is returned.
  991. //
  992. // It is recommended to always set this value to a
  993. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
  994. //
  995. // The ID must contain only letters (a-z, A-Z), numbers (0-9),
  996. // underscores (_), and hyphens (-). The maximum length is 40 characters.
  997. string request_id = 7 [(google.api.field_behavior) = OPTIONAL];
  998. }
  999. // A request to stop a cluster.
  1000. message StopClusterRequest {
  1001. // Required. The ID of the Google Cloud Platform project the
  1002. // cluster belongs to.
  1003. string project_id = 1 [(google.api.field_behavior) = REQUIRED];
  1004. // Required. The Dataproc region in which to handle the request.
  1005. string region = 2 [(google.api.field_behavior) = REQUIRED];
  1006. // Required. The cluster name.
  1007. string cluster_name = 3 [(google.api.field_behavior) = REQUIRED];
  1008. // Optional. Specifying the `cluster_uuid` means the RPC will fail
  1009. // (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
  1010. string cluster_uuid = 4 [(google.api.field_behavior) = OPTIONAL];
  1011. // Optional. A unique ID used to identify the request. If the server
  1012. // receives two
  1013. // [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s
  1014. // with the same id, then the second request will be ignored and the
  1015. // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
  1016. // backend is returned.
  1017. //
  1018. // Recommendation: Set this value to a
  1019. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
  1020. //
  1021. // The ID must contain only letters (a-z, A-Z), numbers (0-9),
  1022. // underscores (_), and hyphens (-). The maximum length is 40 characters.
  1023. string request_id = 5 [(google.api.field_behavior) = OPTIONAL];
  1024. }
  1025. // A request to start a cluster.
  1026. message StartClusterRequest {
  1027. // Required. The ID of the Google Cloud Platform project the
  1028. // cluster belongs to.
  1029. string project_id = 1 [(google.api.field_behavior) = REQUIRED];
  1030. // Required. The Dataproc region in which to handle the request.
  1031. string region = 2 [(google.api.field_behavior) = REQUIRED];
  1032. // Required. The cluster name.
  1033. string cluster_name = 3 [(google.api.field_behavior) = REQUIRED];
  1034. // Optional. Specifying the `cluster_uuid` means the RPC will fail
  1035. // (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
  1036. string cluster_uuid = 4 [(google.api.field_behavior) = OPTIONAL];
  1037. // Optional. A unique ID used to identify the request. If the server
  1038. // receives two
  1039. // [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s
  1040. // with the same id, then the second request will be ignored and the
  1041. // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
  1042. // backend is returned.
  1043. //
  1044. // Recommendation: Set this value to a
  1045. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
  1046. //
  1047. // The ID must contain only letters (a-z, A-Z), numbers (0-9),
  1048. // underscores (_), and hyphens (-). The maximum length is 40 characters.
  1049. string request_id = 5 [(google.api.field_behavior) = OPTIONAL];
  1050. }
  1051. // A request to delete a cluster.
  1052. message DeleteClusterRequest {
  1053. // Required. The ID of the Google Cloud Platform project that the cluster
  1054. // belongs to.
  1055. string project_id = 1 [(google.api.field_behavior) = REQUIRED];
  1056. // Required. The Dataproc region in which to handle the request.
  1057. string region = 3 [(google.api.field_behavior) = REQUIRED];
  1058. // Required. The cluster name.
  1059. string cluster_name = 2 [(google.api.field_behavior) = REQUIRED];
  1060. // Optional. Specifying the `cluster_uuid` means the RPC should fail
  1061. // (with error NOT_FOUND) if cluster with specified UUID does not exist.
  1062. string cluster_uuid = 4 [(google.api.field_behavior) = OPTIONAL];
  1063. // Optional. A unique ID used to identify the request. If the server
  1064. // receives two
  1065. // [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s
  1066. // with the same id, then the second request will be ignored and the
  1067. // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
  1068. // backend is returned.
  1069. //
  1070. // It is recommended to always set this value to a
  1071. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
  1072. //
  1073. // The ID must contain only letters (a-z, A-Z), numbers (0-9),
  1074. // underscores (_), and hyphens (-). The maximum length is 40 characters.
  1075. string request_id = 5 [(google.api.field_behavior) = OPTIONAL];
  1076. }
  1077. // Request to get the resource representation for a cluster in a project.
  1078. message GetClusterRequest {
  1079. // Required. The ID of the Google Cloud Platform project that the cluster
  1080. // belongs to.
  1081. string project_id = 1 [(google.api.field_behavior) = REQUIRED];
  1082. // Required. The Dataproc region in which to handle the request.
  1083. string region = 3 [(google.api.field_behavior) = REQUIRED];
  1084. // Required. The cluster name.
  1085. string cluster_name = 2 [(google.api.field_behavior) = REQUIRED];
  1086. }
  1087. // A request to list the clusters in a project.
  1088. message ListClustersRequest {
  1089. // Required. The ID of the Google Cloud Platform project that the cluster
  1090. // belongs to.
  1091. string project_id = 1 [(google.api.field_behavior) = REQUIRED];
  1092. // Required. The Dataproc region in which to handle the request.
  1093. string region = 4 [(google.api.field_behavior) = REQUIRED];
  1094. // Optional. A filter constraining the clusters to list. Filters are
  1095. // case-sensitive and have the following syntax:
  1096. //
  1097. // field = value [AND [field = value]] ...
  1098. //
  1099. // where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
  1100. // and `[KEY]` is a label key. **value** can be `*` to match all values.
  1101. // `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
  1102. // `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
  1103. // contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
  1104. // contains the `DELETING` and `ERROR` states.
  1105. // `clusterName` is the name of the cluster provided at creation time.
  1106. // Only the logical `AND` operator is supported; space-separated items are
  1107. // treated as having an implicit `AND` operator.
  1108. //
  1109. // Example filter:
  1110. //
  1111. // status.state = ACTIVE AND clusterName = mycluster
  1112. // AND labels.env = staging AND labels.starred = *
  1113. string filter = 5 [(google.api.field_behavior) = OPTIONAL];
  1114. // Optional. The standard List page size.
  1115. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  1116. // Optional. The standard List page token.
  1117. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  1118. }
  1119. // The list of all clusters in a project.
  1120. message ListClustersResponse {
  1121. // Output only. The clusters in the project.
  1122. repeated Cluster clusters = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  1123. // Output only. This token is included in the response if there are more
  1124. // results to fetch. To fetch additional results, provide this value as the
  1125. // `page_token` in a subsequent `ListClustersRequest`.
  1126. string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1127. }
  1128. // A request to collect cluster diagnostic information.
  1129. message DiagnoseClusterRequest {
  1130. // Required. The ID of the Google Cloud Platform project that the cluster
  1131. // belongs to.
  1132. string project_id = 1 [(google.api.field_behavior) = REQUIRED];
  1133. // Required. The Dataproc region in which to handle the request.
  1134. string region = 3 [(google.api.field_behavior) = REQUIRED];
  1135. // Required. The cluster name.
  1136. string cluster_name = 2 [(google.api.field_behavior) = REQUIRED];
  1137. }
  1138. // The location of diagnostic output.
  1139. message DiagnoseClusterResults {
  1140. // Output only. The Cloud Storage URI of the diagnostic output.
  1141. // The output report is a plain text file with a summary of collected
  1142. // diagnostics.
  1143. string output_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  1144. }
  1145. // Reservation Affinity for consuming Zonal reservation.
  1146. message ReservationAffinity {
  1147. // Indicates whether to consume capacity from an reservation or not.
  1148. enum Type {
  1149. TYPE_UNSPECIFIED = 0;
  1150. // Do not consume from any allocated capacity.
  1151. NO_RESERVATION = 1;
  1152. // Consume any reservation available.
  1153. ANY_RESERVATION = 2;
  1154. // Must consume from a specific reservation. Must specify key value fields
  1155. // for specifying the reservations.
  1156. SPECIFIC_RESERVATION = 3;
  1157. }
  1158. // Optional. Type of reservation to consume
  1159. Type consume_reservation_type = 1 [(google.api.field_behavior) = OPTIONAL];
  1160. // Optional. Corresponds to the label key of reservation resource.
  1161. string key = 2 [(google.api.field_behavior) = OPTIONAL];
  1162. // Optional. Corresponds to the label values of reservation resource.
  1163. repeated string values = 3 [(google.api.field_behavior) = OPTIONAL];
  1164. }