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