source: vendor/google/apiclient-services/src/Dataproc/Resource/ProjectsRegionsClustersNodeGroups.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 12 days ago

Upload new project files

  • Property mode set to 100644
File size: 5.2 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Dataproc\Resource;
19
20use Google\Service\Dataproc\NodeGroup;
21use Google\Service\Dataproc\Operation;
22use Google\Service\Dataproc\RepairNodeGroupRequest;
23use Google\Service\Dataproc\ResizeNodeGroupRequest;
24
25/**
26 * The "nodeGroups" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $dataprocService = new Google\Service\Dataproc(...);
30 * $nodeGroups = $dataprocService->projects_regions_clusters_nodeGroups;
31 * </code>
32 */
33class ProjectsRegionsClustersNodeGroups extends \Google\Service\Resource
34{
35 /**
36 * Creates a node group in a cluster. The returned Operation.metadata is
37 * NodeGroupOperationMetadata (https://cloud.google.com/dataproc/docs/reference/
38 * rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). (nodeGroups.create)
39 *
40 * @param string $parent Required. The parent resource where this node group
41 * will be created. Format:
42 * projects/{project}/regions/{region}/clusters/{cluster}
43 * @param NodeGroup $postBody
44 * @param array $optParams Optional parameters.
45 *
46 * @opt_param string nodeGroupId Optional. An optional node group ID. Generated
47 * if not specified.The ID must contain only letters (a-z, A-Z), numbers (0-9),
48 * underscores (_), and hyphens (-). Cannot begin or end with underscore or
49 * hyphen. Must consist of from 3 to 33 characters.
50 * @opt_param string parentOperationId Optional. operation id of the parent
51 * operation sending the create request
52 * @opt_param string requestId Optional. A unique ID used to identify the
53 * request. If the server receives two CreateNodeGroupRequest (https://cloud.goo
54 * gle.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dat
55 * aproc.v1.CreateNodeGroupRequest) with the same ID, the second request is
56 * ignored and the first google.longrunning.Operation created and stored in the
57 * backend is returned.Recommendation: Set this value to a UUID
58 * (https://en.wikipedia.org/wiki/Universally_unique_identifier).The ID must
59 * contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens
60 * (-). The maximum length is 40 characters.
61 * @return Operation
62 * @throws \Google\Service\Exception
63 */
64 public function create($parent, NodeGroup $postBody, $optParams = [])
65 {
66 $params = ['parent' => $parent, 'postBody' => $postBody];
67 $params = array_merge($params, $optParams);
68 return $this->call('create', [$params], Operation::class);
69 }
70 /**
71 * Gets the resource representation for a node group in a cluster.
72 * (nodeGroups.get)
73 *
74 * @param string $name Required. The name of the node group to retrieve. Format:
75 * projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}
76 * @param array $optParams Optional parameters.
77 * @return NodeGroup
78 * @throws \Google\Service\Exception
79 */
80 public function get($name, $optParams = [])
81 {
82 $params = ['name' => $name];
83 $params = array_merge($params, $optParams);
84 return $this->call('get', [$params], NodeGroup::class);
85 }
86 /**
87 * Repair nodes in a node group. (nodeGroups.repair)
88 *
89 * @param string $name Required. The name of the node group to resize. Format:
90 * projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}
91 * @param RepairNodeGroupRequest $postBody
92 * @param array $optParams Optional parameters.
93 * @return Operation
94 * @throws \Google\Service\Exception
95 */
96 public function repair($name, RepairNodeGroupRequest $postBody, $optParams = [])
97 {
98 $params = ['name' => $name, 'postBody' => $postBody];
99 $params = array_merge($params, $optParams);
100 return $this->call('repair', [$params], Operation::class);
101 }
102 /**
103 * Resizes a node group in a cluster. The returned Operation.metadata is
104 * NodeGroupOperationMetadata (https://cloud.google.com/dataproc/docs/reference/
105 * rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). (nodeGroups.resize)
106 *
107 * @param string $name Required. The name of the node group to resize. Format:
108 * projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}
109 * @param ResizeNodeGroupRequest $postBody
110 * @param array $optParams Optional parameters.
111 * @return Operation
112 * @throws \Google\Service\Exception
113 */
114 public function resize($name, ResizeNodeGroupRequest $postBody, $optParams = [])
115 {
116 $params = ['name' => $name, 'postBody' => $postBody];
117 $params = array_merge($params, $optParams);
118 return $this->call('resize', [$params], Operation::class);
119 }
120}
121
122// Adding a class alias for backwards compatibility with the previous class name.
123class_alias(ProjectsRegionsClustersNodeGroups::class, 'Google_Service_Dataproc_Resource_ProjectsRegionsClustersNodeGroups');
Note: See TracBrowser for help on using the repository browser.