diff --git a/.librarian/state.yaml b/.librarian/state.yaml index 848b49f3e95e..62ea29ea2636 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -1531,7 +1531,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-dataproc version: 5.26.0 - last_generated_commit: 1133adb136f742df62864f1d9d307df25d451880 + last_generated_commit: 38ed7d6ba66a774924722146f054d12b4487a89f apis: - path: google/cloud/dataproc/v1 service_config: dataproc_v1.yaml diff --git a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/types/clusters.py b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/types/clusters.py index 9bcb49877f98..5009e878f53b 100644 --- a/packages/google-cloud-dataproc/google/cloud/dataproc_v1/types/clusters.py +++ b/packages/google-cloud-dataproc/google/cloud/dataproc_v1/types/clusters.py @@ -183,6 +183,8 @@ class ClusterConfig(proto.Message): Optional. The type of the cluster. cluster_tier (google.cloud.dataproc_v1.types.ClusterConfig.ClusterTier): Optional. The cluster tier. + engine (google.cloud.dataproc_v1.types.ClusterConfig.Engine): + Optional. The cluster engine. config_bucket (str): Optional. A Cloud Storage bucket used to stage job dependencies, config files, and job driver console output. @@ -300,6 +302,23 @@ class ClusterTier(proto.Enum): CLUSTER_TIER_STANDARD = 1 CLUSTER_TIER_PREMIUM = 2 + class Engine(proto.Enum): + r"""The cluster engine. + + Values: + ENGINE_UNSPECIFIED (0): + The engine is not specified. Works the same as + ENGINE_DEFAULT. + DEFAULT (1): + The cluster is a default engine cluster. + LIGHTNING (2): + The cluster is a lightning engine cluster. + """ + + ENGINE_UNSPECIFIED = 0 + DEFAULT = 1 + LIGHTNING = 2 + cluster_type: ClusterType = proto.Field( proto.ENUM, number=27, @@ -310,6 +329,11 @@ class ClusterTier(proto.Enum): number=29, enum=ClusterTier, ) + engine: Engine = proto.Field( + proto.ENUM, + number=30, + enum=Engine, + ) config_bucket: str = proto.Field( proto.STRING, number=1, @@ -1911,6 +1935,28 @@ class LifecycleConfig(proto.Message): `Duration `__). This field is a member of `oneof`_ ``ttl``. + idle_stop_ttl (google.protobuf.duration_pb2.Duration): + Optional. The duration to keep the cluster started while + idling (when no jobs are running). Passing this threshold + will cause the cluster to be stopped. Minimum value is 5 + minutes; maximum value is 14 days (see JSON representation + of + `Duration `__). + auto_stop_time (google.protobuf.timestamp_pb2.Timestamp): + Optional. The time when cluster will be auto-stopped (see + JSON representation of + `Timestamp `__). + + This field is a member of `oneof`_ ``stop_ttl``. + auto_stop_ttl (google.protobuf.duration_pb2.Duration): + Optional. The lifetime duration of the cluster. The cluster + will be auto-stopped at the end of this period, calculated + from the time of submission of the create or update cluster + request. Minimum value is 10 minutes; maximum value is 14 + days (see JSON representation of + `Duration `__). + + This field is a member of `oneof`_ ``stop_ttl``. idle_start_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The time when cluster became idle (most recent job finished) and became eligible for deletion due to @@ -1935,6 +1981,23 @@ class LifecycleConfig(proto.Message): oneof="ttl", message=duration_pb2.Duration, ) + idle_stop_ttl: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=5, + message=duration_pb2.Duration, + ) + auto_stop_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=6, + oneof="stop_ttl", + message=timestamp_pb2.Timestamp, + ) + auto_stop_ttl: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=7, + oneof="stop_ttl", + message=duration_pb2.Duration, + ) idle_start_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=4, diff --git a/packages/google-cloud-dataproc/tests/unit/gapic/dataproc_v1/test_cluster_controller.py b/packages/google-cloud-dataproc/tests/unit/gapic/dataproc_v1/test_cluster_controller.py index 0a2dac31711f..8e8667d97398 100644 --- a/packages/google-cloud-dataproc/tests/unit/gapic/dataproc_v1/test_cluster_controller.py +++ b/packages/google-cloud-dataproc/tests/unit/gapic/dataproc_v1/test_cluster_controller.py @@ -6369,6 +6369,7 @@ def test_create_cluster_rest_call_success(request_type): "config": { "cluster_type": 1, "cluster_tier": 1, + "engine": 1, "config_bucket": "config_bucket_value", "temp_bucket": "temp_bucket_value", "gce_cluster_config": { @@ -6495,6 +6496,9 @@ def test_create_cluster_rest_call_success(request_type): "idle_delete_ttl": {}, "auto_delete_time": {"seconds": 751, "nanos": 543}, "auto_delete_ttl": {}, + "idle_stop_ttl": {}, + "auto_stop_time": {}, + "auto_stop_ttl": {}, "idle_start_time": {}, }, "endpoint_config": {"http_ports": {}, "enable_http_port_access": True}, @@ -6785,6 +6789,7 @@ def test_update_cluster_rest_call_success(request_type): "config": { "cluster_type": 1, "cluster_tier": 1, + "engine": 1, "config_bucket": "config_bucket_value", "temp_bucket": "temp_bucket_value", "gce_cluster_config": { @@ -6911,6 +6916,9 @@ def test_update_cluster_rest_call_success(request_type): "idle_delete_ttl": {}, "auto_delete_time": {"seconds": 751, "nanos": 543}, "auto_delete_ttl": {}, + "idle_stop_ttl": {}, + "auto_stop_time": {}, + "auto_stop_ttl": {}, "idle_start_time": {}, }, "endpoint_config": {"http_ports": {}, "enable_http_port_access": True}, diff --git a/packages/google-cloud-dataproc/tests/unit/gapic/dataproc_v1/test_workflow_template_service.py b/packages/google-cloud-dataproc/tests/unit/gapic/dataproc_v1/test_workflow_template_service.py index 96a8e65f7cc7..beec77f228bf 100644 --- a/packages/google-cloud-dataproc/tests/unit/gapic/dataproc_v1/test_workflow_template_service.py +++ b/packages/google-cloud-dataproc/tests/unit/gapic/dataproc_v1/test_workflow_template_service.py @@ -5994,6 +5994,7 @@ def test_create_workflow_template_rest_call_success(request_type): "config": { "cluster_type": 1, "cluster_tier": 1, + "engine": 1, "config_bucket": "config_bucket_value", "temp_bucket": "temp_bucket_value", "gce_cluster_config": { @@ -6127,6 +6128,9 @@ def test_create_workflow_template_rest_call_success(request_type): "idle_delete_ttl": {}, "auto_delete_time": {}, "auto_delete_ttl": {}, + "idle_stop_ttl": {}, + "auto_stop_time": {}, + "auto_stop_ttl": {}, "idle_start_time": {}, }, "endpoint_config": { @@ -6786,6 +6790,7 @@ def test_instantiate_inline_workflow_template_rest_call_success(request_type): "config": { "cluster_type": 1, "cluster_tier": 1, + "engine": 1, "config_bucket": "config_bucket_value", "temp_bucket": "temp_bucket_value", "gce_cluster_config": { @@ -6919,6 +6924,9 @@ def test_instantiate_inline_workflow_template_rest_call_success(request_type): "idle_delete_ttl": {}, "auto_delete_time": {}, "auto_delete_ttl": {}, + "idle_stop_ttl": {}, + "auto_stop_time": {}, + "auto_stop_ttl": {}, "idle_start_time": {}, }, "endpoint_config": { @@ -7296,6 +7304,7 @@ def test_update_workflow_template_rest_call_success(request_type): "config": { "cluster_type": 1, "cluster_tier": 1, + "engine": 1, "config_bucket": "config_bucket_value", "temp_bucket": "temp_bucket_value", "gce_cluster_config": { @@ -7429,6 +7438,9 @@ def test_update_workflow_template_rest_call_success(request_type): "idle_delete_ttl": {}, "auto_delete_time": {}, "auto_delete_ttl": {}, + "idle_stop_ttl": {}, + "auto_stop_time": {}, + "auto_stop_ttl": {}, "idle_start_time": {}, }, "endpoint_config": {