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