blob: 4a8270c9fe7225386a8dd4d42d993deaf8a055d5 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.instanceGroups.html">instanceGroups</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addInstances">addInstances(project, zone, instanceGroup, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.</p>
80<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<p class="firstline">Retrieves the list of instance groups and sorts them by zone.</p>
83<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070087 <code><a href="#close">close()</a></code></p>
88<p class="firstline">Close httplib2 connections.</p>
89<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040090 <code><a href="#delete">delete(project, zone, instanceGroup, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.</p>
92<p class="toc_element">
93 <code><a href="#get">get(project, zone, instanceGroup)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070094<p class="firstline">Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070095<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#insert">insert(project, zone, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<p class="firstline">Creates an instance group in the specified project using the parameters that are included in the request.</p>
98<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070099 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700100<p class="firstline">Retrieves the list of zonal instance group resources contained within the specified zone.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700101<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700102 <code><a href="#listInstances">listInstances(project, zone, instanceGroup, body=None, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700103<p class="firstline">Lists the instances in the specified instance group. The orderBy query parameter is not supported.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104<p class="toc_element">
105 <code><a href="#listInstances_next">listInstances_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
108 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#removeInstances">removeInstances(project, zone, instanceGroup, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<p class="firstline">Removes one or more instances from the specified instance group, but does not delete those instances.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#setNamedPorts">setNamedPorts(project, zone, instanceGroup, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<p class="firstline">Sets the named ports for the specified instance group.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700118<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
119<h3>Method Details</h3>
120<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700121 <code class="details" id="addInstances">addInstances(project, zone, instanceGroup, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122 <pre>Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.
123
124Args:
125 project: string, Project ID for this request. (required)
126 zone: string, The name of the zone where the instance group is located. (required)
127 instanceGroup: string, The name of the instance group where you are adding instances. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700128 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700129 The object takes the form of:
130
131{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800132 &quot;instances&quot;: [ # The list of instances to add to the instance group.
133 {
134 &quot;instance&quot;: &quot;A String&quot;, # The URL for a specific instance.
135 },
136 ],
137}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700138
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700139 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
140
141For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
142
143The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700144
145Returns:
146 An object of the form:
147
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800149 #
150 # Google Compute Engine has three Operation resources:
151 #
152 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
153 #
154 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
155 #
156 # Operations can be global, regional or zonal.
157 # - For global operations, use the `globalOperations` resource.
158 # - For regional operations, use the `regionOperations` resource.
159 # - For zonal operations, use the `zonalOperations` resource.
160 #
161 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
162 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
163 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
164 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
165 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
166 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
167 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800169 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
170 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
171 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700172 },
173 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800174 },
175 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
176 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
177 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
178 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
179 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800180 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
181 #
182 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
183 #
184 # Example 1: Pack and unpack a message in C++.
185 #
186 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
187 #
188 # Example 2: Pack and unpack a message in Java.
189 #
190 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
191 #
192 # Example 3: Pack and unpack a message in Python.
193 #
194 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
195 #
196 # Example 4: Pack and unpack a message in Go
197 #
198 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
199 #
200 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
201 #
202 #
203 #
204 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
205 #
206 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
207 #
208 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
209 #
210 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
211 #
212 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
213 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
214 #
215 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
216 #
217 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
218 #
219 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
220 #
221 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
222 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
223 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800224 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800225 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800226 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
227 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
228 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
229 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
230 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
231 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
232 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
233 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
234 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
235 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
236 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
237 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
238 {
239 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
240 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
241 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
242 {
243 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
244 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
245 },
246 ],
247 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
248 },
249 ],
250 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
251}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700252</div>
253
254<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700255 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700256 <pre>Retrieves the list of instance groups and sorts them by zone.
257
258Args:
259 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700260 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700261
Dan O'Mearadd494642020-05-01 07:42:23 -0700262For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700263
Dan O'Mearadd494642020-05-01 07:42:23 -0700264You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700265
Bu Sun Kim65020912020-05-20 12:08:20 -0700266To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700267 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700268 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
269 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
270
271You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
272
273Currently, only sorting by `name` or `creationTimestamp desc` is supported.
274 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800275 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700276
277Returns:
278 An object of the form:
279
280 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800281 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
282 &quot;items&quot;: { # A list of InstanceGroupsScopedList resources.
283 &quot;a_key&quot;: { # The name of the scope that contains this set of instance groups.
284 &quot;instanceGroups&quot;: [ # [Output Only] The list of instance groups that are contained in this scope.
285 { # Represents an Instance Group resource.
286 #
287 # Instance Groups can be used to configure a target for load balancing.
288 #
289 # Instance groups can either be managed or unmanaged.
290 #
291 # To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead.
292 #
293 # Use zonal unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. You cannot create regional unmanaged instance groups.
294 #
295 # For more information, read Instance groups.
296 #
297 # (== resource_for {$api_version}.instanceGroups ==) (== resource_for {$api_version}.regionInstanceGroups ==)
298 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
299 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
300 &quot;fingerprint&quot;: &quot;A String&quot;, # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
301 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this instance group, generated by the server.
302 &quot;kind&quot;: &quot;compute#instanceGroup&quot;, # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
303 &quot;name&quot;: &quot;A String&quot;, # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
304 &quot;namedPorts&quot;: [ # Assigns a name to a port number. For example: {name: &quot;http&quot;, port: 80}
Bu Sun Kim65020912020-05-20 12:08:20 -0700305 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800306 # This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: &quot;http&quot;, port: 80},{name: &quot;http&quot;, port: 8080}]
Bu Sun Kim65020912020-05-20 12:08:20 -0700307 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800308 # Named ports apply to all instances in this instance group.
309 { # The named port. For example: .
310 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
311 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700312 },
313 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800314 &quot;network&quot;: &quot;A String&quot;, # [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
315 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the instance group is located (for regional resources).
316 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this instance group. The server generates this URL.
317 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
318 &quot;size&quot;: 42, # [Output Only] The total number of instances in the instance group.
319 &quot;subnetwork&quot;: &quot;A String&quot;, # [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
320 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700321 },
322 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800323 &quot;warning&quot;: { # [Output Only] An informational warning that replaces the list of instance groups when the list is empty.
324 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
325 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
326 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
327 {
328 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
329 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
330 },
331 ],
332 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
333 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700334 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800335 },
336 &quot;kind&quot;: &quot;compute#instanceGroupAggregatedList&quot;, # [Output Only] The resource type, which is always compute#instanceGroupAggregatedList for aggregated lists of instance groups.
337 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
338 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
339 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
340 &quot;A String&quot;,
341 ],
342 &quot;warning&quot;: { # [Output Only] Informational warning message.
343 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
344 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
345 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
346 {
347 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
348 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
349 },
350 ],
351 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
352 },
353}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700354</div>
355
356<div class="method">
357 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
358 <pre>Retrieves the next page of results.
359
360Args:
361 previous_request: The request for the previous page. (required)
362 previous_response: The response from the request for the previous page. (required)
363
364Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700365 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700366 page. Returns None if there are no more items in the collection.
367 </pre>
368</div>
369
370<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700371 <code class="details" id="close">close()</code>
372 <pre>Close httplib2 connections.</pre>
373</div>
374
375<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400376 <code class="details" id="delete">delete(project, zone, instanceGroup, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700377 <pre>Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.
378
379Args:
380 project: string, Project ID for this request. (required)
381 zone: string, The name of the zone where the instance group is located. (required)
382 instanceGroup: string, The name of the instance group to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700383 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
384
385For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
386
387The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700388
389Returns:
390 An object of the form:
391
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700392 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800393 #
394 # Google Compute Engine has three Operation resources:
395 #
396 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
397 #
398 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
399 #
400 # Operations can be global, regional or zonal.
401 # - For global operations, use the `globalOperations` resource.
402 # - For regional operations, use the `regionOperations` resource.
403 # - For zonal operations, use the `zonalOperations` resource.
404 #
405 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
406 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
407 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
408 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
409 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
410 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
411 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700412 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800413 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
414 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
415 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700416 },
417 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800418 },
419 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
420 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
421 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
422 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
423 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800424 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
425 #
426 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
427 #
428 # Example 1: Pack and unpack a message in C++.
429 #
430 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
431 #
432 # Example 2: Pack and unpack a message in Java.
433 #
434 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
435 #
436 # Example 3: Pack and unpack a message in Python.
437 #
438 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
439 #
440 # Example 4: Pack and unpack a message in Go
441 #
442 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
443 #
444 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
445 #
446 #
447 #
448 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
449 #
450 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
451 #
452 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
453 #
454 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
455 #
456 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
457 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
458 #
459 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
460 #
461 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
462 #
463 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
464 #
465 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
466 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
467 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800468 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800469 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800470 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
471 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
472 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
473 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
474 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
475 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
476 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
477 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
478 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
479 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
480 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
481 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
482 {
483 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
484 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
485 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
486 {
487 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
488 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
489 },
490 ],
491 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
492 },
493 ],
494 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
495}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700496</div>
497
498<div class="method">
499 <code class="details" id="get">get(project, zone, instanceGroup)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700500 <pre>Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request.
501
502For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700503
504Args:
505 project: string, Project ID for this request. (required)
506 zone: string, The name of the zone where the instance group is located. (required)
507 instanceGroup: string, The name of the instance group. (required)
508
509Returns:
510 An object of the form:
511
Dan O'Mearadd494642020-05-01 07:42:23 -0700512 { # Represents an Instance Group resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800513 #
514 # Instance Groups can be used to configure a target for load balancing.
515 #
516 # Instance groups can either be managed or unmanaged.
517 #
518 # To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead.
519 #
520 # Use zonal unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. You cannot create regional unmanaged instance groups.
521 #
522 # For more information, read Instance groups.
523 #
524 # (== resource_for {$api_version}.instanceGroups ==) (== resource_for {$api_version}.regionInstanceGroups ==)
525 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
526 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
527 &quot;fingerprint&quot;: &quot;A String&quot;, # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
528 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this instance group, generated by the server.
529 &quot;kind&quot;: &quot;compute#instanceGroup&quot;, # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
530 &quot;name&quot;: &quot;A String&quot;, # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
531 &quot;namedPorts&quot;: [ # Assigns a name to a port number. For example: {name: &quot;http&quot;, port: 80}
Bu Sun Kim65020912020-05-20 12:08:20 -0700532 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800533 # This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: &quot;http&quot;, port: 80},{name: &quot;http&quot;, port: 8080}]
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800535 # Named ports apply to all instances in this instance group.
536 { # The named port. For example: .
537 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
538 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
539 },
540 ],
541 &quot;network&quot;: &quot;A String&quot;, # [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
542 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the instance group is located (for regional resources).
543 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this instance group. The server generates this URL.
544 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
545 &quot;size&quot;: 42, # [Output Only] The total number of instances in the instance group.
546 &quot;subnetwork&quot;: &quot;A String&quot;, # [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
547 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
548}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700549</div>
550
551<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700552 <code class="details" id="insert">insert(project, zone, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700553 <pre>Creates an instance group in the specified project using the parameters that are included in the request.
554
555Args:
556 project: string, Project ID for this request. (required)
557 zone: string, The name of the zone where you want to create the instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700558 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700559 The object takes the form of:
560
Dan O'Mearadd494642020-05-01 07:42:23 -0700561{ # Represents an Instance Group resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700562 #
563 # Instance Groups can be used to configure a target for load balancing.
564 #
565 # Instance groups can either be managed or unmanaged.
566 #
567 # To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead.
568 #
569 # Use zonal unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. You cannot create regional unmanaged instance groups.
570 #
571 # For more information, read Instance groups.
572 #
573 # (== resource_for {$api_version}.instanceGroups ==) (== resource_for {$api_version}.regionInstanceGroups ==)
574 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
575 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
576 &quot;fingerprint&quot;: &quot;A String&quot;, # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
577 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this instance group, generated by the server.
578 &quot;kind&quot;: &quot;compute#instanceGroup&quot;, # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
579 &quot;name&quot;: &quot;A String&quot;, # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
580 &quot;namedPorts&quot;: [ # Assigns a name to a port number. For example: {name: &quot;http&quot;, port: 80}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700581 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700582 # This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: &quot;http&quot;, port: 80},{name: &quot;http&quot;, port: 8080}]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700584 # Named ports apply to all instances in this instance group.
585 { # The named port. For example: .
586 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
587 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
588 },
589 ],
590 &quot;network&quot;: &quot;A String&quot;, # [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
591 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the instance group is located (for regional resources).
592 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this instance group. The server generates this URL.
593 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
594 &quot;size&quot;: 42, # [Output Only] The total number of instances in the instance group.
595 &quot;subnetwork&quot;: &quot;A String&quot;, # [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
596 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
597}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700598
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700599 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
600
601For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
602
603The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700604
605Returns:
606 An object of the form:
607
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700608 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800609 #
610 # Google Compute Engine has three Operation resources:
611 #
612 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
613 #
614 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
615 #
616 # Operations can be global, regional or zonal.
617 # - For global operations, use the `globalOperations` resource.
618 # - For regional operations, use the `regionOperations` resource.
619 # - For zonal operations, use the `zonalOperations` resource.
620 #
621 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
622 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
623 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
624 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
625 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
626 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
627 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700628 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800629 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
630 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
631 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700632 },
633 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800634 },
635 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
636 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
637 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
638 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
639 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800640 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
641 #
642 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
643 #
644 # Example 1: Pack and unpack a message in C++.
645 #
646 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
647 #
648 # Example 2: Pack and unpack a message in Java.
649 #
650 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
651 #
652 # Example 3: Pack and unpack a message in Python.
653 #
654 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
655 #
656 # Example 4: Pack and unpack a message in Go
657 #
658 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
659 #
660 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
661 #
662 #
663 #
664 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
665 #
666 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
667 #
668 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
669 #
670 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
671 #
672 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
673 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
674 #
675 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
676 #
677 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
678 #
679 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
680 #
681 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
682 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
683 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800684 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800685 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800686 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
687 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
688 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
689 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
690 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
691 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
692 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
693 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
694 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
695 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
696 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
697 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
698 {
699 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
700 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
701 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
702 {
703 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
704 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
705 },
706 ],
707 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
708 },
709 ],
710 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
711}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700712</div>
713
714<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700715 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700716 <pre>Retrieves the list of zonal instance group resources contained within the specified zone.
717
718For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700719
720Args:
721 project: string, Project ID for this request. (required)
722 zone: string, The name of the zone where the instance group is located. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700723 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700724
Dan O'Mearadd494642020-05-01 07:42:23 -0700725For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700726
Dan O'Mearadd494642020-05-01 07:42:23 -0700727You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700728
Bu Sun Kim65020912020-05-20 12:08:20 -0700729To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
730 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
731 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
732
733You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
734
735Currently, only sorting by `name` or `creationTimestamp desc` is supported.
736 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800737 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700738
739Returns:
740 An object of the form:
741
742 { # A list of InstanceGroup resources.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800743 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
744 &quot;items&quot;: [ # A list of InstanceGroup resources.
745 { # Represents an Instance Group resource.
746 #
747 # Instance Groups can be used to configure a target for load balancing.
748 #
749 # Instance groups can either be managed or unmanaged.
750 #
751 # To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead.
752 #
753 # Use zonal unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. You cannot create regional unmanaged instance groups.
754 #
755 # For more information, read Instance groups.
756 #
757 # (== resource_for {$api_version}.instanceGroups ==) (== resource_for {$api_version}.regionInstanceGroups ==)
758 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this instance group in RFC3339 text format.
759 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
760 &quot;fingerprint&quot;: &quot;A String&quot;, # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
761 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this instance group, generated by the server.
762 &quot;kind&quot;: &quot;compute#instanceGroup&quot;, # [Output Only] The resource type, which is always compute#instanceGroup for instance groups.
763 &quot;name&quot;: &quot;A String&quot;, # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
764 &quot;namedPorts&quot;: [ # Assigns a name to a port number. For example: {name: &quot;http&quot;, port: 80}
Bu Sun Kim65020912020-05-20 12:08:20 -0700765 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800766 # This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: &quot;http&quot;, port: 80},{name: &quot;http&quot;, port: 8080}]
Bu Sun Kim65020912020-05-20 12:08:20 -0700767 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800768 # Named ports apply to all instances in this instance group.
769 { # The named port. For example: .
770 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
771 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700772 },
773 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800774 &quot;network&quot;: &quot;A String&quot;, # [Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
775 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the instance group is located (for regional resources).
776 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this instance group. The server generates this URL.
777 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
778 &quot;size&quot;: 42, # [Output Only] The total number of instances in the instance group.
779 &quot;subnetwork&quot;: &quot;A String&quot;, # [Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).
780 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700781 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800782 ],
783 &quot;kind&quot;: &quot;compute#instanceGroupList&quot;, # [Output Only] The resource type, which is always compute#instanceGroupList for instance group lists.
784 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
785 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
786 &quot;warning&quot;: { # [Output Only] Informational warning message.
787 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
788 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
789 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
790 {
791 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
792 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
793 },
794 ],
795 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
796 },
797}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700798</div>
799
800<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700801 <code class="details" id="listInstances">listInstances(project, zone, instanceGroup, body=None, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700802 <pre>Lists the instances in the specified instance group. The orderBy query parameter is not supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700803
804Args:
805 project: string, Project ID for this request. (required)
806 zone: string, The name of the zone where the instance group is located. (required)
807 instanceGroup: string, The name of the instance group from which you want to generate a list of included instances. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700808 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700809 The object takes the form of:
810
811{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800812 &quot;instanceState&quot;: &quot;A String&quot;, # A filter for the state of the instances in the instance group. Valid options are ALL or RUNNING. If you do not specify this parameter the list includes all instances regardless of their state.
813}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700814
Dan O'Mearadd494642020-05-01 07:42:23 -0700815 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700816
Dan O'Mearadd494642020-05-01 07:42:23 -0700817For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700818
Dan O'Mearadd494642020-05-01 07:42:23 -0700819You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700820
Bu Sun Kim65020912020-05-20 12:08:20 -0700821To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
822 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
823 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
824
825You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
826
827Currently, only sorting by `name` or `creationTimestamp desc` is supported.
828 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800829 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700830
831Returns:
832 An object of the form:
833
834 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800835 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
836 &quot;items&quot;: [ # A list of InstanceWithNamedPorts resources.
837 {
838 &quot;instance&quot;: &quot;A String&quot;, # [Output Only] The URL of the instance.
839 &quot;namedPorts&quot;: [ # [Output Only] The named ports that belong to this instance group.
840 { # The named port. For example: .
841 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
842 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700843 },
844 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800845 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700846 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800847 ],
848 &quot;kind&quot;: &quot;compute#instanceGroupsListInstances&quot;, # [Output Only] The resource type, which is always compute#instanceGroupsListInstances for the list of instances in the specified instance group.
849 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
850 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
851 &quot;warning&quot;: { # [Output Only] Informational warning message.
852 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
853 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
854 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
855 {
856 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
857 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
858 },
859 ],
860 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
861 },
862}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700863</div>
864
865<div class="method">
866 <code class="details" id="listInstances_next">listInstances_next(previous_request, previous_response)</code>
867 <pre>Retrieves the next page of results.
868
869Args:
870 previous_request: The request for the previous page. (required)
871 previous_response: The response from the request for the previous page. (required)
872
873Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700874 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700875 page. Returns None if there are no more items in the collection.
876 </pre>
877</div>
878
879<div class="method">
880 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
881 <pre>Retrieves the next page of results.
882
883Args:
884 previous_request: The request for the previous page. (required)
885 previous_response: The response from the request for the previous page. (required)
886
887Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700888 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700889 page. Returns None if there are no more items in the collection.
890 </pre>
891</div>
892
893<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700894 <code class="details" id="removeInstances">removeInstances(project, zone, instanceGroup, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700895 <pre>Removes one or more instances from the specified instance group, but does not delete those instances.
896
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400897If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.
898
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700899Args:
900 project: string, Project ID for this request. (required)
901 zone: string, The name of the zone where the instance group is located. (required)
902 instanceGroup: string, The name of the instance group where the specified instances will be removed. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700903 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700904 The object takes the form of:
905
906{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800907 &quot;instances&quot;: [ # The list of instances to remove from the instance group.
908 {
909 &quot;instance&quot;: &quot;A String&quot;, # The URL for a specific instance.
910 },
911 ],
912}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700913
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700914 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
915
916For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
917
918The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700919
920Returns:
921 An object of the form:
922
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700923 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800924 #
925 # Google Compute Engine has three Operation resources:
926 #
927 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
928 #
929 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
930 #
931 # Operations can be global, regional or zonal.
932 # - For global operations, use the `globalOperations` resource.
933 # - For regional operations, use the `regionOperations` resource.
934 # - For zonal operations, use the `zonalOperations` resource.
935 #
936 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
937 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
938 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
939 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
940 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
941 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
942 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700943 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800944 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
945 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
946 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700947 },
948 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800949 },
950 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
951 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
952 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
953 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
954 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800955 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
956 #
957 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
958 #
959 # Example 1: Pack and unpack a message in C++.
960 #
961 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
962 #
963 # Example 2: Pack and unpack a message in Java.
964 #
965 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
966 #
967 # Example 3: Pack and unpack a message in Python.
968 #
969 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
970 #
971 # Example 4: Pack and unpack a message in Go
972 #
973 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
974 #
975 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
976 #
977 #
978 #
979 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
980 #
981 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
982 #
983 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
984 #
985 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
986 #
987 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
988 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
989 #
990 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
991 #
992 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
993 #
994 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
995 #
996 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
997 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
998 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800999 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001000 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001001 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1002 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1003 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1004 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1005 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1006 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1007 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1008 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1009 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1010 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1011 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1012 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1013 {
1014 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1015 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1016 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1017 {
1018 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1019 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1020 },
1021 ],
1022 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1023 },
1024 ],
1025 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1026}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001027</div>
1028
1029<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001030 <code class="details" id="setNamedPorts">setNamedPorts(project, zone, instanceGroup, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001031 <pre>Sets the named ports for the specified instance group.
1032
1033Args:
1034 project: string, Project ID for this request. (required)
1035 zone: string, The name of the zone where the instance group is located. (required)
1036 instanceGroup: string, The name of the instance group where the named ports are updated. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001037 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001038 The object takes the form of:
1039
1040{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001041 &quot;fingerprint&quot;: &quot;A String&quot;, # The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request. A request with an incorrect fingerprint will fail with error 412 conditionNotMet.
1042 &quot;namedPorts&quot;: [ # The list of named ports to set for this instance group.
1043 { # The named port. For example: .
1044 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1045 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1046 },
1047 ],
1048}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001049
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001050 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1051
1052For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1053
1054The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001055
1056Returns:
1057 An object of the form:
1058
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001059 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001060 #
1061 # Google Compute Engine has three Operation resources:
1062 #
1063 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1064 #
1065 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1066 #
1067 # Operations can be global, regional or zonal.
1068 # - For global operations, use the `globalOperations` resource.
1069 # - For regional operations, use the `regionOperations` resource.
1070 # - For zonal operations, use the `zonalOperations` resource.
1071 #
1072 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1073 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1074 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1075 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1076 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1077 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1078 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001079 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001080 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1081 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1082 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001083 },
1084 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001085 },
1086 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1087 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1088 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1089 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1090 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001091 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
1092 #
1093 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
1094 #
1095 # Example 1: Pack and unpack a message in C++.
1096 #
1097 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
1098 #
1099 # Example 2: Pack and unpack a message in Java.
1100 #
1101 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
1102 #
1103 # Example 3: Pack and unpack a message in Python.
1104 #
1105 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
1106 #
1107 # Example 4: Pack and unpack a message in Go
1108 #
1109 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
1110 #
1111 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
1112 #
1113 #
1114 #
1115 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
1116 #
1117 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
1118 #
1119 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
1120 #
1121 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
1122 #
1123 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
1124 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
1125 #
1126 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
1127 #
1128 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
1129 #
1130 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
1131 #
1132 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
1133 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
1134 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001135 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001136 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001137 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1138 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1139 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1140 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1141 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1142 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1143 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1144 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1145 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1146 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1147 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1148 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1149 {
1150 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1151 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1152 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1153 {
1154 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1155 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1156 },
1157 ],
1158 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1159 },
1160 ],
1161 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1162}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001163</div>
1164
1165<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001166 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001167 <pre>Returns permissions that a caller has on the specified resource.
1168
1169Args:
1170 project: string, Project ID for this request. (required)
1171 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001172 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001173 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001174 The object takes the form of:
1175
1176{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001177 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
1178 &quot;A String&quot;,
1179 ],
1180}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001181
1182
1183Returns:
1184 An object of the form:
1185
1186 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001187 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1188 &quot;A String&quot;,
1189 ],
1190}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001191</div>
1192
1193</body></html>