1<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_beta.html">Compute Engine API</a> . <a href="compute_beta.instanceGroupManagers.html">instanceGroupManagers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#abandonInstances">abandonInstances(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
79<p class="firstline">Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.</p>
80<p class="toc_element">
81  <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
82<p class="firstline">Retrieves the list of managed instance groups and groups 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">
87  <code><a href="#applyUpdatesToInstances">applyUpdatesToInstances(project, zone, instanceGroupManager, body)</a></code></p>
88<p class="firstline">Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.</p>
89<p class="toc_element">
90  <code><a href="#delete">delete(project, zone, instanceGroupManager, requestId=None)</a></code></p>
91<p class="firstline">Deletes the specified managed instance group and all of the instances in that group. Note that the 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="#deleteInstances">deleteInstances(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
94<p class="firstline">Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.</p>
95<p class="toc_element">
96  <code><a href="#get">get(project, zone, instanceGroupManager)</a></code></p>
97<p class="firstline">Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.</p>
98<p class="toc_element">
99  <code><a href="#insert">insert(project, zone, body, requestId=None)</a></code></p>
100<p class="firstline">Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.</p>
101<p class="toc_element">
102  <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
103<p class="firstline">Retrieves a list of managed instance groups that are contained within the specified project and zone.</p>
104<p class="toc_element">
105  <code><a href="#listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
106<p class="firstline">Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.</p>
107<p class="toc_element">
108  <code><a href="#listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
111  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
112<p class="firstline">Retrieves the next page of results.</p>
113<p class="toc_element">
114  <code><a href="#patch">patch(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
115<p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
116<p class="toc_element">
117  <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
118<p class="firstline">Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.</p>
119<p class="toc_element">
120  <code><a href="#resize">resize(project, zone, instanceGroupManager, size, requestId=None)</a></code></p>
121<p class="firstline">Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.</p>
122<p class="toc_element">
123  <code><a href="#resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
124<p class="firstline">Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.</p>
125<p class="toc_element">
126  <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
127<p class="firstline">Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.</p>
128<p class="toc_element">
129  <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
130<p class="firstline">Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.</p>
131<p class="toc_element">
132  <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
133<p class="firstline">Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.</p>
134<p class="toc_element">
135  <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p>
136<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
137<p class="toc_element">
138  <code><a href="#update">update(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
139<p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.</p>
140<h3>Method Details</h3>
141<div class="method">
142    <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body, requestId=None)</code>
143  <pre>Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.
144
145If 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 has elapsed before the VM instance is removed or deleted.
146
147You can specify a maximum of 1000 instances with this method per request.
148
149Args:
150  project: string, Project ID for this request. (required)
151  zone: string, The name of the zone where the managed instance group is located. (required)
152  instanceGroupManager: string, The name of the managed instance group. (required)
153  body: object, The request body. (required)
154    The object takes the form of:
155
156{
157    "instances": [ # The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
158      "A String",
159    ],
160  }
161
162  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.
163
164For 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.
165
166The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
167
168Returns:
169  An object of the form:
170
171    { # Represents an Operation resource.
172      #
173      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
174      #
175      # Operations can be global, regional or zonal.
176      # - For global operations, use the globalOperations resource.
177      # - For regional operations, use the regionOperations resource.
178      # - For zonal operations, use the zonalOperations resource.
179      #
180      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
181    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
182    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
183    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
184    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
185    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
186    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
187    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
188    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
189    "progress": 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.
190    "httpErrorStatusCode": 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.
191    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
192    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
193    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
194    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
195      {
196        "message": "A String", # [Output Only] A human-readable description of the warning code.
197        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
198        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
199            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
200          {
201            "value": "A String", # [Output Only] A warning data value corresponding to the key.
202            "key": "A String", # [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).
203          },
204        ],
205      },
206    ],
207    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
208    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
209    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
210    "name": "A String", # [Output Only] Name of the resource.
211    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
212    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
213      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
214        {
215          "message": "A String", # [Output Only] An optional, human-readable error message.
216          "code": "A String", # [Output Only] The error type identifier for this error.
217          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
218        },
219      ],
220    },
221    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
222    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
223    "targetLink": "A String", # [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.
224  }</pre>
225</div>
226
227<div class="method">
228    <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
229  <pre>Retrieves the list of managed instance groups and groups them by zone.
230
231Args:
232  project: string, Project ID for this request. (required)
233  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
234
235You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". 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.
236
237Currently, only sorting by name or creationTimestamp desc is supported.
238  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)
239  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.
240  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 =, !=, >, or <.
241
242For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
243
244You 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.
245
246To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
247
248Returns:
249  An object of the form:
250
251    {
252    "nextPageToken": "A String", # [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.
253    "kind": "compute#instanceGroupManagerAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups.
254    "items": { # A list of InstanceGroupManagersScopedList resources.
255      "a_key": { # [Output Only] The name of the scope that contains this set of managed instance groups.
256        "warning": { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty.
257          "message": "A String", # [Output Only] A human-readable description of the warning code.
258          "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
259          "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
260              # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
261            {
262              "value": "A String", # [Output Only] A warning data value corresponding to the key.
263              "key": "A String", # [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).
264            },
265          ],
266        },
267        "instanceGroupManagers": [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone.
268          { # Represents a Managed Instance Group resource.
269                #
270                # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
271                #
272                # For zonal Managed Instance Group, use the instanceGroupManagers resource.
273                #
274                # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
275              "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
276              "pendingActions": { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
277                "recreating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
278                "deleting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
279                "creating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
280                "restarting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
281              },
282              "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
283              "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
284              "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
285              "serviceAccount": "A String", # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
286              "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
287              "baseInstanceName": "A String", # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
288              "updatePolicy": { # The update policy for this managed instance group.
289                "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
290                    #
291                    # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
292                  "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
293                      #
294                      #
295                      # - If the value is fixed, then the calculated value is equal to the fixed value.
296                      # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
297                  "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
298                  "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
299                },
300                "minimalAction": "A String", # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.
301                "instanceRedistributionType": "A String",
302                "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied:
303                    #
304                    #
305                    # - The instance's status is RUNNING.
306                    # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available.  By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
307                    #
308                    # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
309                  "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
310                      #
311                      #
312                      # - If the value is fixed, then the calculated value is equal to the fixed value.
313                      # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
314                  "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
315                  "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
316                },
317                "type": "A String", # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
318                "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
319              },
320              "targetPools": [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
321                "A String",
322              ],
323              "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
324                { # The named port. For example: .
325                  "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
326                  "port": 42, # The port number, which can be a value between 1 and 65535.
327                },
328              ],
329              "status": { # [Output Only] The status of this managed instance group.
330                "isStable": True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
331                "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
332                  "isReached": True or False, # [Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances' target version are specified by version field on Instance Group Manager.
333                },
334              },
335              "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
336              "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
337                {
338                  "healthCheck": "A String", # The URL for the health check that signals autohealing.
339                  "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
340                },
341              ],
342              "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
343              "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
344              "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group.
345              "fingerprint": "A String", # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.
346                  #
347                  # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
348              "currentActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
349                "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
350                "recreating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
351                "creating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
352                    #
353                    # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
354                "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
355                "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
356                "abandoning": 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
357                "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
358                "creatingWithoutRetries": 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.
359                "refreshing": 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
360              },
361              "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
362              "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
363                  #
364                  # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
365                {
366                  "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to:
367                      # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
368                      # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up.  If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
369                    "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
370                        #
371                        #
372                        # - If the value is fixed, then the calculated value is equal to the fixed value.
373                        # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
374                    "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
375                    "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
376                  },
377                  "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached.
378                  "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
379                },
380              ],
381              "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
382              "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
383                "zones": [ # Zones where the regional managed instance group will create and manage instances.
384                  {
385                    "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
386                  },
387                ],
388              },
389              "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
390            },
391        ],
392      },
393    },
394    "warning": { # [Output Only] Informational warning message.
395      "message": "A String", # [Output Only] A human-readable description of the warning code.
396      "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
397      "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
398          # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
399        {
400          "value": "A String", # [Output Only] A warning data value corresponding to the key.
401          "key": "A String", # [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).
402        },
403      ],
404    },
405    "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
406    "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
407  }</pre>
408</div>
409
410<div class="method">
411    <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
412  <pre>Retrieves the next page of results.
413
414Args:
415  previous_request: The request for the previous page. (required)
416  previous_response: The response from the request for the previous page. (required)
417
418Returns:
419  A request object that you can call 'execute()' on to request the next
420  page. Returns None if there are no more items in the collection.
421    </pre>
422</div>
423
424<div class="method">
425    <code class="details" id="applyUpdatesToInstances">applyUpdatesToInstances(project, zone, instanceGroupManager, body)</code>
426  <pre>Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.
427
428Args:
429  project: string, Project ID for this request. (required)
430  zone: string, The name of the zone where the managed instance group is located. Should conform to RFC1035. (required)
431  instanceGroupManager: string, The name of the managed instance group, should conform to RFC1035. (required)
432  body: object, The request body. (required)
433    The object takes the form of:
434
435{ # InstanceGroupManagers.applyUpdatesToInstances
436    "instances": [ # The list of URLs of one or more instances for which you want to apply updates. Each URL can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
437      "A String",
438    ],
439    "mostDisruptiveAllowedAction": "A String", # The most disruptive action that you want to perform on each instance during the update:
440        # - REPLACE: Delete the instance and create it again.
441        # - RESTART: Stop the instance and start it again.
442        # - REFRESH: Do not stop the instance.
443        # - NONE: Do not disrupt the instance at all.  By default, the most disruptive allowed action is REPLACE. If your update requires a more disruptive action than you set with this flag, the update request will fail.
444    "minimalAction": "A String", # The minimal action that you want to perform on each instance during the update:
445        # - REPLACE: At minimum, delete the instance and create it again.
446        # - RESTART: Stop the instance and start it again.
447        # - REFRESH: Do not stop the instance.
448        # - NONE: Do not disrupt the instance at all.  By default, the minimum action is NONE. If your update requires a more disruptive action than you set with this flag, the necessary action is performed to execute the update.
449  }
450
451
452Returns:
453  An object of the form:
454
455    { # Represents an Operation resource.
456      #
457      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
458      #
459      # Operations can be global, regional or zonal.
460      # - For global operations, use the globalOperations resource.
461      # - For regional operations, use the regionOperations resource.
462      # - For zonal operations, use the zonalOperations resource.
463      #
464      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
465    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
466    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
467    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
468    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
469    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
470    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
471    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
472    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
473    "progress": 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.
474    "httpErrorStatusCode": 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.
475    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
476    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
477    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
478    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
479      {
480        "message": "A String", # [Output Only] A human-readable description of the warning code.
481        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
482        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
483            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
484          {
485            "value": "A String", # [Output Only] A warning data value corresponding to the key.
486            "key": "A String", # [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).
487          },
488        ],
489      },
490    ],
491    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
492    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
493    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
494    "name": "A String", # [Output Only] Name of the resource.
495    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
496    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
497      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
498        {
499          "message": "A String", # [Output Only] An optional, human-readable error message.
500          "code": "A String", # [Output Only] The error type identifier for this error.
501          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
502        },
503      ],
504    },
505    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
506    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
507    "targetLink": "A String", # [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.
508  }</pre>
509</div>
510
511<div class="method">
512    <code class="details" id="delete">delete(project, zone, instanceGroupManager, requestId=None)</code>
513  <pre>Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read  Deleting an instance group for more information.
514
515Args:
516  project: string, Project ID for this request. (required)
517  zone: string, The name of the zone where the managed instance group is located. (required)
518  instanceGroupManager: string, The name of the managed instance group to delete. (required)
519  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.
520
521For 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.
522
523The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
524
525Returns:
526  An object of the form:
527
528    { # Represents an Operation resource.
529      #
530      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
531      #
532      # Operations can be global, regional or zonal.
533      # - For global operations, use the globalOperations resource.
534      # - For regional operations, use the regionOperations resource.
535      # - For zonal operations, use the zonalOperations resource.
536      #
537      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
538    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
539    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
540    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
541    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
542    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
543    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
544    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
545    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
546    "progress": 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.
547    "httpErrorStatusCode": 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.
548    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
549    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
550    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
551    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
552      {
553        "message": "A String", # [Output Only] A human-readable description of the warning code.
554        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
555        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
556            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
557          {
558            "value": "A String", # [Output Only] A warning data value corresponding to the key.
559            "key": "A String", # [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).
560          },
561        ],
562      },
563    ],
564    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
565    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
566    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
567    "name": "A String", # [Output Only] Name of the resource.
568    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
569    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
570      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
571        {
572          "message": "A String", # [Output Only] An optional, human-readable error message.
573          "code": "A String", # [Output Only] The error type identifier for this error.
574          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
575        },
576      ],
577    },
578    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
579    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
580    "targetLink": "A String", # [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.
581  }</pre>
582</div>
583
584<div class="method">
585    <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body, requestId=None)</code>
586  <pre>Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.
587
588If 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 has elapsed before the VM instance is removed or deleted.
589
590You can specify a maximum of 1000 instances with this method per request.
591
592Args:
593  project: string, Project ID for this request. (required)
594  zone: string, The name of the zone where the managed instance group is located. (required)
595  instanceGroupManager: string, The name of the managed instance group. (required)
596  body: object, The request body. (required)
597    The object takes the form of:
598
599{
600    "instances": [ # The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
601      "A String",
602    ],
603  }
604
605  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.
606
607For 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.
608
609The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
610
611Returns:
612  An object of the form:
613
614    { # Represents an Operation resource.
615      #
616      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
617      #
618      # Operations can be global, regional or zonal.
619      # - For global operations, use the globalOperations resource.
620      # - For regional operations, use the regionOperations resource.
621      # - For zonal operations, use the zonalOperations resource.
622      #
623      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
624    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
625    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
626    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
627    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
628    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
629    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
630    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
631    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
632    "progress": 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.
633    "httpErrorStatusCode": 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.
634    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
635    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
636    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
637    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
638      {
639        "message": "A String", # [Output Only] A human-readable description of the warning code.
640        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
641        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
642            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
643          {
644            "value": "A String", # [Output Only] A warning data value corresponding to the key.
645            "key": "A String", # [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).
646          },
647        ],
648      },
649    ],
650    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
651    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
652    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
653    "name": "A String", # [Output Only] Name of the resource.
654    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
655    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
656      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
657        {
658          "message": "A String", # [Output Only] An optional, human-readable error message.
659          "code": "A String", # [Output Only] The error type identifier for this error.
660          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
661        },
662      ],
663    },
664    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
665    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
666    "targetLink": "A String", # [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.
667  }</pre>
668</div>
669
670<div class="method">
671    <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
672  <pre>Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.
673
674Args:
675  project: string, Project ID for this request. (required)
676  zone: string, The name of the zone where the managed instance group is located. (required)
677  instanceGroupManager: string, The name of the managed instance group. (required)
678
679Returns:
680  An object of the form:
681
682    { # Represents a Managed Instance Group resource.
683        #
684        # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
685        #
686        # For zonal Managed Instance Group, use the instanceGroupManagers resource.
687        #
688        # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
689      "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
690      "pendingActions": { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
691        "recreating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
692        "deleting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
693        "creating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
694        "restarting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
695      },
696      "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
697      "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
698      "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
699      "serviceAccount": "A String", # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
700      "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
701      "baseInstanceName": "A String", # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
702      "updatePolicy": { # The update policy for this managed instance group.
703        "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
704            #
705            # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
706          "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
707              #
708              #
709              # - If the value is fixed, then the calculated value is equal to the fixed value.
710              # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
711          "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
712          "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
713        },
714        "minimalAction": "A String", # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.
715        "instanceRedistributionType": "A String",
716        "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied:
717            #
718            #
719            # - The instance's status is RUNNING.
720            # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available.  By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
721            #
722            # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
723          "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
724              #
725              #
726              # - If the value is fixed, then the calculated value is equal to the fixed value.
727              # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
728          "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
729          "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
730        },
731        "type": "A String", # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
732        "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
733      },
734      "targetPools": [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
735        "A String",
736      ],
737      "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
738        { # The named port. For example: .
739          "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
740          "port": 42, # The port number, which can be a value between 1 and 65535.
741        },
742      ],
743      "status": { # [Output Only] The status of this managed instance group.
744        "isStable": True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
745        "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
746          "isReached": True or False, # [Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances' target version are specified by version field on Instance Group Manager.
747        },
748      },
749      "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
750      "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
751        {
752          "healthCheck": "A String", # The URL for the health check that signals autohealing.
753          "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
754        },
755      ],
756      "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
757      "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
758      "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group.
759      "fingerprint": "A String", # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.
760          #
761          # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
762      "currentActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
763        "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
764        "recreating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
765        "creating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
766            #
767            # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
768        "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
769        "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
770        "abandoning": 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
771        "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
772        "creatingWithoutRetries": 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.
773        "refreshing": 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
774      },
775      "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
776      "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
777          #
778          # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
779        {
780          "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to:
781              # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
782              # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up.  If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
783            "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
784                #
785                #
786                # - If the value is fixed, then the calculated value is equal to the fixed value.
787                # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
788            "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
789            "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
790          },
791          "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached.
792          "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
793        },
794      ],
795      "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
796      "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
797        "zones": [ # Zones where the regional managed instance group will create and manage instances.
798          {
799            "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
800          },
801        ],
802      },
803      "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
804    }</pre>
805</div>
806
807<div class="method">
808    <code class="details" id="insert">insert(project, zone, body, requestId=None)</code>
809  <pre>Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.
810
811A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
812
813Args:
814  project: string, Project ID for this request. (required)
815  zone: string, The name of the zone where you want to create the managed instance group. (required)
816  body: object, The request body. (required)
817    The object takes the form of:
818
819{ # Represents a Managed Instance Group resource.
820      #
821      # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
822      #
823      # For zonal Managed Instance Group, use the instanceGroupManagers resource.
824      #
825      # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
826    "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
827    "pendingActions": { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
828      "recreating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
829      "deleting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
830      "creating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
831      "restarting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
832    },
833    "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
834    "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
835    "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
836    "serviceAccount": "A String", # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
837    "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
838    "baseInstanceName": "A String", # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
839    "updatePolicy": { # The update policy for this managed instance group.
840      "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
841          #
842          # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
843        "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
844            #
845            #
846            # - If the value is fixed, then the calculated value is equal to the fixed value.
847            # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
848        "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
849        "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
850      },
851      "minimalAction": "A String", # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.
852      "instanceRedistributionType": "A String",
853      "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied:
854          #
855          #
856          # - The instance's status is RUNNING.
857          # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available.  By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
858          #
859          # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
860        "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
861            #
862            #
863            # - If the value is fixed, then the calculated value is equal to the fixed value.
864            # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
865        "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
866        "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
867      },
868      "type": "A String", # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
869      "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
870    },
871    "targetPools": [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
872      "A String",
873    ],
874    "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
875      { # The named port. For example: .
876        "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
877        "port": 42, # The port number, which can be a value between 1 and 65535.
878      },
879    ],
880    "status": { # [Output Only] The status of this managed instance group.
881      "isStable": True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
882      "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
883        "isReached": True or False, # [Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances' target version are specified by version field on Instance Group Manager.
884      },
885    },
886    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
887    "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
888      {
889        "healthCheck": "A String", # The URL for the health check that signals autohealing.
890        "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
891      },
892    ],
893    "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
894    "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
895    "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group.
896    "fingerprint": "A String", # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.
897        #
898        # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
899    "currentActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
900      "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
901      "recreating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
902      "creating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
903          #
904          # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
905      "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
906      "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
907      "abandoning": 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
908      "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
909      "creatingWithoutRetries": 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.
910      "refreshing": 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
911    },
912    "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
913    "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
914        #
915        # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
916      {
917        "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to:
918            # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
919            # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up.  If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
920          "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
921              #
922              #
923              # - If the value is fixed, then the calculated value is equal to the fixed value.
924              # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
925          "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
926          "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
927        },
928        "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached.
929        "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
930      },
931    ],
932    "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
933    "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
934      "zones": [ # Zones where the regional managed instance group will create and manage instances.
935        {
936          "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
937        },
938      ],
939    },
940    "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
941  }
942
943  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.
944
945For 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.
946
947The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
948
949Returns:
950  An object of the form:
951
952    { # Represents an Operation resource.
953      #
954      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
955      #
956      # Operations can be global, regional or zonal.
957      # - For global operations, use the globalOperations resource.
958      # - For regional operations, use the regionOperations resource.
959      # - For zonal operations, use the zonalOperations resource.
960      #
961      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
962    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
963    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
964    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
965    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
966    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
967    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
968    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
969    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
970    "progress": 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.
971    "httpErrorStatusCode": 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.
972    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
973    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
974    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
975    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
976      {
977        "message": "A String", # [Output Only] A human-readable description of the warning code.
978        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
979        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
980            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
981          {
982            "value": "A String", # [Output Only] A warning data value corresponding to the key.
983            "key": "A String", # [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).
984          },
985        ],
986      },
987    ],
988    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
989    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
990    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
991    "name": "A String", # [Output Only] Name of the resource.
992    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
993    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
994      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
995        {
996          "message": "A String", # [Output Only] An optional, human-readable error message.
997          "code": "A String", # [Output Only] The error type identifier for this error.
998          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
999        },
1000      ],
1001    },
1002    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1003    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1004    "targetLink": "A String", # [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.
1005  }</pre>
1006</div>
1007
1008<div class="method">
1009    <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
1010  <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
1011
1012Args:
1013  project: string, Project ID for this request. (required)
1014  zone: string, The name of the zone where the managed instance group is located. (required)
1015  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1016
1017You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". 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.
1018
1019Currently, only sorting by name or creationTimestamp desc is supported.
1020  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)
1021  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.
1022  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 =, !=, >, or <.
1023
1024For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
1025
1026You 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.
1027
1028To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
1029
1030Returns:
1031  An object of the form:
1032
1033    { # [Output Only] A list of managed instance groups.
1034    "nextPageToken": "A String", # [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.
1035    "kind": "compute#instanceGroupManagerList", # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
1036    "items": [ # A list of InstanceGroupManager resources.
1037      { # Represents a Managed Instance Group resource.
1038            #
1039            # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1040            #
1041            # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1042            #
1043            # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
1044          "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
1045          "pendingActions": { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
1046            "recreating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
1047            "deleting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
1048            "creating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
1049            "restarting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
1050          },
1051          "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1052          "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1053          "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
1054          "serviceAccount": "A String", # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
1055          "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1056          "baseInstanceName": "A String", # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
1057          "updatePolicy": { # The update policy for this managed instance group.
1058            "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1059                #
1060                # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1061              "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1062                  #
1063                  #
1064                  # - If the value is fixed, then the calculated value is equal to the fixed value.
1065                  # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1066              "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1067              "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1068            },
1069            "minimalAction": "A String", # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.
1070            "instanceRedistributionType": "A String",
1071            "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied:
1072                #
1073                #
1074                # - The instance's status is RUNNING.
1075                # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available.  By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1076                #
1077                # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1078              "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1079                  #
1080                  #
1081                  # - If the value is fixed, then the calculated value is equal to the fixed value.
1082                  # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1083              "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1084              "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1085            },
1086            "type": "A String", # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
1087            "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1088          },
1089          "targetPools": [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
1090            "A String",
1091          ],
1092          "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1093            { # The named port. For example: .
1094              "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1095              "port": 42, # The port number, which can be a value between 1 and 65535.
1096            },
1097          ],
1098          "status": { # [Output Only] The status of this managed instance group.
1099            "isStable": True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
1100            "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
1101              "isReached": True or False, # [Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances' target version are specified by version field on Instance Group Manager.
1102            },
1103          },
1104          "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1105          "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
1106            {
1107              "healthCheck": "A String", # The URL for the health check that signals autohealing.
1108              "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
1109            },
1110          ],
1111          "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
1112          "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
1113          "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group.
1114          "fingerprint": "A String", # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.
1115              #
1116              # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1117          "currentActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
1118            "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1119            "recreating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
1120            "creating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
1121                #
1122                # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1123            "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
1124            "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1125            "abandoning": 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
1126            "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1127            "creatingWithoutRetries": 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.
1128            "refreshing": 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
1129          },
1130          "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1131          "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
1132              #
1133              # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
1134            {
1135              "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to:
1136                  # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1137                  # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up.  If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
1138                "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1139                    #
1140                    #
1141                    # - If the value is fixed, then the calculated value is equal to the fixed value.
1142                    # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1143                "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1144                "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1145              },
1146              "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached.
1147              "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
1148            },
1149          ],
1150          "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1151          "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
1152            "zones": [ # Zones where the regional managed instance group will create and manage instances.
1153              {
1154                "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
1155              },
1156            ],
1157          },
1158          "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
1159        },
1160    ],
1161    "warning": { # [Output Only] Informational warning message.
1162      "message": "A String", # [Output Only] A human-readable description of the warning code.
1163      "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1164      "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1165          # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1166        {
1167          "value": "A String", # [Output Only] A warning data value corresponding to the key.
1168          "key": "A String", # [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).
1169        },
1170      ],
1171    },
1172    "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1173    "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1174  }</pre>
1175</div>
1176
1177<div class="method">
1178    <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</code>
1179  <pre>Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.
1180
1181Args:
1182  project: string, Project ID for this request. (required)
1183  zone: string, The name of the zone where the managed instance group is located. (required)
1184  instanceGroupManager: string, The name of the managed instance group. (required)
1185  order_by: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1186
1187You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". 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.
1188
1189Currently, only sorting by name or creationTimestamp desc is supported.
1190  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)
1191  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.
1192  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 =, !=, >, or <.
1193
1194For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
1195
1196You 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.
1197
1198To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
1199
1200Returns:
1201  An object of the form:
1202
1203    {
1204    "nextPageToken": "A String", # [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.
1205    "managedInstances": [ # [Output Only] The list of instances in the managed instance group.
1206      { # A Managed Instance resource.
1207        "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist.
1208        "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance.
1209          "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
1210            "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1211              {
1212                "message": "A String", # [Output Only] An optional, human-readable error message.
1213                "code": "A String", # [Output Only] The error type identifier for this error.
1214                "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1215              },
1216            ],
1217          },
1218        },
1219        "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
1220        "version": { # [Output Only] Intended version of this instance.
1221          "instanceTemplate": "A String", # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }.
1222          "name": "A String", # [Output Only] Name of the version.
1223        },
1224        "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
1225            # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
1226            # - CREATING The managed instance group is creating this instance. If the group fails to create this instance, it will try again until it is successful.
1227            # - CREATING_WITHOUT_RETRIES The managed instance group is attempting to create this instance only once. If the group fails to create this instance, it does not try again and the group's targetSize value is decreased instead.
1228            # - RECREATING The managed instance group is recreating this instance.
1229            # - DELETING The managed instance group is permanently deleting this instance.
1230            # - ABANDONING The managed instance group is abandoning this instance. The instance will be removed from the instance group and from any target pools that are associated with this group.
1231            # - RESTARTING The managed instance group is restarting the instance.
1232            # - REFRESHING The managed instance group is applying configuration changes to the instance without stopping it. For example, the group can update the target pool list for an instance without stopping that instance.
1233            # - VERIFYING The managed instance group has created the instance and it is in the process of being verified.
1234        "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
1235      },
1236    ],
1237  }</pre>
1238</div>
1239
1240<div class="method">
1241    <code class="details" id="listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</code>
1242  <pre>Retrieves the next page of results.
1243
1244Args:
1245  previous_request: The request for the previous page. (required)
1246  previous_response: The response from the request for the previous page. (required)
1247
1248Returns:
1249  A request object that you can call 'execute()' on to request the next
1250  page. Returns None if there are no more items in the collection.
1251    </pre>
1252</div>
1253
1254<div class="method">
1255    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1256  <pre>Retrieves the next page of results.
1257
1258Args:
1259  previous_request: The request for the previous page. (required)
1260  previous_response: The response from the request for the previous page. (required)
1261
1262Returns:
1263  A request object that you can call 'execute()' on to request the next
1264  page. Returns None if there are no more items in the collection.
1265    </pre>
1266</div>
1267
1268<div class="method">
1269    <code class="details" id="patch">patch(project, zone, instanceGroupManager, body, requestId=None)</code>
1270  <pre>Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
1271
1272Args:
1273  project: string, Project ID for this request. (required)
1274  zone: string, The name of the zone where you want to create the managed instance group. (required)
1275  instanceGroupManager: string, The name of the instance group manager. (required)
1276  body: object, The request body. (required)
1277    The object takes the form of:
1278
1279{ # Represents a Managed Instance Group resource.
1280      #
1281      # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1282      #
1283      # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1284      #
1285      # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
1286    "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
1287    "pendingActions": { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
1288      "recreating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
1289      "deleting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
1290      "creating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
1291      "restarting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
1292    },
1293    "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1294    "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1295    "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
1296    "serviceAccount": "A String", # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
1297    "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1298    "baseInstanceName": "A String", # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
1299    "updatePolicy": { # The update policy for this managed instance group.
1300      "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1301          #
1302          # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1303        "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1304            #
1305            #
1306            # - If the value is fixed, then the calculated value is equal to the fixed value.
1307            # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1308        "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1309        "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1310      },
1311      "minimalAction": "A String", # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.
1312      "instanceRedistributionType": "A String",
1313      "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied:
1314          #
1315          #
1316          # - The instance's status is RUNNING.
1317          # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available.  By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1318          #
1319          # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1320        "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1321            #
1322            #
1323            # - If the value is fixed, then the calculated value is equal to the fixed value.
1324            # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1325        "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1326        "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1327      },
1328      "type": "A String", # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
1329      "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1330    },
1331    "targetPools": [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
1332      "A String",
1333    ],
1334    "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1335      { # The named port. For example: .
1336        "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1337        "port": 42, # The port number, which can be a value between 1 and 65535.
1338      },
1339    ],
1340    "status": { # [Output Only] The status of this managed instance group.
1341      "isStable": True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
1342      "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
1343        "isReached": True or False, # [Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances' target version are specified by version field on Instance Group Manager.
1344      },
1345    },
1346    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1347    "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
1348      {
1349        "healthCheck": "A String", # The URL for the health check that signals autohealing.
1350        "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
1351      },
1352    ],
1353    "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
1354    "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
1355    "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group.
1356    "fingerprint": "A String", # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.
1357        #
1358        # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1359    "currentActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
1360      "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1361      "recreating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
1362      "creating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
1363          #
1364          # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1365      "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
1366      "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1367      "abandoning": 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
1368      "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1369      "creatingWithoutRetries": 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.
1370      "refreshing": 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
1371    },
1372    "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1373    "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
1374        #
1375        # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
1376      {
1377        "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to:
1378            # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1379            # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up.  If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
1380          "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1381              #
1382              #
1383              # - If the value is fixed, then the calculated value is equal to the fixed value.
1384              # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1385          "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1386          "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1387        },
1388        "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached.
1389        "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
1390      },
1391    ],
1392    "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1393    "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
1394      "zones": [ # Zones where the regional managed instance group will create and manage instances.
1395        {
1396          "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
1397        },
1398      ],
1399    },
1400    "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
1401  }
1402
1403  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.
1404
1405For 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.
1406
1407The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1408
1409Returns:
1410  An object of the form:
1411
1412    { # Represents an Operation resource.
1413      #
1414      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1415      #
1416      # Operations can be global, regional or zonal.
1417      # - For global operations, use the globalOperations resource.
1418      # - For regional operations, use the regionOperations resource.
1419      # - For zonal operations, use the zonalOperations resource.
1420      #
1421      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
1422    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1423    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1424    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1425    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1426    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1427    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1428    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1429    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1430    "progress": 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.
1431    "httpErrorStatusCode": 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.
1432    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1433    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1434    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1435    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1436      {
1437        "message": "A String", # [Output Only] A human-readable description of the warning code.
1438        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1439        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1440            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1441          {
1442            "value": "A String", # [Output Only] A warning data value corresponding to the key.
1443            "key": "A String", # [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).
1444          },
1445        ],
1446      },
1447    ],
1448    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1449    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1450    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1451    "name": "A String", # [Output Only] Name of the resource.
1452    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1453    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1454      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1455        {
1456          "message": "A String", # [Output Only] An optional, human-readable error message.
1457          "code": "A String", # [Output Only] The error type identifier for this error.
1458          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1459        },
1460      ],
1461    },
1462    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1463    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1464    "targetLink": "A String", # [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.
1465  }</pre>
1466</div>
1467
1468<div class="method">
1469    <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body, requestId=None)</code>
1470  <pre>Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.
1471
1472If 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 has elapsed before the VM instance is removed or deleted.
1473
1474You can specify a maximum of 1000 instances with this method per request.
1475
1476Args:
1477  project: string, Project ID for this request. (required)
1478  zone: string, The name of the zone where the managed instance group is located. (required)
1479  instanceGroupManager: string, The name of the managed instance group. (required)
1480  body: object, The request body. (required)
1481    The object takes the form of:
1482
1483{
1484    "instances": [ # The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
1485      "A String",
1486    ],
1487  }
1488
1489  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.
1490
1491For 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.
1492
1493The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1494
1495Returns:
1496  An object of the form:
1497
1498    { # Represents an Operation resource.
1499      #
1500      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1501      #
1502      # Operations can be global, regional or zonal.
1503      # - For global operations, use the globalOperations resource.
1504      # - For regional operations, use the regionOperations resource.
1505      # - For zonal operations, use the zonalOperations resource.
1506      #
1507      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
1508    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1509    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1510    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1511    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1512    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1513    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1514    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1515    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1516    "progress": 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.
1517    "httpErrorStatusCode": 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.
1518    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1519    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1520    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1521    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1522      {
1523        "message": "A String", # [Output Only] A human-readable description of the warning code.
1524        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1525        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1526            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1527          {
1528            "value": "A String", # [Output Only] A warning data value corresponding to the key.
1529            "key": "A String", # [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).
1530          },
1531        ],
1532      },
1533    ],
1534    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1535    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1536    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1537    "name": "A String", # [Output Only] Name of the resource.
1538    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1539    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1540      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1541        {
1542          "message": "A String", # [Output Only] An optional, human-readable error message.
1543          "code": "A String", # [Output Only] The error type identifier for this error.
1544          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1545        },
1546      ],
1547    },
1548    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1549    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1550    "targetLink": "A String", # [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.
1551  }</pre>
1552</div>
1553
1554<div class="method">
1555    <code class="details" id="resize">resize(project, zone, instanceGroupManager, size, requestId=None)</code>
1556  <pre>Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.
1557
1558When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:
1559
1560+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.
1561
1562This list is subject to change.
1563
1564If 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 has elapsed before the VM instance is removed or deleted.
1565
1566Args:
1567  project: string, Project ID for this request. (required)
1568  zone: string, The name of the zone where the managed instance group is located. (required)
1569  instanceGroupManager: string, The name of the managed instance group. (required)
1570  size: integer, The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter. (required)
1571  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.
1572
1573For 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.
1574
1575The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1576
1577Returns:
1578  An object of the form:
1579
1580    { # Represents an Operation resource.
1581      #
1582      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1583      #
1584      # Operations can be global, regional or zonal.
1585      # - For global operations, use the globalOperations resource.
1586      # - For regional operations, use the regionOperations resource.
1587      # - For zonal operations, use the zonalOperations resource.
1588      #
1589      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
1590    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1591    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1592    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1593    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1594    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1595    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1596    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1597    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1598    "progress": 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.
1599    "httpErrorStatusCode": 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.
1600    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1601    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1602    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1603    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1604      {
1605        "message": "A String", # [Output Only] A human-readable description of the warning code.
1606        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1607        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1608            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1609          {
1610            "value": "A String", # [Output Only] A warning data value corresponding to the key.
1611            "key": "A String", # [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).
1612          },
1613        ],
1614      },
1615    ],
1616    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1617    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1618    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1619    "name": "A String", # [Output Only] Name of the resource.
1620    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1621    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1622      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1623        {
1624          "message": "A String", # [Output Only] An optional, human-readable error message.
1625          "code": "A String", # [Output Only] The error type identifier for this error.
1626          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1627        },
1628      ],
1629    },
1630    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1631    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1632    "targetLink": "A String", # [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.
1633  }</pre>
1634</div>
1635
1636<div class="method">
1637    <code class="details" id="resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body, requestId=None)</code>
1638  <pre>Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.
1639
1640If you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.
1641
1642If 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 has elapsed before the VM instance is removed or deleted.
1643
1644Args:
1645  project: string, Project ID for this request. (required)
1646  zone: string, The name of the zone where the managed instance group is located. (required)
1647  instanceGroupManager: string, The name of the managed instance group. (required)
1648  body: object, The request body. (required)
1649    The object takes the form of:
1650
1651{
1652    "noCreationRetries": True or False, # If this flag is true, the managed instance group attempts to create all instances initiated by this resize request only once. If there is an error during creation, the managed instance group does not retry create this instance, and we will decrease the targetSize of the request instead. If the flag is false, the group attempts to recreate each instance continuously until it succeeds.
1653        #
1654        # This flag matters only in the first attempt of creation of an instance. After an instance is successfully created while this flag is enabled, the instance behaves the same way as all the other instances created with a regular resize request. In particular, if a running instance dies unexpectedly at a later time and needs to be recreated, this mode does not affect the recreation behavior in that scenario.
1655        #
1656        # This flag is applicable only to the current resize request. It does not influence other resize requests in any way.
1657        #
1658        # You can see which instances is being creating in which mode by calling the get or listManagedInstances API.
1659    "targetSize": 42, # The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.
1660  }
1661
1662  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.
1663
1664For 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.
1665
1666The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1667
1668Returns:
1669  An object of the form:
1670
1671    { # Represents an Operation resource.
1672      #
1673      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1674      #
1675      # Operations can be global, regional or zonal.
1676      # - For global operations, use the globalOperations resource.
1677      # - For regional operations, use the regionOperations resource.
1678      # - For zonal operations, use the zonalOperations resource.
1679      #
1680      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
1681    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1682    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1683    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1684    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1685    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1686    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1687    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1688    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1689    "progress": 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.
1690    "httpErrorStatusCode": 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.
1691    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1692    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1693    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1694    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1695      {
1696        "message": "A String", # [Output Only] A human-readable description of the warning code.
1697        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1698        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1699            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1700          {
1701            "value": "A String", # [Output Only] A warning data value corresponding to the key.
1702            "key": "A String", # [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).
1703          },
1704        ],
1705      },
1706    ],
1707    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1708    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1709    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1710    "name": "A String", # [Output Only] Name of the resource.
1711    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1712    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1713      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1714        {
1715          "message": "A String", # [Output Only] An optional, human-readable error message.
1716          "code": "A String", # [Output Only] The error type identifier for this error.
1717          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1718        },
1719      ],
1720    },
1721    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1722    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1723    "targetLink": "A String", # [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.
1724  }</pre>
1725</div>
1726
1727<div class="method">
1728    <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body, requestId=None)</code>
1729  <pre>Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.
1730
1731Args:
1732  project: string, Project ID for this request. (required)
1733  zone: string, The name of the zone where the managed instance group is located. (required)
1734  instanceGroupManager: string, The name of the instance group manager. (required)
1735  body: object, The request body. (required)
1736    The object takes the form of:
1737
1738{
1739    "autoHealingPolicies": [
1740      {
1741        "healthCheck": "A String", # The URL for the health check that signals autohealing.
1742        "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
1743      },
1744    ],
1745  }
1746
1747  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.
1748
1749For 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.
1750
1751The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1752
1753Returns:
1754  An object of the form:
1755
1756    { # Represents an Operation resource.
1757      #
1758      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1759      #
1760      # Operations can be global, regional or zonal.
1761      # - For global operations, use the globalOperations resource.
1762      # - For regional operations, use the regionOperations resource.
1763      # - For zonal operations, use the zonalOperations resource.
1764      #
1765      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
1766    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1767    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1768    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1769    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1770    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1771    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1772    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1773    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1774    "progress": 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.
1775    "httpErrorStatusCode": 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.
1776    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1777    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1778    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1779    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1780      {
1781        "message": "A String", # [Output Only] A human-readable description of the warning code.
1782        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1783        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1784            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1785          {
1786            "value": "A String", # [Output Only] A warning data value corresponding to the key.
1787            "key": "A String", # [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).
1788          },
1789        ],
1790      },
1791    ],
1792    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1793    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1794    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1795    "name": "A String", # [Output Only] Name of the resource.
1796    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1797    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1798      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1799        {
1800          "message": "A String", # [Output Only] An optional, human-readable error message.
1801          "code": "A String", # [Output Only] The error type identifier for this error.
1802          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1803        },
1804      ],
1805    },
1806    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1807    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1808    "targetLink": "A String", # [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.
1809  }</pre>
1810</div>
1811
1812<div class="method">
1813    <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body, requestId=None)</code>
1814  <pre>Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.
1815
1816Args:
1817  project: string, Project ID for this request. (required)
1818  zone: string, The name of the zone where the managed instance group is located. (required)
1819  instanceGroupManager: string, The name of the managed instance group. (required)
1820  body: object, The request body. (required)
1821    The object takes the form of:
1822
1823{
1824    "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group.
1825  }
1826
1827  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.
1828
1829For 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.
1830
1831The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1832
1833Returns:
1834  An object of the form:
1835
1836    { # Represents an Operation resource.
1837      #
1838      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1839      #
1840      # Operations can be global, regional or zonal.
1841      # - For global operations, use the globalOperations resource.
1842      # - For regional operations, use the regionOperations resource.
1843      # - For zonal operations, use the zonalOperations resource.
1844      #
1845      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
1846    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1847    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1848    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1849    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1850    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1851    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1852    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1853    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1854    "progress": 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.
1855    "httpErrorStatusCode": 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.
1856    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1857    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1858    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1859    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1860      {
1861        "message": "A String", # [Output Only] A human-readable description of the warning code.
1862        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1863        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1864            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1865          {
1866            "value": "A String", # [Output Only] A warning data value corresponding to the key.
1867            "key": "A String", # [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).
1868          },
1869        ],
1870      },
1871    ],
1872    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1873    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1874    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1875    "name": "A String", # [Output Only] Name of the resource.
1876    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1877    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1878      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1879        {
1880          "message": "A String", # [Output Only] An optional, human-readable error message.
1881          "code": "A String", # [Output Only] The error type identifier for this error.
1882          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1883        },
1884      ],
1885    },
1886    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1887    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1888    "targetLink": "A String", # [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.
1889  }</pre>
1890</div>
1891
1892<div class="method">
1893    <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body, requestId=None)</code>
1894  <pre>Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.
1895
1896Args:
1897  project: string, Project ID for this request. (required)
1898  zone: string, The name of the zone where the managed instance group is located. (required)
1899  instanceGroupManager: string, The name of the managed instance group. (required)
1900  body: object, The request body. (required)
1901    The object takes the form of:
1902
1903{
1904    "targetPools": [ # The list of target pool URLs that instances in this managed instance group belong to. The managed instance group applies these target pools to all of the instances in the group. Existing instances and new instances in the group all receive these target pool settings.
1905      "A String",
1906    ],
1907    "fingerprint": "A String", # The fingerprint of the target pools information. Use this optional property to prevent conflicts when multiple users change the target pools settings concurrently. Obtain the fingerprint with the instanceGroupManagers.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.
1908  }
1909
1910  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.
1911
1912For 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.
1913
1914The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1915
1916Returns:
1917  An object of the form:
1918
1919    { # Represents an Operation resource.
1920      #
1921      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1922      #
1923      # Operations can be global, regional or zonal.
1924      # - For global operations, use the globalOperations resource.
1925      # - For regional operations, use the regionOperations resource.
1926      # - For zonal operations, use the zonalOperations resource.
1927      #
1928      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
1929    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1930    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1931    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1932    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1933    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1934    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1935    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1936    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1937    "progress": 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.
1938    "httpErrorStatusCode": 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.
1939    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1940    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1941    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1942    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1943      {
1944        "message": "A String", # [Output Only] A human-readable description of the warning code.
1945        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1946        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1947            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1948          {
1949            "value": "A String", # [Output Only] A warning data value corresponding to the key.
1950            "key": "A String", # [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).
1951          },
1952        ],
1953      },
1954    ],
1955    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1956    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1957    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1958    "name": "A String", # [Output Only] Name of the resource.
1959    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1960    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1961      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1962        {
1963          "message": "A String", # [Output Only] An optional, human-readable error message.
1964          "code": "A String", # [Output Only] The error type identifier for this error.
1965          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1966        },
1967      ],
1968    },
1969    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1970    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1971    "targetLink": "A String", # [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.
1972  }</pre>
1973</div>
1974
1975<div class="method">
1976    <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code>
1977  <pre>Returns permissions that a caller has on the specified resource.
1978
1979Args:
1980  project: string, Project ID for this request. (required)
1981  zone: string, The name of the zone for this request. (required)
1982  resource: string, Name or id of the resource for this request. (required)
1983  body: object, The request body. (required)
1984    The object takes the form of:
1985
1986{
1987    "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1988      "A String",
1989    ],
1990  }
1991
1992
1993Returns:
1994  An object of the form:
1995
1996    {
1997    "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1998      "A String",
1999    ],
2000  }</pre>
2001</div>
2002
2003<div class="method">
2004    <code class="details" id="update">update(project, zone, instanceGroupManager, body, requestId=None)</code>
2005  <pre>Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.
2006
2007Args:
2008  project: string, Project ID for this request. (required)
2009  zone: string, The name of the zone where you want to create the managed instance group. (required)
2010  instanceGroupManager: string, The name of the instance group manager. (required)
2011  body: object, The request body. (required)
2012    The object takes the form of:
2013
2014{ # Represents a Managed Instance Group resource.
2015      #
2016      # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
2017      #
2018      # For zonal Managed Instance Group, use the instanceGroupManagers resource.
2019      #
2020      # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
2021    "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
2022    "pendingActions": { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
2023      "recreating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
2024      "deleting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
2025      "creating": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
2026      "restarting": 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
2027    },
2028    "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
2029    "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
2030    "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
2031    "serviceAccount": "A String", # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
2032    "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
2033    "baseInstanceName": "A String", # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
2034    "updatePolicy": { # The update policy for this managed instance group.
2035      "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
2036          #
2037          # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
2038        "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2039            #
2040            #
2041            # - If the value is fixed, then the calculated value is equal to the fixed value.
2042            # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
2043        "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2044        "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2045      },
2046      "minimalAction": "A String", # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.
2047      "instanceRedistributionType": "A String",
2048      "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied:
2049          #
2050          #
2051          # - The instance's status is RUNNING.
2052          # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available.  By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
2053          #
2054          # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
2055        "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2056            #
2057            #
2058            # - If the value is fixed, then the calculated value is equal to the fixed value.
2059            # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
2060        "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2061        "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2062      },
2063      "type": "A String", # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
2064      "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
2065    },
2066    "targetPools": [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
2067      "A String",
2068    ],
2069    "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
2070      { # The named port. For example: .
2071        "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
2072        "port": 42, # The port number, which can be a value between 1 and 65535.
2073      },
2074    ],
2075    "status": { # [Output Only] The status of this managed instance group.
2076      "isStable": True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
2077      "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
2078        "isReached": True or False, # [Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances' target version are specified by version field on Instance Group Manager.
2079      },
2080    },
2081    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2082    "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
2083      {
2084        "healthCheck": "A String", # The URL for the health check that signals autohealing.
2085        "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
2086      },
2087    ],
2088    "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
2089    "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
2090    "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group.
2091    "fingerprint": "A String", # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.
2092        #
2093        # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
2094    "currentActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
2095      "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
2096      "recreating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
2097      "creating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
2098          #
2099          # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
2100      "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
2101      "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
2102      "abandoning": 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
2103      "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
2104      "creatingWithoutRetries": 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.
2105      "refreshing": 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
2106    },
2107    "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
2108    "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
2109        #
2110        # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
2111      {
2112        "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to:
2113            # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
2114            # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up.  If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
2115          "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2116              #
2117              #
2118              # - If the value is fixed, then the calculated value is equal to the fixed value.
2119              # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
2120          "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2121          "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2122        },
2123        "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached.
2124        "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
2125      },
2126    ],
2127    "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
2128    "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
2129      "zones": [ # Zones where the regional managed instance group will create and manage instances.
2130        {
2131          "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
2132        },
2133      ],
2134    },
2135    "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
2136  }
2137
2138  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.
2139
2140For 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.
2141
2142The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2143
2144Returns:
2145  An object of the form:
2146
2147    { # Represents an Operation resource.
2148      #
2149      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2150      #
2151      # Operations can be global, regional or zonal.
2152      # - For global operations, use the globalOperations resource.
2153      # - For regional operations, use the regionOperations resource.
2154      # - For zonal operations, use the zonalOperations resource.
2155      #
2156      # For more information, read  Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
2157    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2158    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2159    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2160    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2161    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2162    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2163    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2164    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2165    "progress": 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.
2166    "httpErrorStatusCode": 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.
2167    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2168    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2169    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2170    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2171      {
2172        "message": "A String", # [Output Only] A human-readable description of the warning code.
2173        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2174        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2175            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2176          {
2177            "value": "A String", # [Output Only] A warning data value corresponding to the key.
2178            "key": "A String", # [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).
2179          },
2180        ],
2181      },
2182    ],
2183    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2184    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2185    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2186    "name": "A String", # [Output Only] Name of the resource.
2187    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2188    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2189      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2190        {
2191          "message": "A String", # [Output Only] An optional, human-readable error message.
2192          "code": "A String", # [Output Only] The error type identifier for this error.
2193          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2194        },
2195      ],
2196    },
2197    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2198    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2199    "targetLink": "A String", # [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.
2200  }</pre>
2201</div>
2202
2203</body></html>