Skip to content

Commit 5a27ea2

Browse files
feat: [google-cloud-dataproc] Add cluster_tier to support creating premium clusters (#14047)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 776861070 Source-Link: googleapis/googleapis@ea37c68 Source-Link: googleapis/googleapis-gen@cbf711c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFwcm9jLy5Pd2xCb3QueWFtbCIsImgiOiJjYmY3MTFjMDQ2NTIyNGRjNTBhNDBlMDczZGUzZGVkMjVkNGRlODAyIn0= --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 975b921 commit 5a27ea2

File tree

6 files changed

+30
-3
lines changed

6 files changed

+30
-3
lines changed

packages/google-cloud-dataproc/google/cloud/dataproc/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "5.20.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-dataproc/google/cloud/dataproc_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "5.20.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-dataproc/google/cloud/dataproc_v1/types/clusters.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ class ClusterConfig(proto.Message):
179179
r"""The cluster config.
180180
181181
Attributes:
182+
cluster_tier (google.cloud.dataproc_v1.types.ClusterConfig.ClusterTier):
183+
Optional. The cluster tier.
182184
config_bucket (str):
183185
Optional. A Cloud Storage bucket used to stage job
184186
dependencies, config files, and job driver console output.
@@ -258,6 +260,26 @@ class ClusterConfig(proto.Message):
258260
Optional. The node group settings.
259261
"""
260262

263+
class ClusterTier(proto.Enum):
264+
r"""The cluster tier.
265+
266+
Values:
267+
CLUSTER_TIER_UNSPECIFIED (0):
268+
Not set. Works the same as CLUSTER_TIER_STANDARD.
269+
CLUSTER_TIER_STANDARD (1):
270+
Standard Dataproc cluster.
271+
CLUSTER_TIER_PREMIUM (2):
272+
Premium Dataproc cluster.
273+
"""
274+
CLUSTER_TIER_UNSPECIFIED = 0
275+
CLUSTER_TIER_STANDARD = 1
276+
CLUSTER_TIER_PREMIUM = 2
277+
278+
cluster_tier: ClusterTier = proto.Field(
279+
proto.ENUM,
280+
number=29,
281+
enum=ClusterTier,
282+
)
261283
config_bucket: str = proto.Field(
262284
proto.STRING,
263285
number=1,

packages/google-cloud-dataproc/samples/generated_samples/snippet_metadata_google.cloud.dataproc.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-dataproc",
11-
"version": "5.20.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-dataproc/tests/unit/gapic/dataproc_v1/test_cluster_controller.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6166,6 +6166,7 @@ def test_create_cluster_rest_call_success(request_type):
61666166
"project_id": "project_id_value",
61676167
"cluster_name": "cluster_name_value",
61686168
"config": {
6169+
"cluster_tier": 1,
61696170
"config_bucket": "config_bucket_value",
61706171
"temp_bucket": "temp_bucket_value",
61716172
"gce_cluster_config": {
@@ -6577,6 +6578,7 @@ def test_update_cluster_rest_call_success(request_type):
65776578
"project_id": "project_id_value",
65786579
"cluster_name": "cluster_name_value",
65796580
"config": {
6581+
"cluster_tier": 1,
65806582
"config_bucket": "config_bucket_value",
65816583
"temp_bucket": "temp_bucket_value",
65826584
"gce_cluster_config": {

packages/google-cloud-dataproc/tests/unit/gapic/dataproc_v1/test_workflow_template_service.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5789,6 +5789,7 @@ def test_create_workflow_template_rest_call_success(request_type):
57895789
"managed_cluster": {
57905790
"cluster_name": "cluster_name_value",
57915791
"config": {
5792+
"cluster_tier": 1,
57925793
"config_bucket": "config_bucket_value",
57935794
"temp_bucket": "temp_bucket_value",
57945795
"gce_cluster_config": {
@@ -6569,6 +6570,7 @@ def test_instantiate_inline_workflow_template_rest_call_success(request_type):
65696570
"managed_cluster": {
65706571
"cluster_name": "cluster_name_value",
65716572
"config": {
6573+
"cluster_tier": 1,
65726574
"config_bucket": "config_bucket_value",
65736575
"temp_bucket": "temp_bucket_value",
65746576
"gce_cluster_config": {
@@ -7075,6 +7077,7 @@ def test_update_workflow_template_rest_call_success(request_type):
70757077
"managed_cluster": {
70767078
"cluster_name": "cluster_name_value",
70777079
"config": {
7080+
"cluster_tier": 1,
70787081
"config_bucket": "config_bucket_value",
70797082
"temp_bucket": "temp_bucket_value",
70807083
"gce_cluster_config": {

0 commit comments

Comments
 (0)