• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.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="#createInstances">createInstances(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
91<p class="firstline">Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.</p>
92<p class="toc_element">
93  <code><a href="#delete">delete(project, zone, instanceGroupManager, requestId=None)</a></code></p>
94<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>
95<p class="toc_element">
96  <code><a href="#deleteInstances">deleteInstances(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
97<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>
98<p class="toc_element">
99  <code><a href="#deletePerInstanceConfigs">deletePerInstanceConfigs(project, zone, instanceGroupManager, body)</a></code></p>
100<p class="firstline">Deletes selected per-instance configs for the managed instance group.</p>
101<p class="toc_element">
102  <code><a href="#get">get(project, zone, instanceGroupManager)</a></code></p>
103<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>
104<p class="toc_element">
105  <code><a href="#insert">insert(project, zone, body, requestId=None)</a></code></p>
106<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>
107<p class="toc_element">
108  <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
109<p class="firstline">Retrieves a list of managed instance groups that are contained within the specified project and zone.</p>
110<p class="toc_element">
111  <code><a href="#listErrors">listErrors(project, zone, instanceGroupManager, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
112<p class="firstline">Lists all errors thrown by actions on instances for a given managed instance group.</p>
113<p class="toc_element">
114  <code><a href="#listErrors_next">listErrors_next(previous_request, previous_response)</a></code></p>
115<p class="firstline">Retrieves the next page of results.</p>
116<p class="toc_element">
117  <code><a href="#listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
118<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>
119<p class="toc_element">
120  <code><a href="#listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</a></code></p>
121<p class="firstline">Retrieves the next page of results.</p>
122<p class="toc_element">
123  <code><a href="#listPerInstanceConfigs">listPerInstanceConfigs(project, zone, instanceGroupManager, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
124<p class="firstline">Lists all of the per-instance configs defined for the managed instance group.</p>
125<p class="toc_element">
126  <code><a href="#listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</a></code></p>
127<p class="firstline">Retrieves the next page of results.</p>
128<p class="toc_element">
129  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
130<p class="firstline">Retrieves the next page of results.</p>
131<p class="toc_element">
132  <code><a href="#patch">patch(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
133<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>
134<p class="toc_element">
135  <code><a href="#patchPerInstanceConfigs">patchPerInstanceConfigs(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
136<p class="firstline">Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.</p>
137<p class="toc_element">
138  <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
139<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>
140<p class="toc_element">
141  <code><a href="#resize">resize(project, zone, instanceGroupManager, size, requestId=None)</a></code></p>
142<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>
143<p class="toc_element">
144  <code><a href="#resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
145<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>
146<p class="toc_element">
147  <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
148<p class="firstline">Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.</p>
149<p class="toc_element">
150  <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
151<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>
152<p class="toc_element">
153  <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
154<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>
155<p class="toc_element">
156  <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p>
157<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
158<p class="toc_element">
159  <code><a href="#update">update(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
160<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>
161<p class="toc_element">
162  <code><a href="#updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
163<p class="firstline">Insert or update (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.</p>
164<h3>Method Details</h3>
165<div class="method">
166    <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body, requestId=None)</code>
167  <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.
168
169If 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.
170
171You can specify a maximum of 1000 instances with this method per request.
172
173Args:
174  project: string, Project ID for this request. (required)
175  zone: string, The name of the zone where the managed instance group is located. (required)
176  instanceGroupManager: string, The name of the managed instance group. (required)
177  body: object, The request body. (required)
178    The object takes the form of:
179
180{
181    "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].
182      "A String",
183    ],
184  }
185
186  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.
187
188For 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.
189
190The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
191
192Returns:
193  An object of the form:
194
195    { # Represents an Operation resource.
196      #
197      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
198      #
199      # Operations can be global, regional or zonal.
200      # - For global operations, use the globalOperations resource.
201      # - For regional operations, use the regionOperations resource.
202      # - For zonal operations, use the zonalOperations resource.
203      #
204      # 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 ==)
205    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
206    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
207    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
208    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
209    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
210    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
211    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
212    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
213    "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.
214    "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.
215    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
216    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
217    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
218    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
219      {
220        "message": "A String", # [Output Only] A human-readable description of the warning code.
221        "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.
222        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
223            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
224          {
225            "value": "A String", # [Output Only] A warning data value corresponding to the key.
226            "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).
227          },
228        ],
229      },
230    ],
231    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
232    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
233    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
234    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
235    "name": "A String", # [Output Only] Name of the resource.
236    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
237    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
238      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
239        {
240          "message": "A String", # [Output Only] An optional, human-readable error message.
241          "code": "A String", # [Output Only] The error type identifier for this error.
242          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
243        },
244      ],
245    },
246    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
247    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
248    "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.
249  }</pre>
250</div>
251
252<div class="method">
253    <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
254  <pre>Retrieves the list of managed instance groups and groups them by zone.
255
256Args:
257  project: string, Project ID for this request. (required)
258  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
259
260You 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.
261
262Currently, only sorting by name or creationTimestamp desc is supported.
263  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)
264  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.
265  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 <.
266
267For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
268
269You 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.
270
271To 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).
272
273Returns:
274  An object of the form:
275
276    {
277    "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.
278    "kind": "compute#instanceGroupManagerAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups.
279    "items": { # A list of InstanceGroupManagersScopedList resources.
280      "a_key": { # [Output Only] The name of the scope that contains this set of managed instance groups.
281        "warning": { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty.
282          "message": "A String", # [Output Only] A human-readable description of the warning code.
283          "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.
284          "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
285              # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
286            {
287              "value": "A String", # [Output Only] A warning data value corresponding to the key.
288              "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).
289            },
290          ],
291        },
292        "instanceGroupManagers": [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone.
293          { # Represents a Managed Instance Group resource.
294              #
295              # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
296              #
297              # For zonal Managed Instance Group, use the instanceGroupManagers resource.
298              #
299              # 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 ==)
300            "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
301            "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.
302              "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.
303              "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.
304              "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.
305              "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.
306            },
307            "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
308            "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
309            "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
310            "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.
311            "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.
312            "updatePolicy": { # The update policy for this managed instance group.
313              "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE
314              "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.
315                  #
316                  # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
317                "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
318                    #
319                    #
320                    # - If the value is fixed, then the calculated value is equal to the fixed value.
321                    # - 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.
322                "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
323                "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
324              },
325              "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.
326              "instanceRedistributionType": "A String",
327              "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:
328                  #
329                  #
330                  # - The instance's status is RUNNING.
331                  # - 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.
332                  #
333                  # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
334                "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
335                    #
336                    #
337                    # - If the value is fixed, then the calculated value is equal to the fixed value.
338                    # - 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.
339                "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
340                "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
341              },
342              "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).
343              "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
344            },
345            "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.
346              "A String",
347            ],
348            "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
349              { # The named port. For example: .
350                "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
351                "port": 42, # The port number, which can be a value between 1 and 65535.
352              },
353            ],
354            "status": { # [Output Only] The status of this managed instance group.
355              "stateful": { # [Output Only] Stateful status of the given Instance Group Manager.
356                "isStateful": True or False, # [Output Only] A bit indicating whether the managed instance group is stateful, i.e. has any disks in Stateful Policy or at least one per-instance config. This is determined based on the user intent, the group may be reported as not stateful even when there is still some preserved state on managed instances.
357              },
358              "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.
359              "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
360                "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.
361              },
362            },
363            "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
364            "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
365              {
366                "healthCheck": "A String", # The URL for the health check that signals autohealing.
367                "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].
368                "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when autohealing. When 'percent' is used, the value is rounded UP. The instance is considered available if all of the following conditions are satisfied: 1. Instance's status is RUNNING. 2. Instance's currentAction is NONE (in particular its liveness health check result was observed to be HEALTHY at least once as it passed VERIFYING). 3. There is no outgoing action on an instance triggered by IGM.
369                    #
370                    # By default, number of concurrently autohealed instances is smaller than the managed instance group target size. However, if a zonal managed instance group has only one instance, or a regional managed instance group has only one instance per zone, autohealing will recreate these instances when they become unhealthy.
371                  "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
372                      #
373                      #
374                      # - If the value is fixed, then the calculated value is equal to the fixed value.
375                      # - 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.
376                  "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
377                  "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
378                },
379              },
380            ],
381            "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
382            "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
383            "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
384            "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.
385            "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.
386                #
387                # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
388            "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.
389              "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
390              "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.
391              "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.
392                  #
393                  # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
394              "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.
395              "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
396              "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.
397              "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
398              "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.
399              "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.
400            },
401            "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
402            "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
403                #
404                # 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.
405              {
406                "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:
407                    # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
408                    # - 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.
409                  "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
410                      #
411                      #
412                      # - If the value is fixed, then the calculated value is equal to the fixed value.
413                      # - 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.
414                  "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
415                  "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
416                },
417                "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.
418                "tag": "A String", # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged. Deprecated in favor of 'name'.
419                "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
420              },
421            ],
422            "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
423            "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.
424            "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
425              "zones": [ # Zones where the regional managed instance group will create and manage instances.
426                {
427                  "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
428                },
429              ],
430            },
431            "statefulPolicy": { # Stateful configuration for this Instanced Group Manager
432              "preservedResources": { # Configuration of all preserved resources.
433                "disks": [ # Disks created on the instances that will be preserved on instance delete, resize down, etc.
434                  {
435                    "deviceName": "A String", # Device name of the disk to be preserved
436                  },
437                ],
438              },
439              "preservedState": { # Configuration of preserved resources.
440                "disks": { # Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks.
441                  "a_key": {
442                    "autoDelete": "A String", # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
443                  },
444                },
445              },
446            },
447            "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
448          },
449        ],
450      },
451    },
452    "warning": { # [Output Only] Informational warning message.
453      "message": "A String", # [Output Only] A human-readable description of the warning code.
454      "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.
455      "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
456          # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
457        {
458          "value": "A String", # [Output Only] A warning data value corresponding to the key.
459          "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).
460        },
461      ],
462    },
463    "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
464    "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
465  }</pre>
466</div>
467
468<div class="method">
469    <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
470  <pre>Retrieves the next page of results.
471
472Args:
473  previous_request: The request for the previous page. (required)
474  previous_response: The response from the request for the previous page. (required)
475
476Returns:
477  A request object that you can call 'execute()' on to request the next
478  page. Returns None if there are no more items in the collection.
479    </pre>
480</div>
481
482<div class="method">
483    <code class="details" id="applyUpdatesToInstances">applyUpdatesToInstances(project, zone, instanceGroupManager, body)</code>
484  <pre>Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.
485
486Args:
487  project: string, Project ID for this request. (required)
488  zone: string, The name of the zone where the managed instance group is located. Should conform to RFC1035. (required)
489  instanceGroupManager: string, The name of the managed instance group, should conform to RFC1035. (required)
490  body: object, The request body. (required)
491    The object takes the form of:
492
493{ # InstanceGroupManagers.applyUpdatesToInstances
494    "maximalAction": "A String", # The maximal action that should be performed on the instances. By default REPLACE. This field is deprecated, please use most_disruptive_allowed_action.
495    "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].
496      "A String",
497    ],
498    "mostDisruptiveAllowedAction": "A String", # The most disruptive action that you want to perform on each instance during the update:
499        # - REPLACE: Delete the instance and create it again.
500        # - RESTART: Stop the instance and start it again.
501        # - REFRESH: Do not stop the instance.
502        # - 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.
503    "minimalAction": "A String", # The minimal action that you want to perform on each instance during the update:
504        # - REPLACE: At minimum, delete the instance and create it again.
505        # - RESTART: Stop the instance and start it again.
506        # - REFRESH: Do not stop the instance.
507        # - 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.
508  }
509
510
511Returns:
512  An object of the form:
513
514    { # Represents an Operation resource.
515      #
516      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
517      #
518      # Operations can be global, regional or zonal.
519      # - For global operations, use the globalOperations resource.
520      # - For regional operations, use the regionOperations resource.
521      # - For zonal operations, use the zonalOperations resource.
522      #
523      # 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 ==)
524    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
525    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
526    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
527    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
528    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
529    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
530    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
531    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
532    "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.
533    "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.
534    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
535    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
536    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
537    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
538      {
539        "message": "A String", # [Output Only] A human-readable description of the warning code.
540        "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.
541        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
542            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
543          {
544            "value": "A String", # [Output Only] A warning data value corresponding to the key.
545            "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).
546          },
547        ],
548      },
549    ],
550    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
551    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
552    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
553    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
554    "name": "A String", # [Output Only] Name of the resource.
555    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
556    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
557      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
558        {
559          "message": "A String", # [Output Only] An optional, human-readable error message.
560          "code": "A String", # [Output Only] The error type identifier for this error.
561          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
562        },
563      ],
564    },
565    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
566    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
567    "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.
568  }</pre>
569</div>
570
571<div class="method">
572    <code class="details" id="createInstances">createInstances(project, zone, instanceGroupManager, body, requestId=None)</code>
573  <pre>Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
574
575Args:
576  project: string, Project ID for this request. (required)
577  zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
578  instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
579  body: object, The request body. (required)
580    The object takes the form of:
581
582{ # InstanceGroupManagers.createInstances
583    "instances": [ # [Required] List of specifications of per-instance configs.
584      {
585        "override": { # Overrides of stateful properties for a given instance
586          "origin": "A String", # [Output Only] Indicates where does the override come from.
587          "disks": [ # Disk overrides defined for this instance. According to documentation the maximum number of disks attached to an instance is 128: https://cloud.google.com/compute/docs/disks/ However, compute API defines the limit at 140, so this is what we check.
588            {
589              "deviceName": "A String", # The name of the device on the VM
590              "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
591              "source": "A String", # The disk that is/will be mounted
592            },
593          ],
594          "metadata": [ # Metadata overrides defined for this instance. TODO(b/69785416) validate the total length is <9 KB
595            {
596              "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
597              "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
598            },
599          ],
600        },
601        "instance": "A String", # The URL of the instance. Serves as a merge key during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same instance URL exists then it will be updated, otherwise a new one will be created.
602        "name": "A String", # The name of the per-instance config and the corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance config for a VM instance that either doesn't exist or is not part of the group will result in a failure.
603        "preservedState": { # Preserved state for a given instance. # Intended preserved state for the given instance. Does not contain state generated based on Stateful Policy.
604          "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
605            "a_key": {
606              "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance.
607              "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
608              "autoDelete": "A String", # These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
609            },
610          },
611          "metadata": { # Preserved metadata defined for this instance.
612            "a_key": "A String",
613          },
614        },
615        "fingerprint": "A String", # Fingerprint of this per-instance config. This field may be used in optimistic locking. It will be ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in order to update an existing per-instance config or the field needs to be unset.
616      },
617    ],
618  }
619
620  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.
621
622For 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.
623
624The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
625
626Returns:
627  An object of the form:
628
629    { # Represents an Operation resource.
630      #
631      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
632      #
633      # Operations can be global, regional or zonal.
634      # - For global operations, use the globalOperations resource.
635      # - For regional operations, use the regionOperations resource.
636      # - For zonal operations, use the zonalOperations resource.
637      #
638      # 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 ==)
639    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
640    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
641    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
642    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
643    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
644    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
645    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
646    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
647    "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.
648    "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.
649    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
650    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
651    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
652    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
653      {
654        "message": "A String", # [Output Only] A human-readable description of the warning code.
655        "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.
656        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
657            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
658          {
659            "value": "A String", # [Output Only] A warning data value corresponding to the key.
660            "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).
661          },
662        ],
663      },
664    ],
665    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
666    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
667    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
668    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
669    "name": "A String", # [Output Only] Name of the resource.
670    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
671    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
672      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
673        {
674          "message": "A String", # [Output Only] An optional, human-readable error message.
675          "code": "A String", # [Output Only] The error type identifier for this error.
676          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
677        },
678      ],
679    },
680    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
681    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
682    "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.
683  }</pre>
684</div>
685
686<div class="method">
687    <code class="details" id="delete">delete(project, zone, instanceGroupManager, requestId=None)</code>
688  <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.
689
690Args:
691  project: string, Project ID for this request. (required)
692  zone: string, The name of the zone where the managed instance group is located. (required)
693  instanceGroupManager: string, The name of the managed instance group to delete. (required)
694  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.
695
696For 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.
697
698The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
699
700Returns:
701  An object of the form:
702
703    { # Represents an Operation resource.
704      #
705      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
706      #
707      # Operations can be global, regional or zonal.
708      # - For global operations, use the globalOperations resource.
709      # - For regional operations, use the regionOperations resource.
710      # - For zonal operations, use the zonalOperations resource.
711      #
712      # 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 ==)
713    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
714    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
715    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
716    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
717    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
718    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
719    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
720    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
721    "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.
722    "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.
723    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
724    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
725    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
726    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
727      {
728        "message": "A String", # [Output Only] A human-readable description of the warning code.
729        "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.
730        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
731            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
732          {
733            "value": "A String", # [Output Only] A warning data value corresponding to the key.
734            "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).
735          },
736        ],
737      },
738    ],
739    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
740    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
741    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
742    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
743    "name": "A String", # [Output Only] Name of the resource.
744    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
745    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
746      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
747        {
748          "message": "A String", # [Output Only] An optional, human-readable error message.
749          "code": "A String", # [Output Only] The error type identifier for this error.
750          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
751        },
752      ],
753    },
754    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
755    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
756    "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.
757  }</pre>
758</div>
759
760<div class="method">
761    <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body, requestId=None)</code>
762  <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.
763
764If 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.
765
766You can specify a maximum of 1000 instances with this method per request.
767
768Args:
769  project: string, Project ID for this request. (required)
770  zone: string, The name of the zone where the managed instance group is located. (required)
771  instanceGroupManager: string, The name of the managed instance group. (required)
772  body: object, The request body. (required)
773    The object takes the form of:
774
775{
776    "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].
777      "A String",
778    ],
779  }
780
781  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.
782
783For 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.
784
785The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
786
787Returns:
788  An object of the form:
789
790    { # Represents an Operation resource.
791      #
792      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
793      #
794      # Operations can be global, regional or zonal.
795      # - For global operations, use the globalOperations resource.
796      # - For regional operations, use the regionOperations resource.
797      # - For zonal operations, use the zonalOperations resource.
798      #
799      # 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 ==)
800    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
801    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
802    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
803    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
804    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
805    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
806    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
807    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
808    "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.
809    "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.
810    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
811    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
812    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
813    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
814      {
815        "message": "A String", # [Output Only] A human-readable description of the warning code.
816        "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.
817        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
818            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
819          {
820            "value": "A String", # [Output Only] A warning data value corresponding to the key.
821            "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).
822          },
823        ],
824      },
825    ],
826    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
827    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
828    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
829    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
830    "name": "A String", # [Output Only] Name of the resource.
831    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
832    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
833      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
834        {
835          "message": "A String", # [Output Only] An optional, human-readable error message.
836          "code": "A String", # [Output Only] The error type identifier for this error.
837          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
838        },
839      ],
840    },
841    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
842    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
843    "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.
844  }</pre>
845</div>
846
847<div class="method">
848    <code class="details" id="deletePerInstanceConfigs">deletePerInstanceConfigs(project, zone, instanceGroupManager, body)</code>
849  <pre>Deletes selected per-instance configs for the managed instance group.
850
851Args:
852  project: string, Project ID for this request. (required)
853  zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
854  instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
855  body: object, The request body. (required)
856    The object takes the form of:
857
858{ # InstanceGroupManagers.deletePerInstanceConfigs
859    "instances": [ # The list of instances for which we want to delete per-instance configs on this managed instance group.
860      "A String",
861    ],
862    "names": [ # The list of instance names for which we want to delete per-instance configs on this managed instance group.
863      "A String",
864    ],
865  }
866
867
868Returns:
869  An object of the form:
870
871    { # Represents an Operation resource.
872      #
873      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
874      #
875      # Operations can be global, regional or zonal.
876      # - For global operations, use the globalOperations resource.
877      # - For regional operations, use the regionOperations resource.
878      # - For zonal operations, use the zonalOperations resource.
879      #
880      # 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 ==)
881    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
882    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
883    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
884    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
885    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
886    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
887    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
888    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
889    "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.
890    "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.
891    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
892    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
893    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
894    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
895      {
896        "message": "A String", # [Output Only] A human-readable description of the warning code.
897        "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.
898        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
899            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
900          {
901            "value": "A String", # [Output Only] A warning data value corresponding to the key.
902            "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).
903          },
904        ],
905      },
906    ],
907    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
908    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
909    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
910    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
911    "name": "A String", # [Output Only] Name of the resource.
912    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
913    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
914      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
915        {
916          "message": "A String", # [Output Only] An optional, human-readable error message.
917          "code": "A String", # [Output Only] The error type identifier for this error.
918          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
919        },
920      ],
921    },
922    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
923    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
924    "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.
925  }</pre>
926</div>
927
928<div class="method">
929    <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
930  <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.
931
932Args:
933  project: string, Project ID for this request. (required)
934  zone: string, The name of the zone where the managed instance group is located. (required)
935  instanceGroupManager: string, The name of the managed instance group. (required)
936
937Returns:
938  An object of the form:
939
940    { # Represents a Managed Instance Group resource.
941      #
942      # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
943      #
944      # For zonal Managed Instance Group, use the instanceGroupManagers resource.
945      #
946      # 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 ==)
947    "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
948    "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.
949      "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.
950      "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.
951      "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.
952      "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.
953    },
954    "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
955    "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
956    "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
957    "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.
958    "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.
959    "updatePolicy": { # The update policy for this managed instance group.
960      "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE
961      "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.
962          #
963          # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
964        "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
965            #
966            #
967            # - If the value is fixed, then the calculated value is equal to the fixed value.
968            # - 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.
969        "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
970        "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
971      },
972      "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.
973      "instanceRedistributionType": "A String",
974      "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:
975          #
976          #
977          # - The instance's status is RUNNING.
978          # - 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.
979          #
980          # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
981        "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
982            #
983            #
984            # - If the value is fixed, then the calculated value is equal to the fixed value.
985            # - 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.
986        "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
987        "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
988      },
989      "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).
990      "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
991    },
992    "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.
993      "A String",
994    ],
995    "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
996      { # The named port. For example: .
997        "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
998        "port": 42, # The port number, which can be a value between 1 and 65535.
999      },
1000    ],
1001    "status": { # [Output Only] The status of this managed instance group.
1002      "stateful": { # [Output Only] Stateful status of the given Instance Group Manager.
1003        "isStateful": True or False, # [Output Only] A bit indicating whether the managed instance group is stateful, i.e. has any disks in Stateful Policy or at least one per-instance config. This is determined based on the user intent, the group may be reported as not stateful even when there is still some preserved state on managed instances.
1004      },
1005      "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.
1006      "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
1007        "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.
1008      },
1009    },
1010    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1011    "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
1012      {
1013        "healthCheck": "A String", # The URL for the health check that signals autohealing.
1014        "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].
1015        "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when autohealing. When 'percent' is used, the value is rounded UP. The instance is considered available if all of the following conditions are satisfied: 1. Instance's status is RUNNING. 2. Instance's currentAction is NONE (in particular its liveness health check result was observed to be HEALTHY at least once as it passed VERIFYING). 3. There is no outgoing action on an instance triggered by IGM.
1016            #
1017            # By default, number of concurrently autohealed instances is smaller than the managed instance group target size. However, if a zonal managed instance group has only one instance, or a regional managed instance group has only one instance per zone, autohealing will recreate these instances when they become unhealthy.
1018          "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1019              #
1020              #
1021              # - If the value is fixed, then the calculated value is equal to the fixed value.
1022              # - 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.
1023          "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1024          "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1025        },
1026      },
1027    ],
1028    "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
1029    "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1030    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
1031    "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.
1032    "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.
1033        #
1034        # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1035    "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.
1036      "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1037      "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.
1038      "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.
1039          #
1040          # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1041      "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.
1042      "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1043      "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.
1044      "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1045      "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.
1046      "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.
1047    },
1048    "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1049    "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
1050        #
1051        # 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.
1052      {
1053        "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:
1054            # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1055            # - 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.
1056          "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1057              #
1058              #
1059              # - If the value is fixed, then the calculated value is equal to the fixed value.
1060              # - 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.
1061          "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1062          "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1063        },
1064        "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.
1065        "tag": "A String", # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged. Deprecated in favor of 'name'.
1066        "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
1067      },
1068    ],
1069    "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1070    "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.
1071    "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
1072      "zones": [ # Zones where the regional managed instance group will create and manage instances.
1073        {
1074          "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
1075        },
1076      ],
1077    },
1078    "statefulPolicy": { # Stateful configuration for this Instanced Group Manager
1079      "preservedResources": { # Configuration of all preserved resources.
1080        "disks": [ # Disks created on the instances that will be preserved on instance delete, resize down, etc.
1081          {
1082            "deviceName": "A String", # Device name of the disk to be preserved
1083          },
1084        ],
1085      },
1086      "preservedState": { # Configuration of preserved resources.
1087        "disks": { # Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks.
1088          "a_key": {
1089            "autoDelete": "A String", # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
1090          },
1091        },
1092      },
1093    },
1094    "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
1095  }</pre>
1096</div>
1097
1098<div class="method">
1099    <code class="details" id="insert">insert(project, zone, body, requestId=None)</code>
1100  <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.
1101
1102A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
1103
1104Args:
1105  project: string, Project ID for this request. (required)
1106  zone: string, The name of the zone where you want to create the managed instance group. (required)
1107  body: object, The request body. (required)
1108    The object takes the form of:
1109
1110{ # Represents a Managed Instance Group resource.
1111    #
1112    # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1113    #
1114    # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1115    #
1116    # 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 ==)
1117  "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
1118  "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.
1119    "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.
1120    "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.
1121    "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.
1122    "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.
1123  },
1124  "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1125  "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1126  "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
1127  "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.
1128  "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.
1129  "updatePolicy": { # The update policy for this managed instance group.
1130    "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE
1131    "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.
1132        #
1133        # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1134      "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1135          #
1136          #
1137          # - If the value is fixed, then the calculated value is equal to the fixed value.
1138          # - 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.
1139      "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1140      "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1141    },
1142    "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.
1143    "instanceRedistributionType": "A String",
1144    "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:
1145        #
1146        #
1147        # - The instance's status is RUNNING.
1148        # - 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.
1149        #
1150        # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1151      "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1152          #
1153          #
1154          # - If the value is fixed, then the calculated value is equal to the fixed value.
1155          # - 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.
1156      "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1157      "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1158    },
1159    "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).
1160    "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1161  },
1162  "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.
1163    "A String",
1164  ],
1165  "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1166    { # The named port. For example: .
1167      "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1168      "port": 42, # The port number, which can be a value between 1 and 65535.
1169    },
1170  ],
1171  "status": { # [Output Only] The status of this managed instance group.
1172    "stateful": { # [Output Only] Stateful status of the given Instance Group Manager.
1173      "isStateful": True or False, # [Output Only] A bit indicating whether the managed instance group is stateful, i.e. has any disks in Stateful Policy or at least one per-instance config. This is determined based on the user intent, the group may be reported as not stateful even when there is still some preserved state on managed instances.
1174    },
1175    "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.
1176    "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
1177      "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.
1178    },
1179  },
1180  "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1181  "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
1182    {
1183      "healthCheck": "A String", # The URL for the health check that signals autohealing.
1184      "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].
1185      "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when autohealing. When 'percent' is used, the value is rounded UP. The instance is considered available if all of the following conditions are satisfied: 1. Instance's status is RUNNING. 2. Instance's currentAction is NONE (in particular its liveness health check result was observed to be HEALTHY at least once as it passed VERIFYING). 3. There is no outgoing action on an instance triggered by IGM.
1186          #
1187          # By default, number of concurrently autohealed instances is smaller than the managed instance group target size. However, if a zonal managed instance group has only one instance, or a regional managed instance group has only one instance per zone, autohealing will recreate these instances when they become unhealthy.
1188        "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1189            #
1190            #
1191            # - If the value is fixed, then the calculated value is equal to the fixed value.
1192            # - 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.
1193        "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1194        "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1195      },
1196    },
1197  ],
1198  "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
1199  "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1200  "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
1201  "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.
1202  "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.
1203      #
1204      # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1205  "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.
1206    "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1207    "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.
1208    "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.
1209        #
1210        # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1211    "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.
1212    "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1213    "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.
1214    "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1215    "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.
1216    "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.
1217  },
1218  "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1219  "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
1220      #
1221      # 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.
1222    {
1223      "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:
1224          # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1225          # - 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.
1226        "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1227            #
1228            #
1229            # - If the value is fixed, then the calculated value is equal to the fixed value.
1230            # - 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.
1231        "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1232        "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1233      },
1234      "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.
1235      "tag": "A String", # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged. Deprecated in favor of 'name'.
1236      "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
1237    },
1238  ],
1239  "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1240  "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.
1241  "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
1242    "zones": [ # Zones where the regional managed instance group will create and manage instances.
1243      {
1244        "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
1245      },
1246    ],
1247  },
1248  "statefulPolicy": { # Stateful configuration for this Instanced Group Manager
1249    "preservedResources": { # Configuration of all preserved resources.
1250      "disks": [ # Disks created on the instances that will be preserved on instance delete, resize down, etc.
1251        {
1252          "deviceName": "A String", # Device name of the disk to be preserved
1253        },
1254      ],
1255    },
1256    "preservedState": { # Configuration of preserved resources.
1257      "disks": { # Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks.
1258        "a_key": {
1259          "autoDelete": "A String", # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
1260        },
1261      },
1262    },
1263  },
1264  "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
1265}
1266
1267  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.
1268
1269For 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.
1270
1271The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1272
1273Returns:
1274  An object of the form:
1275
1276    { # Represents an Operation resource.
1277      #
1278      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1279      #
1280      # Operations can be global, regional or zonal.
1281      # - For global operations, use the globalOperations resource.
1282      # - For regional operations, use the regionOperations resource.
1283      # - For zonal operations, use the zonalOperations resource.
1284      #
1285      # 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 ==)
1286    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1287    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1288    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1289    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1290    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1291    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1292    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1293    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1294    "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.
1295    "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.
1296    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1297    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1298    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1299    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1300      {
1301        "message": "A String", # [Output Only] A human-readable description of the warning code.
1302        "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.
1303        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1304            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1305          {
1306            "value": "A String", # [Output Only] A warning data value corresponding to the key.
1307            "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).
1308          },
1309        ],
1310      },
1311    ],
1312    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
1313    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1314    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1315    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1316    "name": "A String", # [Output Only] Name of the resource.
1317    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1318    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1319      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1320        {
1321          "message": "A String", # [Output Only] An optional, human-readable error message.
1322          "code": "A String", # [Output Only] The error type identifier for this error.
1323          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1324        },
1325      ],
1326    },
1327    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1328    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1329    "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.
1330  }</pre>
1331</div>
1332
1333<div class="method">
1334    <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
1335  <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
1336
1337Args:
1338  project: string, Project ID for this request. (required)
1339  zone: string, The name of the zone where the managed instance group is located. (required)
1340  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1341
1342You 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.
1343
1344Currently, only sorting by name or creationTimestamp desc is supported.
1345  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)
1346  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.
1347  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 <.
1348
1349For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
1350
1351You 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.
1352
1353To 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).
1354
1355Returns:
1356  An object of the form:
1357
1358    { # [Output Only] A list of managed instance groups.
1359    "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.
1360    "kind": "compute#instanceGroupManagerList", # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
1361    "items": [ # A list of InstanceGroupManager resources.
1362      { # Represents a Managed Instance Group resource.
1363          #
1364          # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1365          #
1366          # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1367          #
1368          # 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 ==)
1369        "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
1370        "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.
1371          "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.
1372          "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.
1373          "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.
1374          "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.
1375        },
1376        "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1377        "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1378        "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
1379        "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.
1380        "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.
1381        "updatePolicy": { # The update policy for this managed instance group.
1382          "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE
1383          "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.
1384              #
1385              # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1386            "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1387                #
1388                #
1389                # - If the value is fixed, then the calculated value is equal to the fixed value.
1390                # - 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.
1391            "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1392            "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1393          },
1394          "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.
1395          "instanceRedistributionType": "A String",
1396          "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:
1397              #
1398              #
1399              # - The instance's status is RUNNING.
1400              # - 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.
1401              #
1402              # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1403            "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1404                #
1405                #
1406                # - If the value is fixed, then the calculated value is equal to the fixed value.
1407                # - 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.
1408            "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1409            "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1410          },
1411          "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).
1412          "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1413        },
1414        "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.
1415          "A String",
1416        ],
1417        "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1418          { # The named port. For example: .
1419            "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1420            "port": 42, # The port number, which can be a value between 1 and 65535.
1421          },
1422        ],
1423        "status": { # [Output Only] The status of this managed instance group.
1424          "stateful": { # [Output Only] Stateful status of the given Instance Group Manager.
1425            "isStateful": True or False, # [Output Only] A bit indicating whether the managed instance group is stateful, i.e. has any disks in Stateful Policy or at least one per-instance config. This is determined based on the user intent, the group may be reported as not stateful even when there is still some preserved state on managed instances.
1426          },
1427          "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.
1428          "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
1429            "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.
1430          },
1431        },
1432        "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1433        "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
1434          {
1435            "healthCheck": "A String", # The URL for the health check that signals autohealing.
1436            "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].
1437            "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when autohealing. When 'percent' is used, the value is rounded UP. The instance is considered available if all of the following conditions are satisfied: 1. Instance's status is RUNNING. 2. Instance's currentAction is NONE (in particular its liveness health check result was observed to be HEALTHY at least once as it passed VERIFYING). 3. There is no outgoing action on an instance triggered by IGM.
1438                #
1439                # By default, number of concurrently autohealed instances is smaller than the managed instance group target size. However, if a zonal managed instance group has only one instance, or a regional managed instance group has only one instance per zone, autohealing will recreate these instances when they become unhealthy.
1440              "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1441                  #
1442                  #
1443                  # - If the value is fixed, then the calculated value is equal to the fixed value.
1444                  # - 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.
1445              "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1446              "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1447            },
1448          },
1449        ],
1450        "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
1451        "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1452        "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
1453        "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.
1454        "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.
1455            #
1456            # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1457        "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.
1458          "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1459          "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.
1460          "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.
1461              #
1462              # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1463          "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.
1464          "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1465          "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.
1466          "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1467          "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.
1468          "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.
1469        },
1470        "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1471        "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
1472            #
1473            # 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.
1474          {
1475            "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:
1476                # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1477                # - 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.
1478              "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1479                  #
1480                  #
1481                  # - If the value is fixed, then the calculated value is equal to the fixed value.
1482                  # - 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.
1483              "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1484              "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1485            },
1486            "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.
1487            "tag": "A String", # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged. Deprecated in favor of 'name'.
1488            "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
1489          },
1490        ],
1491        "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1492        "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.
1493        "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
1494          "zones": [ # Zones where the regional managed instance group will create and manage instances.
1495            {
1496              "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
1497            },
1498          ],
1499        },
1500        "statefulPolicy": { # Stateful configuration for this Instanced Group Manager
1501          "preservedResources": { # Configuration of all preserved resources.
1502            "disks": [ # Disks created on the instances that will be preserved on instance delete, resize down, etc.
1503              {
1504                "deviceName": "A String", # Device name of the disk to be preserved
1505              },
1506            ],
1507          },
1508          "preservedState": { # Configuration of preserved resources.
1509            "disks": { # Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks.
1510              "a_key": {
1511                "autoDelete": "A String", # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
1512              },
1513            },
1514          },
1515        },
1516        "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
1517      },
1518    ],
1519    "warning": { # [Output Only] Informational warning message.
1520      "message": "A String", # [Output Only] A human-readable description of the warning code.
1521      "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.
1522      "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1523          # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1524        {
1525          "value": "A String", # [Output Only] A warning data value corresponding to the key.
1526          "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).
1527        },
1528      ],
1529    },
1530    "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1531    "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1532  }</pre>
1533</div>
1534
1535<div class="method">
1536    <code class="details" id="listErrors">listErrors(project, zone, instanceGroupManager, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
1537  <pre>Lists all errors thrown by actions on instances for a given managed instance group.
1538
1539Args:
1540  project: string, Project ID for this request. (required)
1541  zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1542  instanceGroupManager: string, The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}. (required)
1543  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1544
1545You 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.
1546
1547Currently, only sorting by name or creationTimestamp desc is supported.
1548  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)
1549  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.
1550  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 <.
1551
1552For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
1553
1554You 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.
1555
1556To 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).
1557
1558Returns:
1559  An object of the form:
1560
1561    {
1562    "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.
1563    "items": [ # [Output Only] The list of errors of the managed instance group.
1564      {
1565        "timestamp": "A String", # [Output Only] The time that this error occurred. This value is in RFC3339 text format.
1566        "instanceActionDetails": { # [Output Only] Details of the instance action that triggered this error. May be null, if the error was not caused by an action on an instance. This field is optional.
1567          "action": "A String", # [Output Only] Action that managed instance group was executing on the instance when the error occurred. Possible values:
1568          "instance": "A String", # [Output Only] The URL of the instance. The URL can be set even if the instance has not yet been created.
1569          "version": { # [Output Only] Version this instance was created from, or was being created from, but the creation failed. Corresponds to one of the versions that were set on the Instance Group Manager resource at the time this instance was being created.
1570            "instanceTemplate": "A String", # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }.
1571            "name": "A String", # [Output Only] Name of the version.
1572          },
1573        },
1574        "error": { # [Output Only] Contents of the error.
1575          "message": "A String", # [Output Only] Error message.
1576          "code": "A String", # [Output Only] Error code.
1577        },
1578      },
1579    ],
1580  }</pre>
1581</div>
1582
1583<div class="method">
1584    <code class="details" id="listErrors_next">listErrors_next(previous_request, previous_response)</code>
1585  <pre>Retrieves the next page of results.
1586
1587Args:
1588  previous_request: The request for the previous page. (required)
1589  previous_response: The response from the request for the previous page. (required)
1590
1591Returns:
1592  A request object that you can call 'execute()' on to request the next
1593  page. Returns None if there are no more items in the collection.
1594    </pre>
1595</div>
1596
1597<div class="method">
1598    <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</code>
1599  <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.
1600
1601Args:
1602  project: string, Project ID for this request. (required)
1603  zone: string, The name of the zone where the managed instance group is located. (required)
1604  instanceGroupManager: string, The name of the managed instance group. (required)
1605  order_by: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1606
1607You 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.
1608
1609Currently, only sorting by name or creationTimestamp desc is supported.
1610  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)
1611  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.
1612  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 <.
1613
1614For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
1615
1616You 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.
1617
1618To 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).
1619
1620Returns:
1621  An object of the form:
1622
1623    {
1624    "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.
1625    "managedInstances": [ # [Output Only] The list of instances in the managed instance group.
1626      { # A Managed Instance resource.
1627        "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist.
1628        "version": { # [Output Only] Intended version of this instance.
1629          "instanceTemplate": "A String", # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }.
1630          "name": "A String", # [Output Only] Name of the version.
1631        },
1632        "instanceHealth": [ # [Output Only] Health state of the instance per health-check.
1633          {
1634            "healthCheck": "A String", # [Output Only] The URL for the health check that verifies whether the instance is healthy.
1635            "detailedHealthState": "A String", # [Output Only] The current detailed instance health state.
1636            "healthState": "A String", # [Output Only] The current instance health state.
1637          },
1638        ],
1639        "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance.
1640          "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
1641            "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1642              {
1643                "message": "A String", # [Output Only] An optional, human-readable error message.
1644                "code": "A String", # [Output Only] The error type identifier for this error.
1645                "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1646              },
1647            ],
1648          },
1649        },
1650        "tag": "A String", # [Output Only] Tag describing the version.
1651        "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
1652        "preservedStateFromPolicy": { # Preserved state for a given instance. # [Output Only] Preserved state generated based on stateful policy for this instance.
1653          "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1654            "a_key": {
1655              "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance.
1656              "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
1657              "autoDelete": "A String", # These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
1658            },
1659          },
1660          "metadata": { # Preserved metadata defined for this instance.
1661            "a_key": "A String",
1662          },
1663        },
1664        "instanceTemplate": "A String", # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }.
1665        "override": { # Overrides of stateful properties for a given instance # [Output Only] Override defined for this instance.
1666          "origin": "A String", # [Output Only] Indicates where does the override come from.
1667          "disks": [ # Disk overrides defined for this instance. According to documentation the maximum number of disks attached to an instance is 128: https://cloud.google.com/compute/docs/disks/ However, compute API defines the limit at 140, so this is what we check.
1668            {
1669              "deviceName": "A String", # The name of the device on the VM
1670              "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
1671              "source": "A String", # The disk that is/will be mounted
1672            },
1673          ],
1674          "metadata": [ # Metadata overrides defined for this instance. TODO(b/69785416) validate the total length is <9 KB
1675            {
1676              "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
1677              "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
1678            },
1679          ],
1680        },
1681        "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
1682            # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
1683            # - 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.
1684            # - 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.
1685            # - RECREATING The managed instance group is recreating this instance.
1686            # - DELETING The managed instance group is permanently deleting this instance.
1687            # - 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.
1688            # - RESTARTING The managed instance group is restarting the instance.
1689            # - 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.
1690            # - VERIFYING The managed instance group has created the instance and it is in the process of being verified.
1691        "preservedStateFromConfig": { # Preserved state for a given instance. # [Output Only] Preserved state applied from per-instance config for this instance.
1692          "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1693            "a_key": {
1694              "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance.
1695              "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
1696              "autoDelete": "A String", # These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
1697            },
1698          },
1699          "metadata": { # Preserved metadata defined for this instance.
1700            "a_key": "A String",
1701          },
1702        },
1703        "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
1704      },
1705    ],
1706  }</pre>
1707</div>
1708
1709<div class="method">
1710    <code class="details" id="listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</code>
1711  <pre>Retrieves the next page of results.
1712
1713Args:
1714  previous_request: The request for the previous page. (required)
1715  previous_response: The response from the request for the previous page. (required)
1716
1717Returns:
1718  A request object that you can call 'execute()' on to request the next
1719  page. Returns None if there are no more items in the collection.
1720    </pre>
1721</div>
1722
1723<div class="method">
1724    <code class="details" id="listPerInstanceConfigs">listPerInstanceConfigs(project, zone, instanceGroupManager, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
1725  <pre>Lists all of the per-instance configs defined for the managed instance group.
1726
1727Args:
1728  project: string, Project ID for this request. (required)
1729  zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1730  instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
1731  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1732
1733You 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.
1734
1735Currently, only sorting by name or creationTimestamp desc is supported.
1736  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)
1737  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.
1738  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 <.
1739
1740For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
1741
1742You 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.
1743
1744To 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).
1745
1746Returns:
1747  An object of the form:
1748
1749    {
1750    "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.
1751    "items": [ # [Output Only] The list of PerInstanceConfig.
1752      {
1753        "override": { # Overrides of stateful properties for a given instance
1754          "origin": "A String", # [Output Only] Indicates where does the override come from.
1755          "disks": [ # Disk overrides defined for this instance. According to documentation the maximum number of disks attached to an instance is 128: https://cloud.google.com/compute/docs/disks/ However, compute API defines the limit at 140, so this is what we check.
1756            {
1757              "deviceName": "A String", # The name of the device on the VM
1758              "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
1759              "source": "A String", # The disk that is/will be mounted
1760            },
1761          ],
1762          "metadata": [ # Metadata overrides defined for this instance. TODO(b/69785416) validate the total length is <9 KB
1763            {
1764              "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
1765              "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
1766            },
1767          ],
1768        },
1769        "instance": "A String", # The URL of the instance. Serves as a merge key during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same instance URL exists then it will be updated, otherwise a new one will be created.
1770        "name": "A String", # The name of the per-instance config and the corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance config for a VM instance that either doesn't exist or is not part of the group will result in a failure.
1771        "preservedState": { # Preserved state for a given instance. # Intended preserved state for the given instance. Does not contain state generated based on Stateful Policy.
1772          "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1773            "a_key": {
1774              "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance.
1775              "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
1776              "autoDelete": "A String", # These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
1777            },
1778          },
1779          "metadata": { # Preserved metadata defined for this instance.
1780            "a_key": "A String",
1781          },
1782        },
1783        "fingerprint": "A String", # Fingerprint of this per-instance config. This field may be used in optimistic locking. It will be ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in order to update an existing per-instance config or the field needs to be unset.
1784      },
1785    ],
1786    "warning": { # [Output Only] Informational warning message.
1787      "message": "A String", # [Output Only] A human-readable description of the warning code.
1788      "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.
1789      "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1790          # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1791        {
1792          "value": "A String", # [Output Only] A warning data value corresponding to the key.
1793          "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).
1794        },
1795      ],
1796    },
1797  }</pre>
1798</div>
1799
1800<div class="method">
1801    <code class="details" id="listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</code>
1802  <pre>Retrieves the next page of results.
1803
1804Args:
1805  previous_request: The request for the previous page. (required)
1806  previous_response: The response from the request for the previous page. (required)
1807
1808Returns:
1809  A request object that you can call 'execute()' on to request the next
1810  page. Returns None if there are no more items in the collection.
1811    </pre>
1812</div>
1813
1814<div class="method">
1815    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1816  <pre>Retrieves the next page of results.
1817
1818Args:
1819  previous_request: The request for the previous page. (required)
1820  previous_response: The response from the request for the previous page. (required)
1821
1822Returns:
1823  A request object that you can call 'execute()' on to request the next
1824  page. Returns None if there are no more items in the collection.
1825    </pre>
1826</div>
1827
1828<div class="method">
1829    <code class="details" id="patch">patch(project, zone, instanceGroupManager, body, requestId=None)</code>
1830  <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.
1831
1832Args:
1833  project: string, Project ID for this request. (required)
1834  zone: string, The name of the zone where you want to create the managed instance group. (required)
1835  instanceGroupManager: string, The name of the instance group manager. (required)
1836  body: object, The request body. (required)
1837    The object takes the form of:
1838
1839{ # Represents a Managed Instance Group resource.
1840    #
1841    # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1842    #
1843    # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1844    #
1845    # 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 ==)
1846  "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
1847  "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.
1848    "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.
1849    "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.
1850    "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.
1851    "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.
1852  },
1853  "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1854  "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1855  "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
1856  "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.
1857  "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.
1858  "updatePolicy": { # The update policy for this managed instance group.
1859    "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE
1860    "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.
1861        #
1862        # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1863      "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1864          #
1865          #
1866          # - If the value is fixed, then the calculated value is equal to the fixed value.
1867          # - 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.
1868      "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1869      "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1870    },
1871    "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.
1872    "instanceRedistributionType": "A String",
1873    "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:
1874        #
1875        #
1876        # - The instance's status is RUNNING.
1877        # - 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.
1878        #
1879        # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1880      "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1881          #
1882          #
1883          # - If the value is fixed, then the calculated value is equal to the fixed value.
1884          # - 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.
1885      "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1886      "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1887    },
1888    "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).
1889    "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1890  },
1891  "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.
1892    "A String",
1893  ],
1894  "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1895    { # The named port. For example: .
1896      "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1897      "port": 42, # The port number, which can be a value between 1 and 65535.
1898    },
1899  ],
1900  "status": { # [Output Only] The status of this managed instance group.
1901    "stateful": { # [Output Only] Stateful status of the given Instance Group Manager.
1902      "isStateful": True or False, # [Output Only] A bit indicating whether the managed instance group is stateful, i.e. has any disks in Stateful Policy or at least one per-instance config. This is determined based on the user intent, the group may be reported as not stateful even when there is still some preserved state on managed instances.
1903    },
1904    "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.
1905    "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
1906      "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.
1907    },
1908  },
1909  "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1910  "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
1911    {
1912      "healthCheck": "A String", # The URL for the health check that signals autohealing.
1913      "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].
1914      "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when autohealing. When 'percent' is used, the value is rounded UP. The instance is considered available if all of the following conditions are satisfied: 1. Instance's status is RUNNING. 2. Instance's currentAction is NONE (in particular its liveness health check result was observed to be HEALTHY at least once as it passed VERIFYING). 3. There is no outgoing action on an instance triggered by IGM.
1915          #
1916          # By default, number of concurrently autohealed instances is smaller than the managed instance group target size. However, if a zonal managed instance group has only one instance, or a regional managed instance group has only one instance per zone, autohealing will recreate these instances when they become unhealthy.
1917        "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1918            #
1919            #
1920            # - If the value is fixed, then the calculated value is equal to the fixed value.
1921            # - 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.
1922        "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1923        "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1924      },
1925    },
1926  ],
1927  "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
1928  "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1929  "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
1930  "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.
1931  "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.
1932      #
1933      # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1934  "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.
1935    "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1936    "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.
1937    "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.
1938        #
1939        # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1940    "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.
1941    "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1942    "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.
1943    "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1944    "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.
1945    "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.
1946  },
1947  "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1948  "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
1949      #
1950      # 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.
1951    {
1952      "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:
1953          # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1954          # - 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.
1955        "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1956            #
1957            #
1958            # - If the value is fixed, then the calculated value is equal to the fixed value.
1959            # - 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.
1960        "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1961        "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1962      },
1963      "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.
1964      "tag": "A String", # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged. Deprecated in favor of 'name'.
1965      "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
1966    },
1967  ],
1968  "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1969  "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.
1970  "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
1971    "zones": [ # Zones where the regional managed instance group will create and manage instances.
1972      {
1973        "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
1974      },
1975    ],
1976  },
1977  "statefulPolicy": { # Stateful configuration for this Instanced Group Manager
1978    "preservedResources": { # Configuration of all preserved resources.
1979      "disks": [ # Disks created on the instances that will be preserved on instance delete, resize down, etc.
1980        {
1981          "deviceName": "A String", # Device name of the disk to be preserved
1982        },
1983      ],
1984    },
1985    "preservedState": { # Configuration of preserved resources.
1986      "disks": { # Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks.
1987        "a_key": {
1988          "autoDelete": "A String", # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
1989        },
1990      },
1991    },
1992  },
1993  "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
1994}
1995
1996  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.
1997
1998For 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.
1999
2000The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2001
2002Returns:
2003  An object of the form:
2004
2005    { # Represents an Operation resource.
2006      #
2007      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2008      #
2009      # Operations can be global, regional or zonal.
2010      # - For global operations, use the globalOperations resource.
2011      # - For regional operations, use the regionOperations resource.
2012      # - For zonal operations, use the zonalOperations resource.
2013      #
2014      # 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 ==)
2015    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2016    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2017    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2018    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2019    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2020    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2021    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2022    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2023    "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.
2024    "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.
2025    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2026    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2027    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2028    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2029      {
2030        "message": "A String", # [Output Only] A human-readable description of the warning code.
2031        "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.
2032        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2033            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2034          {
2035            "value": "A String", # [Output Only] A warning data value corresponding to the key.
2036            "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).
2037          },
2038        ],
2039      },
2040    ],
2041    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2042    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2043    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2044    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2045    "name": "A String", # [Output Only] Name of the resource.
2046    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2047    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2048      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2049        {
2050          "message": "A String", # [Output Only] An optional, human-readable error message.
2051          "code": "A String", # [Output Only] The error type identifier for this error.
2052          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2053        },
2054      ],
2055    },
2056    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2057    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2058    "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.
2059  }</pre>
2060</div>
2061
2062<div class="method">
2063    <code class="details" id="patchPerInstanceConfigs">patchPerInstanceConfigs(project, zone, instanceGroupManager, body, requestId=None)</code>
2064  <pre>Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.
2065
2066Args:
2067  project: string, Project ID for this request. (required)
2068  zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
2069  instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
2070  body: object, The request body. (required)
2071    The object takes the form of:
2072
2073{ # InstanceGroupManagers.patchPerInstanceConfigs
2074    "perInstanceConfigs": [ # The list of per-instance configs to insert or patch on this managed instance group.
2075      {
2076        "override": { # Overrides of stateful properties for a given instance
2077          "origin": "A String", # [Output Only] Indicates where does the override come from.
2078          "disks": [ # Disk overrides defined for this instance. According to documentation the maximum number of disks attached to an instance is 128: https://cloud.google.com/compute/docs/disks/ However, compute API defines the limit at 140, so this is what we check.
2079            {
2080              "deviceName": "A String", # The name of the device on the VM
2081              "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
2082              "source": "A String", # The disk that is/will be mounted
2083            },
2084          ],
2085          "metadata": [ # Metadata overrides defined for this instance. TODO(b/69785416) validate the total length is <9 KB
2086            {
2087              "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
2088              "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
2089            },
2090          ],
2091        },
2092        "instance": "A String", # The URL of the instance. Serves as a merge key during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same instance URL exists then it will be updated, otherwise a new one will be created.
2093        "name": "A String", # The name of the per-instance config and the corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance config for a VM instance that either doesn't exist or is not part of the group will result in a failure.
2094        "preservedState": { # Preserved state for a given instance. # Intended preserved state for the given instance. Does not contain state generated based on Stateful Policy.
2095          "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
2096            "a_key": {
2097              "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance.
2098              "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
2099              "autoDelete": "A String", # These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
2100            },
2101          },
2102          "metadata": { # Preserved metadata defined for this instance.
2103            "a_key": "A String",
2104          },
2105        },
2106        "fingerprint": "A String", # Fingerprint of this per-instance config. This field may be used in optimistic locking. It will be ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in order to update an existing per-instance config or the field needs to be unset.
2107      },
2108    ],
2109  }
2110
2111  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.
2112
2113For 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.
2114
2115The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2116
2117Returns:
2118  An object of the form:
2119
2120    { # Represents an Operation resource.
2121      #
2122      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2123      #
2124      # Operations can be global, regional or zonal.
2125      # - For global operations, use the globalOperations resource.
2126      # - For regional operations, use the regionOperations resource.
2127      # - For zonal operations, use the zonalOperations resource.
2128      #
2129      # 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 ==)
2130    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2131    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2132    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2133    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2134    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2135    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2136    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2137    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2138    "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.
2139    "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.
2140    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2141    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2142    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2143    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2144      {
2145        "message": "A String", # [Output Only] A human-readable description of the warning code.
2146        "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.
2147        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2148            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2149          {
2150            "value": "A String", # [Output Only] A warning data value corresponding to the key.
2151            "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).
2152          },
2153        ],
2154      },
2155    ],
2156    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2157    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2158    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2159    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2160    "name": "A String", # [Output Only] Name of the resource.
2161    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2162    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2163      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2164        {
2165          "message": "A String", # [Output Only] An optional, human-readable error message.
2166          "code": "A String", # [Output Only] The error type identifier for this error.
2167          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2168        },
2169      ],
2170    },
2171    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2172    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2173    "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.
2174  }</pre>
2175</div>
2176
2177<div class="method">
2178    <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body, requestId=None)</code>
2179  <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.
2180
2181If 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.
2182
2183You can specify a maximum of 1000 instances with this method per request.
2184
2185Args:
2186  project: string, Project ID for this request. (required)
2187  zone: string, The name of the zone where the managed instance group is located. (required)
2188  instanceGroupManager: string, The name of the managed instance group. (required)
2189  body: object, The request body. (required)
2190    The object takes the form of:
2191
2192{
2193    "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].
2194      "A String",
2195    ],
2196  }
2197
2198  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.
2199
2200For 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.
2201
2202The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2203
2204Returns:
2205  An object of the form:
2206
2207    { # Represents an Operation resource.
2208      #
2209      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2210      #
2211      # Operations can be global, regional or zonal.
2212      # - For global operations, use the globalOperations resource.
2213      # - For regional operations, use the regionOperations resource.
2214      # - For zonal operations, use the zonalOperations resource.
2215      #
2216      # 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 ==)
2217    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2218    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2219    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2220    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2221    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2222    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2223    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2224    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2225    "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.
2226    "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.
2227    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2228    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2229    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2230    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2231      {
2232        "message": "A String", # [Output Only] A human-readable description of the warning code.
2233        "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.
2234        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2235            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2236          {
2237            "value": "A String", # [Output Only] A warning data value corresponding to the key.
2238            "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).
2239          },
2240        ],
2241      },
2242    ],
2243    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2244    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2245    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2246    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2247    "name": "A String", # [Output Only] Name of the resource.
2248    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2249    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2250      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2251        {
2252          "message": "A String", # [Output Only] An optional, human-readable error message.
2253          "code": "A String", # [Output Only] The error type identifier for this error.
2254          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2255        },
2256      ],
2257    },
2258    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2259    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2260    "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.
2261  }</pre>
2262</div>
2263
2264<div class="method">
2265    <code class="details" id="resize">resize(project, zone, instanceGroupManager, size, requestId=None)</code>
2266  <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.
2267
2268When 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:
2269
2270+ 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.
2271
2272This list is subject to change.
2273
2274If 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.
2275
2276Args:
2277  project: string, Project ID for this request. (required)
2278  zone: string, The name of the zone where the managed instance group is located. (required)
2279  instanceGroupManager: string, The name of the managed instance group. (required)
2280  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)
2281  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.
2282
2283For 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.
2284
2285The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2286
2287Returns:
2288  An object of the form:
2289
2290    { # Represents an Operation resource.
2291      #
2292      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2293      #
2294      # Operations can be global, regional or zonal.
2295      # - For global operations, use the globalOperations resource.
2296      # - For regional operations, use the regionOperations resource.
2297      # - For zonal operations, use the zonalOperations resource.
2298      #
2299      # 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 ==)
2300    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2301    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2302    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2303    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2304    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2305    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2306    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2307    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2308    "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.
2309    "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.
2310    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2311    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2312    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2313    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2314      {
2315        "message": "A String", # [Output Only] A human-readable description of the warning code.
2316        "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.
2317        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2318            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2319          {
2320            "value": "A String", # [Output Only] A warning data value corresponding to the key.
2321            "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).
2322          },
2323        ],
2324      },
2325    ],
2326    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2327    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2328    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2329    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2330    "name": "A String", # [Output Only] Name of the resource.
2331    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2332    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2333      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2334        {
2335          "message": "A String", # [Output Only] An optional, human-readable error message.
2336          "code": "A String", # [Output Only] The error type identifier for this error.
2337          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2338        },
2339      ],
2340    },
2341    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2342    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2343    "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.
2344  }</pre>
2345</div>
2346
2347<div class="method">
2348    <code class="details" id="resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body, requestId=None)</code>
2349  <pre>Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.
2350
2351If 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.
2352
2353If 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.
2354
2355Args:
2356  project: string, Project ID for this request. (required)
2357  zone: string, The name of the zone where the managed instance group is located. (required)
2358  instanceGroupManager: string, The name of the managed instance group. (required)
2359  body: object, The request body. (required)
2360    The object takes the form of:
2361
2362{
2363    "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.
2364        #
2365        # 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.
2366        #
2367        # This flag is applicable only to the current resize request. It does not influence other resize requests in any way.
2368        #
2369        # You can see which instances is being creating in which mode by calling the get or listManagedInstances API.
2370    "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.
2371  }
2372
2373  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.
2374
2375For 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.
2376
2377The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2378
2379Returns:
2380  An object of the form:
2381
2382    { # Represents an Operation resource.
2383      #
2384      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2385      #
2386      # Operations can be global, regional or zonal.
2387      # - For global operations, use the globalOperations resource.
2388      # - For regional operations, use the regionOperations resource.
2389      # - For zonal operations, use the zonalOperations resource.
2390      #
2391      # 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 ==)
2392    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2393    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2394    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2395    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2396    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2397    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2398    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2399    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2400    "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.
2401    "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.
2402    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2403    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2404    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2405    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2406      {
2407        "message": "A String", # [Output Only] A human-readable description of the warning code.
2408        "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.
2409        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2410            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2411          {
2412            "value": "A String", # [Output Only] A warning data value corresponding to the key.
2413            "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).
2414          },
2415        ],
2416      },
2417    ],
2418    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2419    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2420    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2421    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2422    "name": "A String", # [Output Only] Name of the resource.
2423    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2424    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2425      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2426        {
2427          "message": "A String", # [Output Only] An optional, human-readable error message.
2428          "code": "A String", # [Output Only] The error type identifier for this error.
2429          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2430        },
2431      ],
2432    },
2433    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2434    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2435    "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.
2436  }</pre>
2437</div>
2438
2439<div class="method">
2440    <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body, requestId=None)</code>
2441  <pre>Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.
2442
2443Args:
2444  project: string, Project ID for this request. (required)
2445  zone: string, The name of the zone where the managed instance group is located. (required)
2446  instanceGroupManager: string, The name of the instance group manager. (required)
2447  body: object, The request body. (required)
2448    The object takes the form of:
2449
2450{
2451    "autoHealingPolicies": [
2452      {
2453        "healthCheck": "A String", # The URL for the health check that signals autohealing.
2454        "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].
2455        "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when autohealing. When 'percent' is used, the value is rounded UP. The instance is considered available if all of the following conditions are satisfied: 1. Instance's status is RUNNING. 2. Instance's currentAction is NONE (in particular its liveness health check result was observed to be HEALTHY at least once as it passed VERIFYING). 3. There is no outgoing action on an instance triggered by IGM.
2456            #
2457            # By default, number of concurrently autohealed instances is smaller than the managed instance group target size. However, if a zonal managed instance group has only one instance, or a regional managed instance group has only one instance per zone, autohealing will recreate these instances when they become unhealthy.
2458          "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2459              #
2460              #
2461              # - If the value is fixed, then the calculated value is equal to the fixed value.
2462              # - 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.
2463          "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2464          "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2465        },
2466      },
2467    ],
2468  }
2469
2470  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.
2471
2472For 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.
2473
2474The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2475
2476Returns:
2477  An object of the form:
2478
2479    { # Represents an Operation resource.
2480      #
2481      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2482      #
2483      # Operations can be global, regional or zonal.
2484      # - For global operations, use the globalOperations resource.
2485      # - For regional operations, use the regionOperations resource.
2486      # - For zonal operations, use the zonalOperations resource.
2487      #
2488      # 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 ==)
2489    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2490    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2491    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2492    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2493    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2494    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2495    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2496    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2497    "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.
2498    "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.
2499    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2500    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2501    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2502    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2503      {
2504        "message": "A String", # [Output Only] A human-readable description of the warning code.
2505        "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.
2506        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2507            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2508          {
2509            "value": "A String", # [Output Only] A warning data value corresponding to the key.
2510            "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).
2511          },
2512        ],
2513      },
2514    ],
2515    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2516    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2517    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2518    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2519    "name": "A String", # [Output Only] Name of the resource.
2520    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2521    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2522      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2523        {
2524          "message": "A String", # [Output Only] An optional, human-readable error message.
2525          "code": "A String", # [Output Only] The error type identifier for this error.
2526          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2527        },
2528      ],
2529    },
2530    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2531    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2532    "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.
2533  }</pre>
2534</div>
2535
2536<div class="method">
2537    <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body, requestId=None)</code>
2538  <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.
2539
2540Args:
2541  project: string, Project ID for this request. (required)
2542  zone: string, The name of the zone where the managed instance group is located. (required)
2543  instanceGroupManager: string, The name of the managed instance group. (required)
2544  body: object, The request body. (required)
2545    The object takes the form of:
2546
2547{
2548    "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.
2549  }
2550
2551  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.
2552
2553For 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.
2554
2555The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2556
2557Returns:
2558  An object of the form:
2559
2560    { # Represents an Operation resource.
2561      #
2562      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2563      #
2564      # Operations can be global, regional or zonal.
2565      # - For global operations, use the globalOperations resource.
2566      # - For regional operations, use the regionOperations resource.
2567      # - For zonal operations, use the zonalOperations resource.
2568      #
2569      # 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 ==)
2570    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2571    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2572    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2573    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2574    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2575    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2576    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2577    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2578    "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.
2579    "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.
2580    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2581    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2582    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2583    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2584      {
2585        "message": "A String", # [Output Only] A human-readable description of the warning code.
2586        "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.
2587        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2588            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2589          {
2590            "value": "A String", # [Output Only] A warning data value corresponding to the key.
2591            "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).
2592          },
2593        ],
2594      },
2595    ],
2596    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2597    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2598    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2599    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2600    "name": "A String", # [Output Only] Name of the resource.
2601    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2602    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2603      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2604        {
2605          "message": "A String", # [Output Only] An optional, human-readable error message.
2606          "code": "A String", # [Output Only] The error type identifier for this error.
2607          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2608        },
2609      ],
2610    },
2611    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2612    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2613    "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.
2614  }</pre>
2615</div>
2616
2617<div class="method">
2618    <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body, requestId=None)</code>
2619  <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.
2620
2621Args:
2622  project: string, Project ID for this request. (required)
2623  zone: string, The name of the zone where the managed instance group is located. (required)
2624  instanceGroupManager: string, The name of the managed instance group. (required)
2625  body: object, The request body. (required)
2626    The object takes the form of:
2627
2628{
2629    "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.
2630      "A String",
2631    ],
2632    "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.
2633  }
2634
2635  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.
2636
2637For 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.
2638
2639The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2640
2641Returns:
2642  An object of the form:
2643
2644    { # Represents an Operation resource.
2645      #
2646      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2647      #
2648      # Operations can be global, regional or zonal.
2649      # - For global operations, use the globalOperations resource.
2650      # - For regional operations, use the regionOperations resource.
2651      # - For zonal operations, use the zonalOperations resource.
2652      #
2653      # 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 ==)
2654    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2655    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2656    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2657    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2658    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2659    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2660    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2661    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2662    "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.
2663    "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.
2664    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2665    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2666    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2667    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2668      {
2669        "message": "A String", # [Output Only] A human-readable description of the warning code.
2670        "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.
2671        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2672            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2673          {
2674            "value": "A String", # [Output Only] A warning data value corresponding to the key.
2675            "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).
2676          },
2677        ],
2678      },
2679    ],
2680    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2681    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2682    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2683    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2684    "name": "A String", # [Output Only] Name of the resource.
2685    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2686    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2687      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2688        {
2689          "message": "A String", # [Output Only] An optional, human-readable error message.
2690          "code": "A String", # [Output Only] The error type identifier for this error.
2691          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2692        },
2693      ],
2694    },
2695    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2696    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2697    "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.
2698  }</pre>
2699</div>
2700
2701<div class="method">
2702    <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code>
2703  <pre>Returns permissions that a caller has on the specified resource.
2704
2705Args:
2706  project: string, Project ID for this request. (required)
2707  zone: string, The name of the zone for this request. (required)
2708  resource: string, Name or id of the resource for this request. (required)
2709  body: object, The request body. (required)
2710    The object takes the form of:
2711
2712{
2713    "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
2714      "A String",
2715    ],
2716  }
2717
2718
2719Returns:
2720  An object of the form:
2721
2722    {
2723    "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
2724      "A String",
2725    ],
2726  }</pre>
2727</div>
2728
2729<div class="method">
2730    <code class="details" id="update">update(project, zone, instanceGroupManager, body, requestId=None)</code>
2731  <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.
2732
2733Args:
2734  project: string, Project ID for this request. (required)
2735  zone: string, The name of the zone where you want to create the managed instance group. (required)
2736  instanceGroupManager: string, The name of the instance group manager. (required)
2737  body: object, The request body. (required)
2738    The object takes the form of:
2739
2740{ # Represents a Managed Instance Group resource.
2741    #
2742    # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
2743    #
2744    # For zonal Managed Instance Group, use the instanceGroupManagers resource.
2745    #
2746    # 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 ==)
2747  "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
2748  "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.
2749    "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.
2750    "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.
2751    "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.
2752    "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.
2753  },
2754  "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
2755  "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
2756  "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
2757  "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.
2758  "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.
2759  "updatePolicy": { # The update policy for this managed instance group.
2760    "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE
2761    "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.
2762        #
2763        # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
2764      "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2765          #
2766          #
2767          # - If the value is fixed, then the calculated value is equal to the fixed value.
2768          # - 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.
2769      "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2770      "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2771    },
2772    "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.
2773    "instanceRedistributionType": "A String",
2774    "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:
2775        #
2776        #
2777        # - The instance's status is RUNNING.
2778        # - 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.
2779        #
2780        # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
2781      "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2782          #
2783          #
2784          # - If the value is fixed, then the calculated value is equal to the fixed value.
2785          # - 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.
2786      "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2787      "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2788    },
2789    "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).
2790    "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
2791  },
2792  "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.
2793    "A String",
2794  ],
2795  "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
2796    { # The named port. For example: .
2797      "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
2798      "port": 42, # The port number, which can be a value between 1 and 65535.
2799    },
2800  ],
2801  "status": { # [Output Only] The status of this managed instance group.
2802    "stateful": { # [Output Only] Stateful status of the given Instance Group Manager.
2803      "isStateful": True or False, # [Output Only] A bit indicating whether the managed instance group is stateful, i.e. has any disks in Stateful Policy or at least one per-instance config. This is determined based on the user intent, the group may be reported as not stateful even when there is still some preserved state on managed instances.
2804    },
2805    "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.
2806    "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
2807      "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.
2808    },
2809  },
2810  "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2811  "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
2812    {
2813      "healthCheck": "A String", # The URL for the health check that signals autohealing.
2814      "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].
2815      "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when autohealing. When 'percent' is used, the value is rounded UP. The instance is considered available if all of the following conditions are satisfied: 1. Instance's status is RUNNING. 2. Instance's currentAction is NONE (in particular its liveness health check result was observed to be HEALTHY at least once as it passed VERIFYING). 3. There is no outgoing action on an instance triggered by IGM.
2816          #
2817          # By default, number of concurrently autohealed instances is smaller than the managed instance group target size. However, if a zonal managed instance group has only one instance, or a regional managed instance group has only one instance per zone, autohealing will recreate these instances when they become unhealthy.
2818        "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2819            #
2820            #
2821            # - If the value is fixed, then the calculated value is equal to the fixed value.
2822            # - 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.
2823        "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2824        "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2825      },
2826    },
2827  ],
2828  "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
2829  "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
2830  "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2831  "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.
2832  "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.
2833      #
2834      # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
2835  "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.
2836    "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
2837    "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.
2838    "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.
2839        #
2840        # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
2841    "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.
2842    "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
2843    "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.
2844    "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
2845    "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.
2846    "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.
2847  },
2848  "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
2849  "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
2850      #
2851      # 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.
2852    {
2853      "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:
2854          # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
2855          # - 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.
2856        "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2857            #
2858            #
2859            # - If the value is fixed, then the calculated value is equal to the fixed value.
2860            # - 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.
2861        "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2862        "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2863      },
2864      "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.
2865      "tag": "A String", # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged. Deprecated in favor of 'name'.
2866      "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
2867    },
2868  ],
2869  "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
2870  "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.
2871  "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
2872    "zones": [ # Zones where the regional managed instance group will create and manage instances.
2873      {
2874        "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
2875      },
2876    ],
2877  },
2878  "statefulPolicy": { # Stateful configuration for this Instanced Group Manager
2879    "preservedResources": { # Configuration of all preserved resources.
2880      "disks": [ # Disks created on the instances that will be preserved on instance delete, resize down, etc.
2881        {
2882          "deviceName": "A String", # Device name of the disk to be preserved
2883        },
2884      ],
2885    },
2886    "preservedState": { # Configuration of preserved resources.
2887      "disks": { # Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks.
2888        "a_key": {
2889          "autoDelete": "A String", # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
2890        },
2891      },
2892    },
2893  },
2894  "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
2895}
2896
2897  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.
2898
2899For 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.
2900
2901The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2902
2903Returns:
2904  An object of the form:
2905
2906    { # Represents an Operation resource.
2907      #
2908      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2909      #
2910      # Operations can be global, regional or zonal.
2911      # - For global operations, use the globalOperations resource.
2912      # - For regional operations, use the regionOperations resource.
2913      # - For zonal operations, use the zonalOperations resource.
2914      #
2915      # 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 ==)
2916    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2917    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2918    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2919    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2920    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2921    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2922    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2923    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2924    "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.
2925    "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.
2926    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2927    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2928    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2929    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2930      {
2931        "message": "A String", # [Output Only] A human-readable description of the warning code.
2932        "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.
2933        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2934            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2935          {
2936            "value": "A String", # [Output Only] A warning data value corresponding to the key.
2937            "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).
2938          },
2939        ],
2940      },
2941    ],
2942    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2943    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2944    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2945    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2946    "name": "A String", # [Output Only] Name of the resource.
2947    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2948    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2949      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2950        {
2951          "message": "A String", # [Output Only] An optional, human-readable error message.
2952          "code": "A String", # [Output Only] The error type identifier for this error.
2953          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2954        },
2955      ],
2956    },
2957    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2958    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2959    "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.
2960  }</pre>
2961</div>
2962
2963<div class="method">
2964    <code class="details" id="updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body, requestId=None)</code>
2965  <pre>Insert or update (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.
2966
2967Args:
2968  project: string, Project ID for this request. (required)
2969  zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
2970  instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
2971  body: object, The request body. (required)
2972    The object takes the form of:
2973
2974{ # InstanceGroupManagers.updatePerInstanceConfigs
2975    "perInstanceConfigs": [ # The list of per-instance configs to insert or patch on this managed instance group.
2976      {
2977        "override": { # Overrides of stateful properties for a given instance
2978          "origin": "A String", # [Output Only] Indicates where does the override come from.
2979          "disks": [ # Disk overrides defined for this instance. According to documentation the maximum number of disks attached to an instance is 128: https://cloud.google.com/compute/docs/disks/ However, compute API defines the limit at 140, so this is what we check.
2980            {
2981              "deviceName": "A String", # The name of the device on the VM
2982              "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
2983              "source": "A String", # The disk that is/will be mounted
2984            },
2985          ],
2986          "metadata": [ # Metadata overrides defined for this instance. TODO(b/69785416) validate the total length is <9 KB
2987            {
2988              "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
2989              "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
2990            },
2991          ],
2992        },
2993        "instance": "A String", # The URL of the instance. Serves as a merge key during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same instance URL exists then it will be updated, otherwise a new one will be created.
2994        "name": "A String", # The name of the per-instance config and the corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance config for a VM instance that either doesn't exist or is not part of the group will result in a failure.
2995        "preservedState": { # Preserved state for a given instance. # Intended preserved state for the given instance. Does not contain state generated based on Stateful Policy.
2996          "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
2997            "a_key": {
2998              "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance.
2999              "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
3000              "autoDelete": "A String", # These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
3001            },
3002          },
3003          "metadata": { # Preserved metadata defined for this instance.
3004            "a_key": "A String",
3005          },
3006        },
3007        "fingerprint": "A String", # Fingerprint of this per-instance config. This field may be used in optimistic locking. It will be ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in order to update an existing per-instance config or the field needs to be unset.
3008      },
3009    ],
3010  }
3011
3012  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.
3013
3014For 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.
3015
3016The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3017
3018Returns:
3019  An object of the form:
3020
3021    { # Represents an Operation resource.
3022      #
3023      # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3024      #
3025      # Operations can be global, regional or zonal.
3026      # - For global operations, use the globalOperations resource.
3027      # - For regional operations, use the regionOperations resource.
3028      # - For zonal operations, use the zonalOperations resource.
3029      #
3030      # 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 ==)
3031    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3032    "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3033    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
3034    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3035    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3036    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3037    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3038    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3039    "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.
3040    "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.
3041    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3042    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3043    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3044    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3045      {
3046        "message": "A String", # [Output Only] A human-readable description of the warning code.
3047        "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.
3048        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3049            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3050          {
3051            "value": "A String", # [Output Only] A warning data value corresponding to the key.
3052            "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).
3053          },
3054        ],
3055      },
3056    ],
3057    "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
3058    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3059    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3060    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3061    "name": "A String", # [Output Only] Name of the resource.
3062    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3063    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3064      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3065        {
3066          "message": "A String", # [Output Only] An optional, human-readable error message.
3067          "code": "A String", # [Output Only] The error type identifier for this error.
3068          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3069        },
3070      ],
3071    },
3072    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3073    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3074    "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.
3075  }</pre>
3076</div>
3077
3078</body></html>