source: vendor/google/apiclient-services/src/Compute/Resource/InstanceGroupManagerResizeRequests.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 3 months ago

Upload project files

  • Property mode set to 100644
File size: 12.9 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\Compute\Resource;
19
20use Google\Service\Compute\InstanceGroupManagerResizeRequest;
21use Google\Service\Compute\InstanceGroupManagerResizeRequestsListResponse;
22use Google\Service\Compute\Operation;
23
24/**
25 * The "instanceGroupManagerResizeRequests" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $computeService = new Google\Service\Compute(...);
29 * $instanceGroupManagerResizeRequests = $computeService->instanceGroupManagerResizeRequests;
30 * </code>
31 */
32class InstanceGroupManagerResizeRequests extends \Google\Service\Resource
33{
34 /**
35 * Cancels the specified resize request and removes it from the queue. Cancelled
36 * resize request does no longer wait for the resources to be provisioned.
37 * Cancel is only possible for requests that are accepted in the queue.
38 * (instanceGroupManagerResizeRequests.cancel)
39 *
40 * @param string $project Project ID for this request.
41 * @param string $zone The name of the zone where the managed instance group is
42 * located. The name should conform to RFC1035.
43 * @param string $instanceGroupManager The name of the managed instance group.
44 * The name should conform to RFC1035 or be a resource ID.
45 * @param string $resizeRequest The name of the resize request to cancel. The
46 * name should conform to RFC1035 or be a resource ID.
47 * @param array $optParams Optional parameters.
48 *
49 * @opt_param string requestId An optional request ID to identify requests.
50 * Specify a unique request ID so that if you must retry your request, the
51 * server will know to ignore the request if it has already been completed. For
52 * example, consider a situation where you make an initial request and the
53 * request times out. If you make the request again with the same request ID,
54 * the server can check if original operation with the same request ID was
55 * received, and if so, will ignore the second request. This prevents clients
56 * from accidentally creating duplicate commitments. The request ID must be a
57 * valid UUID with the exception that zero UUID is not supported (
58 * 00000000-0000-0000-0000-000000000000).
59 * @return Operation
60 * @throws \Google\Service\Exception
61 */
62 public function cancel($project, $zone, $instanceGroupManager, $resizeRequest, $optParams = [])
63 {
64 $params = ['project' => $project, 'zone' => $zone, 'instanceGroupManager' => $instanceGroupManager, 'resizeRequest' => $resizeRequest];
65 $params = array_merge($params, $optParams);
66 return $this->call('cancel', [$params], Operation::class);
67 }
68 /**
69 * Deletes the specified, inactive resize request. Requests that are still
70 * active cannot be deleted. Deleting request does not delete instances that
71 * were provisioned previously. (instanceGroupManagerResizeRequests.delete)
72 *
73 * @param string $project Project ID for this request.
74 * @param string $zone The name of the zone where the managed instance group is
75 * located. The name should conform to RFC1035.
76 * @param string $instanceGroupManager The name of the managed instance group.
77 * The name should conform to RFC1035 or be a resource ID.
78 * @param string $resizeRequest The name of the resize request to delete. The
79 * name should conform to RFC1035 or be a resource ID.
80 * @param array $optParams Optional parameters.
81 *
82 * @opt_param string requestId An optional request ID to identify requests.
83 * Specify a unique request ID so that if you must retry your request, the
84 * server will know to ignore the request if it has already been completed. For
85 * example, consider a situation where you make an initial request and the
86 * request times out. If you make the request again with the same request ID,
87 * the server can check if original operation with the same request ID was
88 * received, and if so, will ignore the second request. This prevents clients
89 * from accidentally creating duplicate commitments. The request ID must be a
90 * valid UUID with the exception that zero UUID is not supported (
91 * 00000000-0000-0000-0000-000000000000).
92 * @return Operation
93 * @throws \Google\Service\Exception
94 */
95 public function delete($project, $zone, $instanceGroupManager, $resizeRequest, $optParams = [])
96 {
97 $params = ['project' => $project, 'zone' => $zone, 'instanceGroupManager' => $instanceGroupManager, 'resizeRequest' => $resizeRequest];
98 $params = array_merge($params, $optParams);
99 return $this->call('delete', [$params], Operation::class);
100 }
101 /**
102 * Returns all of the details about the specified resize request.
103 * (instanceGroupManagerResizeRequests.get)
104 *
105 * @param string $project Project ID for this request.
106 * @param string $zone Name of the href="/compute/docs/regions-
107 * zones/#available">zone scoping this request. Name should conform to RFC1035.
108 * @param string $instanceGroupManager The name of the managed instance group.
109 * Name should conform to RFC1035 or be a resource ID.
110 * @param string $resizeRequest The name of the resize request. Name should
111 * conform to RFC1035 or be a resource ID.
112 * @param array $optParams Optional parameters.
113 * @return InstanceGroupManagerResizeRequest
114 * @throws \Google\Service\Exception
115 */
116 public function get($project, $zone, $instanceGroupManager, $resizeRequest, $optParams = [])
117 {
118 $params = ['project' => $project, 'zone' => $zone, 'instanceGroupManager' => $instanceGroupManager, 'resizeRequest' => $resizeRequest];
119 $params = array_merge($params, $optParams);
120 return $this->call('get', [$params], InstanceGroupManagerResizeRequest::class);
121 }
122 /**
123 * Creates a new resize request that starts provisioning VMs immediately or
124 * queues VM creation. (instanceGroupManagerResizeRequests.insert)
125 *
126 * @param string $project Project ID for this request.
127 * @param string $zone The name of the zone where the managed instance group is
128 * located and where the resize request will be created. Name should conform to
129 * RFC1035.
130 * @param string $instanceGroupManager The name of the managed instance group to
131 * which the resize request will be added. Name should conform to RFC1035 or be
132 * a resource ID.
133 * @param InstanceGroupManagerResizeRequest $postBody
134 * @param array $optParams Optional parameters.
135 *
136 * @opt_param string requestId An optional request ID to identify requests.
137 * Specify a unique request ID so that if you must retry your request, the
138 * server will know to ignore the request if it has already been completed. For
139 * example, consider a situation where you make an initial request and the
140 * request times out. If you make the request again with the same request ID,
141 * the server can check if original operation with the same request ID was
142 * received, and if so, will ignore the second request. This prevents clients
143 * from accidentally creating duplicate commitments. The request ID must be a
144 * valid UUID with the exception that zero UUID is not supported (
145 * 00000000-0000-0000-0000-000000000000).
146 * @return Operation
147 * @throws \Google\Service\Exception
148 */
149 public function insert($project, $zone, $instanceGroupManager, InstanceGroupManagerResizeRequest $postBody, $optParams = [])
150 {
151 $params = ['project' => $project, 'zone' => $zone, 'instanceGroupManager' => $instanceGroupManager, 'postBody' => $postBody];
152 $params = array_merge($params, $optParams);
153 return $this->call('insert', [$params], Operation::class);
154 }
155 /**
156 * Retrieves a list of resize requests that are contained in the managed
157 * instance group.
158 * (instanceGroupManagerResizeRequests.listInstanceGroupManagerResizeRequests)
159 *
160 * @param string $project Project ID for this request.
161 * @param string $zone The name of the zone where the managed instance group is
162 * located. The name should conform to RFC1035.
163 * @param string $instanceGroupManager The name of the managed instance group.
164 * The name should conform to RFC1035.
165 * @param array $optParams Optional parameters.
166 *
167 * @opt_param string filter A filter expression that filters resources listed in
168 * the response. Most Compute resources support two types of filter expressions:
169 * expressions that support regular expressions and expressions that follow API
170 * improvement proposal AIP-160. These two types of filter expressions cannot be
171 * mixed in one request. If you want to use AIP-160, your expression must
172 * specify the field name, an operator, and the value that you want to use for
173 * filtering. The value must be a string, a number, or a boolean. The operator
174 * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
175 * are filtering Compute Engine instances, you can exclude instances named
176 * `example-instance` by specifying `name != example-instance`. The `:*`
177 * comparison can be used to test whether a key has been defined. For example,
178 * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
179 * also filter nested fields. For example, you could specify
180 * `scheduling.automaticRestart = false` to include instances only if they are
181 * not scheduled for automatic restarts. You can use filtering on nested fields
182 * to filter based on resource labels. To filter on multiple expressions,
183 * provide each separate expression within parentheses. For example: ```
184 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
185 * default, each expression is an `AND` expression. However, you can include
186 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
187 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
188 * (scheduling.automaticRestart = true) ``` If you want to use a regular
189 * expression, use the `eq` (equal) or `ne` (not equal) operator against a
190 * single un-parenthesized expression with or without quotes or against multiple
191 * parenthesized expressions. Examples: `fieldname eq unquoted literal`
192 * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
193 * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
194 * interpreted as a regular expression using Google RE2 library syntax. The
195 * literal value must match the entire field. For example, to filter for
196 * instances that do not end with name "instance", you would use `name ne
197 * .*instance`. You cannot combine constraints on multiple fields using regular
198 * expressions.
199 * @opt_param string maxResults The maximum number of results per page that
200 * should be returned. If the number of available results is larger than
201 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
202 * get the next page of results in subsequent list requests. Acceptable values
203 * are `0` to `500`, inclusive. (Default: `500`)
204 * @opt_param string orderBy Sorts list results by a certain order. By default,
205 * results are returned in alphanumerical order based on the resource name. You
206 * can also sort results in descending order based on the creation timestamp
207 * using `orderBy="creationTimestamp desc"`. This sorts results based on the
208 * `creationTimestamp` field in reverse chronological order (newest result
209 * first). Use this to sort resources like operations so that the newest
210 * operation is returned first. Currently, only sorting by `name` or
211 * `creationTimestamp desc` is supported.
212 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
213 * the `nextPageToken` returned by a previous list request to get the next page
214 * of results.
215 * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
216 * which provides partial results in case of failure. The default value is
217 * false. For example, when partial success behavior is enabled, aggregatedList
218 * for a single zone scope either returns all resources in the zone or no
219 * resources, with an error code.
220 * @return InstanceGroupManagerResizeRequestsListResponse
221 * @throws \Google\Service\Exception
222 */
223 public function listInstanceGroupManagerResizeRequests($project, $zone, $instanceGroupManager, $optParams = [])
224 {
225 $params = ['project' => $project, 'zone' => $zone, 'instanceGroupManager' => $instanceGroupManager];
226 $params = array_merge($params, $optParams);
227 return $this->call('list', [$params], InstanceGroupManagerResizeRequestsListResponse::class);
228 }
229}
230
231// Adding a class alias for backwards compatibility with the previous class name.
232class_alias(InstanceGroupManagerResizeRequests::class, 'Google_Service_Compute_Resource_InstanceGroupManagerResizeRequests');
Note: See TracBrowser for help on using the repository browser.