1
- // Copyright 2019 Google LLC.
1
+ // Copyright 2020 Google LLC
2
2
//
3
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
4
// you may not use this file except in compliance with the License.
11
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
- //
15
14
16
15
syntax = "proto3" ;
17
16
@@ -20,7 +19,6 @@ package google.cloud.dataproc.v1;
20
19
import "google/api/annotations.proto" ;
21
20
import "google/api/client.proto" ;
22
21
import "google/api/field_behavior.proto" ;
23
- import "google/cloud/dataproc/v1/operations.proto" ;
24
22
import "google/cloud/dataproc/v1/shared.proto" ;
25
23
import "google/longrunning/operations.proto" ;
26
24
import "google/protobuf/duration.proto" ;
@@ -40,7 +38,7 @@ service ClusterController {
40
38
41
39
// Creates a cluster in a project. The returned
42
40
// [Operation.metadata][google.longrunning.Operation.metadata] will be
43
- // [ClusterOperationMetadata](/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
41
+ // [ClusterOperationMetadata](https://cloud.google.com /dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
44
42
rpc CreateCluster (CreateClusterRequest ) returns (google .longrunning .Operation ) {
45
43
option (google.api.http ) = {
46
44
post : "/v1/projects/{project_id}/regions/{region}/clusters"
@@ -55,22 +53,22 @@ service ClusterController {
55
53
56
54
// Updates a cluster in a project. The returned
57
55
// [Operation.metadata][google.longrunning.Operation.metadata] will be
58
- // [ClusterOperationMetadata](/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
56
+ // [ClusterOperationMetadata](https://cloud.google.com /dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
59
57
rpc UpdateCluster (UpdateClusterRequest ) returns (google .longrunning .Operation ) {
60
58
option (google.api.http ) = {
61
59
patch : "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}"
62
60
body : "cluster"
63
61
};
62
+ option (google.api.method_signature ) = "project_id,region,cluster_name,cluster,update_mask" ;
64
63
option (google.longrunning.operation_info ) = {
65
64
response_type : "Cluster"
66
65
metadata_type : "google.cloud.dataproc.v1.ClusterOperationMetadata"
67
66
};
68
- option (google.api.method_signature ) = "project_id,region,cluster_name,cluster,update_mask" ;
69
67
}
70
68
71
69
// Deletes a cluster in a project. The returned
72
70
// [Operation.metadata][google.longrunning.Operation.metadata] will be
73
- // [ClusterOperationMetadata](/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
71
+ // [ClusterOperationMetadata](https://cloud.google.com /dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
74
72
rpc DeleteCluster (DeleteClusterRequest ) returns (google .longrunning .Operation ) {
75
73
option (google.api.http ) = {
76
74
delete : "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}"
@@ -101,11 +99,11 @@ service ClusterController {
101
99
102
100
// Gets cluster diagnostic information. The returned
103
101
// [Operation.metadata][google.longrunning.Operation.metadata] will be
104
- // [ClusterOperationMetadata](/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
102
+ // [ClusterOperationMetadata](https://cloud.google.com /dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
105
103
// After the operation completes,
106
104
// [Operation.response][google.longrunning.Operation.response]
107
105
// contains
108
- // [DiagnoseClusterResults](/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults).
106
+ // [DiagnoseClusterResults](https://cloud.google.com /dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults).
109
107
rpc DiagnoseCluster (DiagnoseClusterRequest ) returns (google .longrunning .Operation ) {
110
108
option (google.api.http ) = {
111
109
post : "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:diagnose"
@@ -215,6 +213,9 @@ message ClusterConfig {
215
213
216
214
// Optional. Security settings for the cluster.
217
215
SecurityConfig security_config = 16 [(google.api.field_behavior ) = OPTIONAL ];
216
+
217
+ // Optional. Lifecycle setting for the cluster.
218
+ LifecycleConfig lifecycle_config = 17 [(google.api.field_behavior ) = OPTIONAL ];
218
219
}
219
220
220
221
// Autoscaling Policy config associated with the cluster.
@@ -322,9 +323,12 @@ message GceClusterConfig {
322
323
// [Project and instance
323
324
// metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
324
325
map <string , string > metadata = 5 ;
326
+
327
+ // Optional. Reservation Affinity for consuming Zonal reservation.
328
+ ReservationAffinity reservation_affinity = 11 [(google.api.field_behavior ) = OPTIONAL ];
325
329
}
326
330
327
- // Optional. The config settings for Compute Engine resources in
331
+ // The config settings for Compute Engine resources in
328
332
// an instance group, such as a master or worker group.
329
333
message InstanceGroupConfig {
330
334
// Optional. The number of VM instances in the instance group.
@@ -438,7 +442,10 @@ message NodeInitializationAction {
438
442
string executable_file = 1 [(google.api.field_behavior ) = REQUIRED ];
439
443
440
444
// Optional. Amount of time executable has to complete. Default is
441
- // 10 minutes. Cluster creation fails with an explanatory error message (the
445
+ // 10 minutes (see JSON representation of
446
+ // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
447
+ //
448
+ // Cluster creation fails with an explanatory error message (the
442
449
// name of the executable that caused the error and the exceeded timeout
443
450
// period) if the executable is not completed at end of the timeout period.
444
451
google.protobuf.Duration execution_timeout = 2 [(google.api.field_behavior ) = OPTIONAL ];
@@ -495,7 +502,8 @@ message ClusterStatus {
495
502
(google.api.field_behavior ) = OPTIONAL
496
503
];
497
504
498
- // Output only. Time when this state was entered.
505
+ // Output only. Time when this state was entered (see JSON representation of
506
+ // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
499
507
google.protobuf.Timestamp state_start_time = 3 [(google.api.field_behavior ) = OUTPUT_ONLY ];
500
508
501
509
// Output only. Additional state information that includes
@@ -613,6 +621,36 @@ message SoftwareConfig {
613
621
repeated Component optional_components = 3 [(google.api.field_behavior ) = OPTIONAL ];
614
622
}
615
623
624
+ // Specifies the cluster auto-delete schedule configuration.
625
+ message LifecycleConfig {
626
+ // Optional. The duration to keep the cluster alive while idling (when no jobs
627
+ // are running). Passing this threshold will cause the cluster to be
628
+ // deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON
629
+ // representation of
630
+ // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
631
+ google.protobuf.Duration idle_delete_ttl = 1 [(google.api.field_behavior ) = OPTIONAL ];
632
+
633
+ // Either the exact time the cluster should be deleted at or
634
+ // the cluster maximum age.
635
+ oneof ttl {
636
+ // Optional. The time when cluster will be auto-deleted (see JSON representation of
637
+ // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
638
+ google.protobuf.Timestamp auto_delete_time = 2 [(google.api.field_behavior ) = OPTIONAL ];
639
+
640
+ // Optional. The lifetime duration of cluster. The cluster will be
641
+ // auto-deleted at the end of this period. Minimum value is 10 minutes;
642
+ // maximum value is 14 days (see JSON representation of
643
+ // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
644
+ google.protobuf.Duration auto_delete_ttl = 3 [(google.api.field_behavior ) = OPTIONAL ];
645
+ }
646
+
647
+ // Output only. The time when cluster became idle (most recent job finished)
648
+ // and became eligible for deletion due to idleness (see JSON representation
649
+ // of
650
+ // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
651
+ google.protobuf.Timestamp idle_start_time = 4 [(google.api.field_behavior ) = OUTPUT_ONLY ];
652
+ }
653
+
616
654
// Contains cluster daemon metrics, such as HDFS and YARN stats.
617
655
//
618
656
// **Beta Feature**: This report is available for testing purposes only. It may
@@ -671,7 +709,8 @@ message UpdateClusterRequest {
671
709
// interrupting jobs in progress. Timeout specifies how long to wait for jobs
672
710
// in progress to finish before forcefully removing nodes (and potentially
673
711
// interrupting jobs). Default timeout is 0 (for forceful decommission), and
674
- // the maximum allowed timeout is 1 day.
712
+ // the maximum allowed timeout is 1 day. (see JSON representation of
713
+ // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
675
714
//
676
715
// Only supported on Dataproc image versions 1.2 and higher.
677
716
google.protobuf.Duration graceful_decommission_timeout = 6 [(google.api.field_behavior ) = OPTIONAL ];
@@ -854,3 +893,30 @@ message DiagnoseClusterResults {
854
893
// diagnostics.
855
894
string output_uri = 1 [(google.api.field_behavior ) = OUTPUT_ONLY ];
856
895
}
896
+
897
+ // Reservation Affinity for consuming Zonal reservation.
898
+ message ReservationAffinity {
899
+ // Indicates whether to consume capacity from an reservation or not.
900
+ enum Type {
901
+ TYPE_UNSPECIFIED = 0 ;
902
+
903
+ // Do not consume from any allocated capacity.
904
+ NO_RESERVATION = 1 ;
905
+
906
+ // Consume any reservation available.
907
+ ANY_RESERVATION = 2 ;
908
+
909
+ // Must consume from a specific reservation. Must specify key value fields
910
+ // for specifying the reservations.
911
+ SPECIFIC_RESERVATION = 3 ;
912
+ }
913
+
914
+ // Optional. Type of reservation to consume
915
+ Type consume_reservation_type = 1 [(google.api.field_behavior ) = OPTIONAL ];
916
+
917
+ // Optional. Corresponds to the label key of reservation resource.
918
+ string key = 2 [(google.api.field_behavior ) = OPTIONAL ];
919
+
920
+ // Optional. Corresponds to the label values of reservation resource.
921
+ repeated string values = 3 [(google.api.field_behavior ) = OPTIONAL ];
922
+ }
0 commit comments