1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.instanceGroupManagers.html">instanceGroupManagers</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#abandonInstances">abandonInstances(project, zone, instanceGroupManager, body=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="#resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</a></code></p> 148<p class="firstline">Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method. If you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method. 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> 149<p class="toc_element"> 150 <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</a></code></p> 151<p class="firstline">Motifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use instanceGroupManagers.patch instead.</p> 152<p class="toc_element"> 153 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</a></code></p> 154<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> 155<p class="toc_element"> 156 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</a></code></p> 157<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> 158<p class="toc_element"> 159 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None, x__xgafv=None)</a></code></p> 160<p class="firstline">Returns permissions that a caller has on the specified resource.</p> 161<p class="toc_element"> 162 <code><a href="#update">update(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</a></code></p> 163<p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.</p> 164<p class="toc_element"> 165 <code><a href="#updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</a></code></p> 166<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> 167<h3>Method Details</h3> 168<div class="method"> 169 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</code> 170 <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. 171 172Args: 173 project: string, Project ID for this request. (required) 174 zone: string, The name of the zone where the managed instance group is located. (required) 175 instanceGroupManager: string, The name of the managed instance group. (required) 176 body: object, The request body. 177 The object takes the form of: 178 179{ 180 "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]. 181 "A String", 182 ], 183} 184 185 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). 186 x__xgafv: string, V1 error format. 187 Allowed values 188 1 - v1 error format 189 2 - v2 error format 190 191Returns: 192 An object of the form: 193 194 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 195 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 196 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 197 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 198 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 199 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 200 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 201 { 202 "code": "A String", # [Output Only] The error type identifier for this error. 203 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 204 "message": "A String", # [Output Only] An optional, human-readable error message. 205 }, 206 ], 207 }, 208 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 209 "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. 210 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 211 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 212 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 213 "name": "A String", # [Output Only] Name of the operation. 214 "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. 215 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 216 "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. 217 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 218 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 219 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 220 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 221 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 222 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 223 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 224 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 225 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 226 { 227 "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. 228 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 229 { 230 "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). 231 "value": "A String", # [Output Only] A warning data value corresponding to the key. 232 }, 233 ], 234 "message": "A String", # [Output Only] A human-readable description of the warning code. 235 }, 236 ], 237 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 238}</pre> 239</div> 240 241<div class="method"> 242 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code> 243 <pre>Retrieves the list of managed instance groups and groups them by zone. 244 245Args: 246 project: string, Project ID for this request. (required) 247 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) ``` 248 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. 249 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`) 250 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. 251 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. 252 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. 253 x__xgafv: string, V1 error format. 254 Allowed values 255 1 - v1 error format 256 2 - v2 error format 257 258Returns: 259 An object of the form: 260 261 { 262 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 263 "items": { # A list of InstanceGroupManagersScopedList resources. 264 "a_key": { # [Output Only] The name of the scope that contains this set of managed instance groups. 265 "instanceGroupManagers": [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone. 266 { # 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. 267 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 268 { 269 "healthCheck": "A String", # The URL for the health check that signals autohealing. 270 "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]. 271 }, 272 ], 273 "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. 274 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 275 "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. 276 "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. 277 "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. 278 "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. 279 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 280 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 281 "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. 282 "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. 283 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 284 "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. 285 }, 286 "description": "A String", # An optional description of this resource. 287 "distributionPolicy": { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group. 288 "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). 289 "zones": [ # Zones where the regional managed instance group will create and manage its instances. 290 { 291 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located. 292 }, 293 ], 294 }, 295 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER. 296 "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. 297 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 298 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 299 "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. 300 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 301 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 302 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 303 { # The named port. For example: <"http", 80>. 304 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 305 "port": 42, # The port number, which can be a value between 1 and 65535. 306 }, 307 ], 308 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 309 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 310 "serviceAccount": "A String", # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used. 311 "statefulPolicy": { # Stateful configuration for this Instanced Group Manager 312 "preservedState": { # Configuration of preserved resources. 313 "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. 314 "a_key": { 315 "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. 316 }, 317 }, 318 "externalIPs": { # External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. 319 "a_key": { 320 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 321 }, 322 }, 323 "internalIPs": { # Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. 324 "a_key": { 325 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 326 }, 327 }, 328 }, 329 }, 330 "status": { # [Output Only] The status of this managed instance group. 331 "autoscaler": "A String", # [Output Only] The URL of the Autoscaler that targets this instance group manager. 332 "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. 333 "stateful": { # [Output Only] Stateful status of the given Instance Group Manager. 334 "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. 335 "isStateful": True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. This field is deprecated in favor of has_stateful_config. 336 "perInstanceConfigs": { # [Output Only] Status of per-instance configs on the instance. 337 "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. 338 }, 339 }, 340 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager. 341 "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. 342 }, 343 }, 344 "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. 345 "A String", 346 ], 347 "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. 348 "updatePolicy": { # The update policy for this managed instance group. 349 "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. 350 "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. 351 "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. 352 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 353 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 354 }, 355 "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. 356 "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. 357 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 358 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 359 }, 360 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600]. 361 "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. 362 "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. 363 "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE 364 "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). 365 }, 366 "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. 367 { 368 "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. 369 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group. 370 "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. 371 "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. 372 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 373 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 374 }, 375 }, 376 ], 377 "zone": "A String", # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources). 378 }, 379 ], 380 "warning": { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty. 381 "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. 382 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 383 { 384 "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). 385 "value": "A String", # [Output Only] A warning data value corresponding to the key. 386 }, 387 ], 388 "message": "A String", # [Output Only] A human-readable description of the warning code. 389 }, 390 }, 391 }, 392 "kind": "compute#instanceGroupManagerAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups. 393 "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. 394 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 395 "unreachables": [ # [Output Only] Unreachable resources. 396 "A String", 397 ], 398 "warning": { # [Output Only] Informational warning message. 399 "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. 400 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 401 { 402 "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). 403 "value": "A String", # [Output Only] A warning data value corresponding to the key. 404 }, 405 ], 406 "message": "A String", # [Output Only] A human-readable description of the warning code. 407 }, 408}</pre> 409</div> 410 411<div class="method"> 412 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code> 413 <pre>Retrieves the next page of results. 414 415Args: 416 previous_request: The request for the previous page. (required) 417 previous_response: The response from the request for the previous page. (required) 418 419Returns: 420 A request object that you can call 'execute()' on to request the next 421 page. Returns None if there are no more items in the collection. 422 </pre> 423</div> 424 425<div class="method"> 426 <code class="details" id="applyUpdatesToInstances">applyUpdatesToInstances(project, zone, instanceGroupManager, body=None, x__xgafv=None)</code> 427 <pre>Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions. 428 429Args: 430 project: string, Project ID for this request. (required) 431 zone: string, The name of the zone where the managed instance group is located. Should conform to RFC1035. (required) 432 instanceGroupManager: string, The name of the managed instance group, should conform to RFC1035. (required) 433 body: object, The request body. 434 The object takes the form of: 435 436{ # InstanceGroupManagers.applyUpdatesToInstances 437 "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. 438 "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]. 439 "A String", 440 ], 441 "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. 442 "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. 443} 444 445 x__xgafv: string, V1 error format. 446 Allowed values 447 1 - v1 error format 448 2 - v2 error format 449 450Returns: 451 An object of the form: 452 453 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 454 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 455 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 456 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 457 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 458 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 459 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 460 { 461 "code": "A String", # [Output Only] The error type identifier for this error. 462 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 463 "message": "A String", # [Output Only] An optional, human-readable error message. 464 }, 465 ], 466 }, 467 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 468 "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. 469 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 470 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 471 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 472 "name": "A String", # [Output Only] Name of the operation. 473 "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. 474 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 475 "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. 476 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 477 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 478 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 479 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 480 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 481 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 482 "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. 483 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 484 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 485 { 486 "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. 487 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 488 { 489 "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). 490 "value": "A String", # [Output Only] A warning data value corresponding to the key. 491 }, 492 ], 493 "message": "A String", # [Output Only] A human-readable description of the warning code. 494 }, 495 ], 496 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 497}</pre> 498</div> 499 500<div class="method"> 501 <code class="details" id="close">close()</code> 502 <pre>Close httplib2 connections.</pre> 503</div> 504 505<div class="method"> 506 <code class="details" id="createInstances">createInstances(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</code> 507 <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. 508 509Args: 510 project: string, Project ID for this request. (required) 511 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required) 512 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required) 513 body: object, The request body. 514 The object takes the form of: 515 516{ # InstanceGroupManagers.createInstances 517 "instances": [ # [Required] List of specifications of per-instance configs. 518 { 519 "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. 520 "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. 521 "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. 522 "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks. 523 "a_key": { 524 "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. 525 "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. 526 "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance. 527 }, 528 }, 529 "externalIPs": { # Preserved external IPs defined for this instance. This map is keyed with the name of the network interface. 530 "a_key": { 531 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 532 "ipAddress": { # Ip address representation 533 "address": "A String", # The URL of the reservation for this IP address. 534 "literal": "A String", # An IPv4 internal network address to assign to the instance for this network interface. 535 }, 536 }, 537 }, 538 "internalIPs": { # Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface. 539 "a_key": { 540 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 541 "ipAddress": { # Ip address representation 542 "address": "A String", # The URL of the reservation for this IP address. 543 "literal": "A String", # An IPv4 internal network address to assign to the instance for this network interface. 544 }, 545 }, 546 }, 547 "metadata": { # Preserved metadata defined for this instance. 548 "a_key": "A String", 549 }, 550 }, 551 "status": "A String", # The status of applying this per-instance config on the corresponding managed instance. 552 }, 553 ], 554} 555 556 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). 557 x__xgafv: string, V1 error format. 558 Allowed values 559 1 - v1 error format 560 2 - v2 error format 561 562Returns: 563 An object of the form: 564 565 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 566 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 567 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 568 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 569 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 570 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 571 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 572 { 573 "code": "A String", # [Output Only] The error type identifier for this error. 574 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 575 "message": "A String", # [Output Only] An optional, human-readable error message. 576 }, 577 ], 578 }, 579 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 580 "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. 581 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 582 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 583 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 584 "name": "A String", # [Output Only] Name of the operation. 585 "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. 586 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 587 "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. 588 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 589 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 590 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 591 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 592 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 593 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 594 "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. 595 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 596 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 597 { 598 "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. 599 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 600 { 601 "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). 602 "value": "A String", # [Output Only] A warning data value corresponding to the key. 603 }, 604 ], 605 "message": "A String", # [Output Only] A human-readable description of the warning code. 606 }, 607 ], 608 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 609}</pre> 610</div> 611 612<div class="method"> 613 <code class="details" id="delete">delete(project, zone, instanceGroupManager, requestId=None, x__xgafv=None)</code> 614 <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. 615 616Args: 617 project: string, Project ID for this request. (required) 618 zone: string, The name of the zone where the managed instance group is located. (required) 619 instanceGroupManager: string, The name of the managed instance group to delete. (required) 620 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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). 621 x__xgafv: string, V1 error format. 622 Allowed values 623 1 - v1 error format 624 2 - v2 error format 625 626Returns: 627 An object of the form: 628 629 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 630 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 631 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 632 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 633 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 634 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 635 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 636 { 637 "code": "A String", # [Output Only] The error type identifier for this error. 638 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 639 "message": "A String", # [Output Only] An optional, human-readable error message. 640 }, 641 ], 642 }, 643 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 644 "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. 645 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 646 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 647 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 648 "name": "A String", # [Output Only] Name of the operation. 649 "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. 650 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 651 "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. 652 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 653 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 654 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 655 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 656 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 657 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 658 "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. 659 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 660 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 661 { 662 "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. 663 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 664 { 665 "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). 666 "value": "A String", # [Output Only] A warning data value corresponding to the key. 667 }, 668 ], 669 "message": "A String", # [Output Only] A human-readable description of the warning code. 670 }, 671 ], 672 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 673}</pre> 674</div> 675 676<div class="method"> 677 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</code> 678 <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. 679 680Args: 681 project: string, Project ID for this request. (required) 682 zone: string, The name of the zone where the managed instance group is located. (required) 683 instanceGroupManager: string, The name of the managed instance group. (required) 684 body: object, The request body. 685 The object takes the form of: 686 687{ 688 "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]. 689 "A String", 690 ], 691 "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. 692} 693 694 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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). 695 x__xgafv: string, V1 error format. 696 Allowed values 697 1 - v1 error format 698 2 - v2 error format 699 700Returns: 701 An object of the form: 702 703 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 704 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 705 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 706 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 707 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 708 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 709 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 710 { 711 "code": "A String", # [Output Only] The error type identifier for this error. 712 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 713 "message": "A String", # [Output Only] An optional, human-readable error message. 714 }, 715 ], 716 }, 717 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 718 "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. 719 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 720 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 721 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 722 "name": "A String", # [Output Only] Name of the operation. 723 "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. 724 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 725 "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. 726 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 727 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 728 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 729 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 730 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 731 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 732 "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. 733 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 734 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 735 { 736 "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. 737 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 738 { 739 "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). 740 "value": "A String", # [Output Only] A warning data value corresponding to the key. 741 }, 742 ], 743 "message": "A String", # [Output Only] A human-readable description of the warning code. 744 }, 745 ], 746 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 747}</pre> 748</div> 749 750<div class="method"> 751 <code class="details" id="deletePerInstanceConfigs">deletePerInstanceConfigs(project, zone, instanceGroupManager, body=None, x__xgafv=None)</code> 752 <pre>Deletes selected per-instance configs for the managed instance group. 753 754Args: 755 project: string, Project ID for this request. (required) 756 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required) 757 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required) 758 body: object, The request body. 759 The object takes the form of: 760 761{ # InstanceGroupManagers.deletePerInstanceConfigs 762 "names": [ # The list of instance names for which we want to delete per-instance configs on this managed instance group. 763 "A String", 764 ], 765} 766 767 x__xgafv: string, V1 error format. 768 Allowed values 769 1 - v1 error format 770 2 - v2 error format 771 772Returns: 773 An object of the form: 774 775 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 776 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 777 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 778 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 779 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 780 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 781 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 782 { 783 "code": "A String", # [Output Only] The error type identifier for this error. 784 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 785 "message": "A String", # [Output Only] An optional, human-readable error message. 786 }, 787 ], 788 }, 789 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 790 "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. 791 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 792 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 793 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 794 "name": "A String", # [Output Only] Name of the operation. 795 "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. 796 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 797 "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. 798 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 799 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 800 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 801 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 802 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 803 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 804 "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. 805 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 806 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 807 { 808 "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. 809 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 810 { 811 "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). 812 "value": "A String", # [Output Only] A warning data value corresponding to the key. 813 }, 814 ], 815 "message": "A String", # [Output Only] A human-readable description of the warning code. 816 }, 817 ], 818 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 819}</pre> 820</div> 821 822<div class="method"> 823 <code class="details" id="get">get(project, zone, instanceGroupManager, x__xgafv=None)</code> 824 <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. 825 826Args: 827 project: string, Project ID for this request. (required) 828 zone: string, The name of the zone where the managed instance group is located. (required) 829 instanceGroupManager: string, The name of the managed instance group. (required) 830 x__xgafv: string, V1 error format. 831 Allowed values 832 1 - v1 error format 833 2 - v2 error format 834 835Returns: 836 An object of the form: 837 838 { # 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. 839 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 840 { 841 "healthCheck": "A String", # The URL for the health check that signals autohealing. 842 "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]. 843 }, 844 ], 845 "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. 846 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 847 "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. 848 "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. 849 "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. 850 "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. 851 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 852 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 853 "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. 854 "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. 855 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 856 "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. 857 }, 858 "description": "A String", # An optional description of this resource. 859 "distributionPolicy": { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group. 860 "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). 861 "zones": [ # Zones where the regional managed instance group will create and manage its instances. 862 { 863 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located. 864 }, 865 ], 866 }, 867 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER. 868 "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. 869 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 870 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 871 "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. 872 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 873 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 874 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 875 { # The named port. For example: <"http", 80>. 876 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 877 "port": 42, # The port number, which can be a value between 1 and 65535. 878 }, 879 ], 880 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 881 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 882 "serviceAccount": "A String", # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used. 883 "statefulPolicy": { # Stateful configuration for this Instanced Group Manager 884 "preservedState": { # Configuration of preserved resources. 885 "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. 886 "a_key": { 887 "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. 888 }, 889 }, 890 "externalIPs": { # External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. 891 "a_key": { 892 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 893 }, 894 }, 895 "internalIPs": { # Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. 896 "a_key": { 897 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 898 }, 899 }, 900 }, 901 }, 902 "status": { # [Output Only] The status of this managed instance group. 903 "autoscaler": "A String", # [Output Only] The URL of the Autoscaler that targets this instance group manager. 904 "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. 905 "stateful": { # [Output Only] Stateful status of the given Instance Group Manager. 906 "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. 907 "isStateful": True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. This field is deprecated in favor of has_stateful_config. 908 "perInstanceConfigs": { # [Output Only] Status of per-instance configs on the instance. 909 "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. 910 }, 911 }, 912 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager. 913 "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. 914 }, 915 }, 916 "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. 917 "A String", 918 ], 919 "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. 920 "updatePolicy": { # The update policy for this managed instance group. 921 "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. 922 "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. 923 "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. 924 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 925 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 926 }, 927 "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. 928 "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. 929 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 930 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 931 }, 932 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600]. 933 "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. 934 "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. 935 "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE 936 "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). 937 }, 938 "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. 939 { 940 "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. 941 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group. 942 "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. 943 "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. 944 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 945 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 946 }, 947 }, 948 ], 949 "zone": "A String", # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources). 950}</pre> 951</div> 952 953<div class="method"> 954 <code class="details" id="insert">insert(project, zone, body=None, requestId=None, x__xgafv=None)</code> 955 <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. 956 957Args: 958 project: string, Project ID for this request. (required) 959 zone: string, The name of the zone where you want to create the managed instance group. (required) 960 body: object, The request body. 961 The object takes the form of: 962 963{ # 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. 964 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 965 { 966 "healthCheck": "A String", # The URL for the health check that signals autohealing. 967 "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]. 968 }, 969 ], 970 "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. 971 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 972 "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. 973 "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. 974 "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. 975 "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. 976 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 977 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 978 "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. 979 "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. 980 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 981 "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. 982 }, 983 "description": "A String", # An optional description of this resource. 984 "distributionPolicy": { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group. 985 "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). 986 "zones": [ # Zones where the regional managed instance group will create and manage its instances. 987 { 988 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located. 989 }, 990 ], 991 }, 992 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER. 993 "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. 994 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 995 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 996 "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. 997 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 998 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 999 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 1000 { # The named port. For example: <"http", 80>. 1001 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 1002 "port": 42, # The port number, which can be a value between 1 and 65535. 1003 }, 1004 ], 1005 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 1006 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 1007 "serviceAccount": "A String", # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used. 1008 "statefulPolicy": { # Stateful configuration for this Instanced Group Manager 1009 "preservedState": { # Configuration of preserved resources. 1010 "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. 1011 "a_key": { 1012 "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. 1013 }, 1014 }, 1015 "externalIPs": { # External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. 1016 "a_key": { 1017 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 1018 }, 1019 }, 1020 "internalIPs": { # Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. 1021 "a_key": { 1022 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 1023 }, 1024 }, 1025 }, 1026 }, 1027 "status": { # [Output Only] The status of this managed instance group. 1028 "autoscaler": "A String", # [Output Only] The URL of the Autoscaler that targets this instance group manager. 1029 "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. 1030 "stateful": { # [Output Only] Stateful status of the given Instance Group Manager. 1031 "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. 1032 "isStateful": True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. This field is deprecated in favor of has_stateful_config. 1033 "perInstanceConfigs": { # [Output Only] Status of per-instance configs on the instance. 1034 "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. 1035 }, 1036 }, 1037 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager. 1038 "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. 1039 }, 1040 }, 1041 "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. 1042 "A String", 1043 ], 1044 "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. 1045 "updatePolicy": { # The update policy for this managed instance group. 1046 "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. 1047 "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. 1048 "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. 1049 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 1050 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 1051 }, 1052 "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. 1053 "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. 1054 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 1055 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 1056 }, 1057 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600]. 1058 "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. 1059 "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. 1060 "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE 1061 "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). 1062 }, 1063 "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. 1064 { 1065 "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. 1066 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group. 1067 "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. 1068 "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. 1069 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 1070 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 1071 }, 1072 }, 1073 ], 1074 "zone": "A String", # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources). 1075} 1076 1077 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). 1078 x__xgafv: string, V1 error format. 1079 Allowed values 1080 1 - v1 error format 1081 2 - v2 error format 1082 1083Returns: 1084 An object of the form: 1085 1086 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 1087 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1088 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1089 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1090 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1091 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1092 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1093 { 1094 "code": "A String", # [Output Only] The error type identifier for this error. 1095 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1096 "message": "A String", # [Output Only] An optional, human-readable error message. 1097 }, 1098 ], 1099 }, 1100 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1101 "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. 1102 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1103 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1104 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1105 "name": "A String", # [Output Only] Name of the operation. 1106 "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. 1107 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1108 "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. 1109 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1110 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1111 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1112 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1113 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1114 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1115 "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. 1116 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1117 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1118 { 1119 "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. 1120 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1121 { 1122 "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). 1123 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1124 }, 1125 ], 1126 "message": "A String", # [Output Only] A human-readable description of the warning code. 1127 }, 1128 ], 1129 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1130}</pre> 1131</div> 1132 1133<div class="method"> 1134 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code> 1135 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone. 1136 1137Args: 1138 project: string, Project ID for this request. (required) 1139 zone: string, The name of the zone where the managed instance group is located. (required) 1140 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) ``` 1141 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`) 1142 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. 1143 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. 1144 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. 1145 x__xgafv: string, V1 error format. 1146 Allowed values 1147 1 - v1 error format 1148 2 - v2 error format 1149 1150Returns: 1151 An object of the form: 1152 1153 { # [Output Only] A list of managed instance groups. 1154 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 1155 "items": [ # A list of InstanceGroupManager resources. 1156 { # 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. 1157 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 1158 { 1159 "healthCheck": "A String", # The URL for the health check that signals autohealing. 1160 "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]. 1161 }, 1162 ], 1163 "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. 1164 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 1165 "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. 1166 "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. 1167 "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. 1168 "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. 1169 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 1170 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 1171 "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. 1172 "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. 1173 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 1174 "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. 1175 }, 1176 "description": "A String", # An optional description of this resource. 1177 "distributionPolicy": { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group. 1178 "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). 1179 "zones": [ # Zones where the regional managed instance group will create and manage its instances. 1180 { 1181 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located. 1182 }, 1183 ], 1184 }, 1185 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER. 1186 "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. 1187 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 1188 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 1189 "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. 1190 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 1191 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 1192 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 1193 { # The named port. For example: <"http", 80>. 1194 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 1195 "port": 42, # The port number, which can be a value between 1 and 65535. 1196 }, 1197 ], 1198 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 1199 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 1200 "serviceAccount": "A String", # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used. 1201 "statefulPolicy": { # Stateful configuration for this Instanced Group Manager 1202 "preservedState": { # Configuration of preserved resources. 1203 "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. 1204 "a_key": { 1205 "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. 1206 }, 1207 }, 1208 "externalIPs": { # External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. 1209 "a_key": { 1210 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 1211 }, 1212 }, 1213 "internalIPs": { # Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. 1214 "a_key": { 1215 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 1216 }, 1217 }, 1218 }, 1219 }, 1220 "status": { # [Output Only] The status of this managed instance group. 1221 "autoscaler": "A String", # [Output Only] The URL of the Autoscaler that targets this instance group manager. 1222 "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. 1223 "stateful": { # [Output Only] Stateful status of the given Instance Group Manager. 1224 "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. 1225 "isStateful": True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. This field is deprecated in favor of has_stateful_config. 1226 "perInstanceConfigs": { # [Output Only] Status of per-instance configs on the instance. 1227 "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. 1228 }, 1229 }, 1230 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager. 1231 "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. 1232 }, 1233 }, 1234 "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. 1235 "A String", 1236 ], 1237 "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. 1238 "updatePolicy": { # The update policy for this managed instance group. 1239 "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. 1240 "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. 1241 "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. 1242 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 1243 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 1244 }, 1245 "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. 1246 "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. 1247 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 1248 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 1249 }, 1250 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600]. 1251 "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. 1252 "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. 1253 "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE 1254 "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). 1255 }, 1256 "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. 1257 { 1258 "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. 1259 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group. 1260 "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. 1261 "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. 1262 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 1263 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 1264 }, 1265 }, 1266 ], 1267 "zone": "A String", # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources). 1268 }, 1269 ], 1270 "kind": "compute#instanceGroupManagerList", # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups. 1271 "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. 1272 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 1273 "warning": { # [Output Only] Informational warning message. 1274 "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. 1275 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1276 { 1277 "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). 1278 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1279 }, 1280 ], 1281 "message": "A String", # [Output Only] A human-readable description of the warning code. 1282 }, 1283}</pre> 1284</div> 1285 1286<div class="method"> 1287 <code class="details" id="listErrors">listErrors(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code> 1288 <pre>Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported. 1289 1290Args: 1291 project: string, Project ID for this request. (required) 1292 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required) 1293 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) 1294 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) ``` 1295 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`) 1296 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. 1297 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. 1298 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. 1299 x__xgafv: string, V1 error format. 1300 Allowed values 1301 1 - v1 error format 1302 2 - v2 error format 1303 1304Returns: 1305 An object of the form: 1306 1307 { 1308 "items": [ # [Output Only] The list of errors of the managed instance group. 1309 { 1310 "error": { # [Output Only] Contents of the error. 1311 "code": "A String", # [Output Only] Error code. 1312 "message": "A String", # [Output Only] Error message. 1313 }, 1314 "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. 1315 "action": "A String", # [Output Only] Action that managed instance group was executing on the instance when the error occurred. Possible values: 1316 "instance": "A String", # [Output Only] The URL of the instance. The URL can be set even if the instance has not yet been created. 1317 "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. 1318 "instanceTemplate": "A String", # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }. 1319 "name": "A String", # [Output Only] Name of the version. 1320 }, 1321 }, 1322 "timestamp": "A String", # [Output Only] The time that this error occurred. This value is in RFC3339 text format. 1323 }, 1324 ], 1325 "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. 1326}</pre> 1327</div> 1328 1329<div class="method"> 1330 <code class="details" id="listErrors_next">listErrors_next(previous_request, previous_response)</code> 1331 <pre>Retrieves the next page of results. 1332 1333Args: 1334 previous_request: The request for the previous page. (required) 1335 previous_response: The response from the request for the previous page. (required) 1336 1337Returns: 1338 A request object that you can call 'execute()' on to request the next 1339 page. Returns None if there are no more items in the collection. 1340 </pre> 1341</div> 1342 1343<div class="method"> 1344 <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code> 1345 <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. 1346 1347Args: 1348 project: string, Project ID for this request. (required) 1349 zone: string, The name of the zone where the managed instance group is located. (required) 1350 instanceGroupManager: string, The name of the managed instance group. (required) 1351 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) ``` 1352 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`) 1353 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. 1354 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. 1355 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. 1356 x__xgafv: string, V1 error format. 1357 Allowed values 1358 1 - v1 error format 1359 2 - v2 error format 1360 1361Returns: 1362 An object of the form: 1363 1364 { 1365 "managedInstances": [ # [Output Only] The list of instances in the managed instance group. 1366 { # A Managed Instance resource. 1367 "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. 1368 "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist. 1369 "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created. 1370 "instanceHealth": [ # [Output Only] Health state of the instance per health-check. 1371 { 1372 "detailedHealthState": "A String", # [Output Only] The current detailed instance health state. 1373 "healthCheck": "A String", # [Output Only] The URL for the health check that verifies whether the instance is healthy. 1374 }, 1375 ], 1376 "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist. 1377 "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance. 1378 "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance. 1379 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1380 { 1381 "code": "A String", # [Output Only] The error type identifier for this error. 1382 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1383 "message": "A String", # [Output Only] An optional, human-readable error message. 1384 }, 1385 ], 1386 }, 1387 }, 1388 "preservedStateFromConfig": { # Preserved state for a given instance. # [Output Only] Preserved state applied from per-instance config for this instance. 1389 "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks. 1390 "a_key": { 1391 "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. 1392 "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. 1393 "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance. 1394 }, 1395 }, 1396 "externalIPs": { # Preserved external IPs defined for this instance. This map is keyed with the name of the network interface. 1397 "a_key": { 1398 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 1399 "ipAddress": { # Ip address representation 1400 "address": "A String", # The URL of the reservation for this IP address. 1401 "literal": "A String", # An IPv4 internal network address to assign to the instance for this network interface. 1402 }, 1403 }, 1404 }, 1405 "internalIPs": { # Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface. 1406 "a_key": { 1407 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 1408 "ipAddress": { # Ip address representation 1409 "address": "A String", # The URL of the reservation for this IP address. 1410 "literal": "A String", # An IPv4 internal network address to assign to the instance for this network interface. 1411 }, 1412 }, 1413 }, 1414 "metadata": { # Preserved metadata defined for this instance. 1415 "a_key": "A String", 1416 }, 1417 }, 1418 "preservedStateFromPolicy": { # Preserved state for a given instance. # [Output Only] Preserved state generated based on stateful policy for this instance. 1419 "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks. 1420 "a_key": { 1421 "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. 1422 "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. 1423 "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance. 1424 }, 1425 }, 1426 "externalIPs": { # Preserved external IPs defined for this instance. This map is keyed with the name of the network interface. 1427 "a_key": { 1428 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 1429 "ipAddress": { # Ip address representation 1430 "address": "A String", # The URL of the reservation for this IP address. 1431 "literal": "A String", # An IPv4 internal network address to assign to the instance for this network interface. 1432 }, 1433 }, 1434 }, 1435 "internalIPs": { # Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface. 1436 "a_key": { 1437 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 1438 "ipAddress": { # Ip address representation 1439 "address": "A String", # The URL of the reservation for this IP address. 1440 "literal": "A String", # An IPv4 internal network address to assign to the instance for this network interface. 1441 }, 1442 }, 1443 }, 1444 "metadata": { # Preserved metadata defined for this instance. 1445 "a_key": "A String", 1446 }, 1447 }, 1448 "version": { # [Output Only] Intended version of this instance. 1449 "instanceTemplate": "A String", # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }. 1450 "name": "A String", # [Output Only] Name of the version. 1451 }, 1452 }, 1453 ], 1454 "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. 1455}</pre> 1456</div> 1457 1458<div class="method"> 1459 <code class="details" id="listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</code> 1460 <pre>Retrieves the next page of results. 1461 1462Args: 1463 previous_request: The request for the previous page. (required) 1464 previous_response: The response from the request for the previous page. (required) 1465 1466Returns: 1467 A request object that you can call 'execute()' on to request the next 1468 page. Returns None if there are no more items in the collection. 1469 </pre> 1470</div> 1471 1472<div class="method"> 1473 <code class="details" id="listPerInstanceConfigs">listPerInstanceConfigs(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code> 1474 <pre>Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported. 1475 1476Args: 1477 project: string, Project ID for this request. (required) 1478 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required) 1479 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required) 1480 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) ``` 1481 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`) 1482 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. 1483 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. 1484 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. 1485 x__xgafv: string, V1 error format. 1486 Allowed values 1487 1 - v1 error format 1488 2 - v2 error format 1489 1490Returns: 1491 An object of the form: 1492 1493 { 1494 "items": [ # [Output Only] The list of PerInstanceConfig. 1495 { 1496 "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. 1497 "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. 1498 "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. 1499 "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks. 1500 "a_key": { 1501 "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. 1502 "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. 1503 "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance. 1504 }, 1505 }, 1506 "externalIPs": { # Preserved external IPs defined for this instance. This map is keyed with the name of the network interface. 1507 "a_key": { 1508 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 1509 "ipAddress": { # Ip address representation 1510 "address": "A String", # The URL of the reservation for this IP address. 1511 "literal": "A String", # An IPv4 internal network address to assign to the instance for this network interface. 1512 }, 1513 }, 1514 }, 1515 "internalIPs": { # Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface. 1516 "a_key": { 1517 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 1518 "ipAddress": { # Ip address representation 1519 "address": "A String", # The URL of the reservation for this IP address. 1520 "literal": "A String", # An IPv4 internal network address to assign to the instance for this network interface. 1521 }, 1522 }, 1523 }, 1524 "metadata": { # Preserved metadata defined for this instance. 1525 "a_key": "A String", 1526 }, 1527 }, 1528 "status": "A String", # The status of applying this per-instance config on the corresponding managed instance. 1529 }, 1530 ], 1531 "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. 1532 "warning": { # [Output Only] Informational warning message. 1533 "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. 1534 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1535 { 1536 "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). 1537 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1538 }, 1539 ], 1540 "message": "A String", # [Output Only] A human-readable description of the warning code. 1541 }, 1542}</pre> 1543</div> 1544 1545<div class="method"> 1546 <code class="details" id="listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</code> 1547 <pre>Retrieves the next page of results. 1548 1549Args: 1550 previous_request: The request for the previous page. (required) 1551 previous_response: The response from the request for the previous page. (required) 1552 1553Returns: 1554 A request object that you can call 'execute()' on to request the next 1555 page. Returns None if there are no more items in the collection. 1556 </pre> 1557</div> 1558 1559<div class="method"> 1560 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 1561 <pre>Retrieves the next page of results. 1562 1563Args: 1564 previous_request: The request for the previous page. (required) 1565 previous_response: The response from the request for the previous page. (required) 1566 1567Returns: 1568 A request object that you can call 'execute()' on to request the next 1569 page. Returns None if there are no more items in the collection. 1570 </pre> 1571</div> 1572 1573<div class="method"> 1574 <code class="details" id="patch">patch(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</code> 1575 <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. 1576 1577Args: 1578 project: string, Project ID for this request. (required) 1579 zone: string, The name of the zone where you want to create the managed instance group. (required) 1580 instanceGroupManager: string, The name of the instance group manager. (required) 1581 body: object, The request body. 1582 The object takes the form of: 1583 1584{ # 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. 1585 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 1586 { 1587 "healthCheck": "A String", # The URL for the health check that signals autohealing. 1588 "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]. 1589 }, 1590 ], 1591 "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. 1592 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 1593 "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. 1594 "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. 1595 "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. 1596 "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. 1597 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 1598 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 1599 "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. 1600 "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. 1601 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 1602 "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. 1603 }, 1604 "description": "A String", # An optional description of this resource. 1605 "distributionPolicy": { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group. 1606 "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). 1607 "zones": [ # Zones where the regional managed instance group will create and manage its instances. 1608 { 1609 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located. 1610 }, 1611 ], 1612 }, 1613 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER. 1614 "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. 1615 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 1616 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 1617 "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. 1618 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 1619 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 1620 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 1621 { # The named port. For example: <"http", 80>. 1622 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 1623 "port": 42, # The port number, which can be a value between 1 and 65535. 1624 }, 1625 ], 1626 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 1627 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 1628 "serviceAccount": "A String", # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used. 1629 "statefulPolicy": { # Stateful configuration for this Instanced Group Manager 1630 "preservedState": { # Configuration of preserved resources. 1631 "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. 1632 "a_key": { 1633 "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. 1634 }, 1635 }, 1636 "externalIPs": { # External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. 1637 "a_key": { 1638 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 1639 }, 1640 }, 1641 "internalIPs": { # Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. 1642 "a_key": { 1643 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 1644 }, 1645 }, 1646 }, 1647 }, 1648 "status": { # [Output Only] The status of this managed instance group. 1649 "autoscaler": "A String", # [Output Only] The URL of the Autoscaler that targets this instance group manager. 1650 "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. 1651 "stateful": { # [Output Only] Stateful status of the given Instance Group Manager. 1652 "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. 1653 "isStateful": True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. This field is deprecated in favor of has_stateful_config. 1654 "perInstanceConfigs": { # [Output Only] Status of per-instance configs on the instance. 1655 "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. 1656 }, 1657 }, 1658 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager. 1659 "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. 1660 }, 1661 }, 1662 "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. 1663 "A String", 1664 ], 1665 "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. 1666 "updatePolicy": { # The update policy for this managed instance group. 1667 "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. 1668 "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. 1669 "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. 1670 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 1671 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 1672 }, 1673 "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. 1674 "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. 1675 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 1676 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 1677 }, 1678 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600]. 1679 "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. 1680 "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. 1681 "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE 1682 "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). 1683 }, 1684 "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. 1685 { 1686 "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. 1687 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group. 1688 "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. 1689 "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. 1690 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 1691 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 1692 }, 1693 }, 1694 ], 1695 "zone": "A String", # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources). 1696} 1697 1698 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). 1699 x__xgafv: string, V1 error format. 1700 Allowed values 1701 1 - v1 error format 1702 2 - v2 error format 1703 1704Returns: 1705 An object of the form: 1706 1707 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 1708 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1709 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1710 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1711 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1712 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1713 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1714 { 1715 "code": "A String", # [Output Only] The error type identifier for this error. 1716 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1717 "message": "A String", # [Output Only] An optional, human-readable error message. 1718 }, 1719 ], 1720 }, 1721 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1722 "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. 1723 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1724 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1725 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1726 "name": "A String", # [Output Only] Name of the operation. 1727 "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. 1728 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1729 "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. 1730 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1731 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1732 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1733 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1734 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1735 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1736 "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. 1737 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1738 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1739 { 1740 "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. 1741 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1742 { 1743 "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). 1744 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1745 }, 1746 ], 1747 "message": "A String", # [Output Only] A human-readable description of the warning code. 1748 }, 1749 ], 1750 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1751}</pre> 1752</div> 1753 1754<div class="method"> 1755 <code class="details" id="patchPerInstanceConfigs">patchPerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</code> 1756 <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. 1757 1758Args: 1759 project: string, Project ID for this request. (required) 1760 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required) 1761 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required) 1762 body: object, The request body. 1763 The object takes the form of: 1764 1765{ # InstanceGroupManagers.patchPerInstanceConfigs 1766 "perInstanceConfigs": [ # The list of per-instance configs to insert or patch on this managed instance group. 1767 { 1768 "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. 1769 "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. 1770 "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. 1771 "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks. 1772 "a_key": { 1773 "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. 1774 "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. 1775 "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance. 1776 }, 1777 }, 1778 "externalIPs": { # Preserved external IPs defined for this instance. This map is keyed with the name of the network interface. 1779 "a_key": { 1780 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 1781 "ipAddress": { # Ip address representation 1782 "address": "A String", # The URL of the reservation for this IP address. 1783 "literal": "A String", # An IPv4 internal network address to assign to the instance for this network interface. 1784 }, 1785 }, 1786 }, 1787 "internalIPs": { # Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface. 1788 "a_key": { 1789 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 1790 "ipAddress": { # Ip address representation 1791 "address": "A String", # The URL of the reservation for this IP address. 1792 "literal": "A String", # An IPv4 internal network address to assign to the instance for this network interface. 1793 }, 1794 }, 1795 }, 1796 "metadata": { # Preserved metadata defined for this instance. 1797 "a_key": "A String", 1798 }, 1799 }, 1800 "status": "A String", # The status of applying this per-instance config on the corresponding managed instance. 1801 }, 1802 ], 1803} 1804 1805 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). 1806 x__xgafv: string, V1 error format. 1807 Allowed values 1808 1 - v1 error format 1809 2 - v2 error format 1810 1811Returns: 1812 An object of the form: 1813 1814 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 1815 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1816 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1817 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1818 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1819 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1820 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1821 { 1822 "code": "A String", # [Output Only] The error type identifier for this error. 1823 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1824 "message": "A String", # [Output Only] An optional, human-readable error message. 1825 }, 1826 ], 1827 }, 1828 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1829 "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. 1830 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1831 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1832 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1833 "name": "A String", # [Output Only] Name of the operation. 1834 "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. 1835 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1836 "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. 1837 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1838 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1839 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1840 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1841 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1842 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1843 "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. 1844 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1845 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1846 { 1847 "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. 1848 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1849 { 1850 "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). 1851 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1852 }, 1853 ], 1854 "message": "A String", # [Output Only] A human-readable description of the warning code. 1855 }, 1856 ], 1857 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1858}</pre> 1859</div> 1860 1861<div class="method"> 1862 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</code> 1863 <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. 1864 1865Args: 1866 project: string, Project ID for this request. (required) 1867 zone: string, The name of the zone where the managed instance group is located. (required) 1868 instanceGroupManager: string, The name of the managed instance group. (required) 1869 body: object, The request body. 1870 The object takes the form of: 1871 1872{ 1873 "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]. 1874 "A String", 1875 ], 1876} 1877 1878 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). 1879 x__xgafv: string, V1 error format. 1880 Allowed values 1881 1 - v1 error format 1882 2 - v2 error format 1883 1884Returns: 1885 An object of the form: 1886 1887 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 1888 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1889 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1890 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1891 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1892 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1893 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1894 { 1895 "code": "A String", # [Output Only] The error type identifier for this error. 1896 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1897 "message": "A String", # [Output Only] An optional, human-readable error message. 1898 }, 1899 ], 1900 }, 1901 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1902 "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. 1903 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1904 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1905 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1906 "name": "A String", # [Output Only] Name of the operation. 1907 "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. 1908 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1909 "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. 1910 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1911 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1912 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1913 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1914 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1915 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1916 "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. 1917 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1918 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1919 { 1920 "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. 1921 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1922 { 1923 "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). 1924 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1925 }, 1926 ], 1927 "message": "A String", # [Output Only] A human-readable description of the warning code. 1928 }, 1929 ], 1930 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1931}</pre> 1932</div> 1933 1934<div class="method"> 1935 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size, requestId=None, x__xgafv=None)</code> 1936 <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. 1937 1938Args: 1939 project: string, Project ID for this request. (required) 1940 zone: string, The name of the zone where the managed instance group is located. (required) 1941 instanceGroupManager: string, The name of the managed instance group. (required) 1942 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) 1943 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). 1944 x__xgafv: string, V1 error format. 1945 Allowed values 1946 1 - v1 error format 1947 2 - v2 error format 1948 1949Returns: 1950 An object of the form: 1951 1952 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 1953 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1954 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1955 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1956 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1957 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1958 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1959 { 1960 "code": "A String", # [Output Only] The error type identifier for this error. 1961 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1962 "message": "A String", # [Output Only] An optional, human-readable error message. 1963 }, 1964 ], 1965 }, 1966 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1967 "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. 1968 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1969 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1970 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1971 "name": "A String", # [Output Only] Name of the operation. 1972 "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. 1973 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1974 "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. 1975 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1976 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1977 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1978 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1979 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1980 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1981 "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. 1982 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1983 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1984 { 1985 "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. 1986 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1987 { 1988 "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). 1989 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1990 }, 1991 ], 1992 "message": "A String", # [Output Only] A human-readable description of the warning code. 1993 }, 1994 ], 1995 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1996}</pre> 1997</div> 1998 1999<div class="method"> 2000 <code class="details" id="resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</code> 2001 <pre>Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method. If you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method. 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. 2002 2003Args: 2004 project: string, Project ID for this request. (required) 2005 zone: string, The name of the zone where the managed instance group is located. (required) 2006 instanceGroupManager: string, The name of the managed instance group. (required) 2007 body: object, The request body. 2008 The object takes the form of: 2009 2010{ 2011 "noCreationRetries": True or False, # If this flag is true, the managed instance group attempts to create all instances initiated by this resize request only once. If there is an error during creation, the managed instance group does not retry create this instance, and we will decrease the targetSize of the request instead. If the flag is false, the group attempts to recreate each instance continuously until it succeeds. This flag matters only in the first attempt of creation of an instance. After an instance is successfully created while this flag is enabled, the instance behaves the same way as all the other instances created with a regular resize request. In particular, if a running instance dies unexpectedly at a later time and needs to be recreated, this mode does not affect the recreation behavior in that scenario. This flag is applicable only to the current resize request. It does not influence other resize requests in any way. You can see which instances is being creating in which mode by calling the get or listManagedInstances API. 2012 "targetSize": 42, # The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter. 2013} 2014 2015 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). 2016 x__xgafv: string, V1 error format. 2017 Allowed values 2018 1 - v1 error format 2019 2 - v2 error format 2020 2021Returns: 2022 An object of the form: 2023 2024 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 2025 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 2026 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 2027 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 2028 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 2029 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 2030 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 2031 { 2032 "code": "A String", # [Output Only] The error type identifier for this error. 2033 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 2034 "message": "A String", # [Output Only] An optional, human-readable error message. 2035 }, 2036 ], 2037 }, 2038 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 2039 "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. 2040 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 2041 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 2042 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 2043 "name": "A String", # [Output Only] Name of the operation. 2044 "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. 2045 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 2046 "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. 2047 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 2048 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 2049 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 2050 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 2051 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 2052 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 2053 "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. 2054 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 2055 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 2056 { 2057 "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. 2058 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 2059 { 2060 "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). 2061 "value": "A String", # [Output Only] A warning data value corresponding to the key. 2062 }, 2063 ], 2064 "message": "A String", # [Output Only] A human-readable description of the warning code. 2065 }, 2066 ], 2067 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 2068}</pre> 2069</div> 2070 2071<div class="method"> 2072 <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</code> 2073 <pre>Motifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use instanceGroupManagers.patch instead. 2074 2075Args: 2076 project: string, Project ID for this request. (required) 2077 zone: string, The name of the zone where the managed instance group is located. (required) 2078 instanceGroupManager: string, The name of the instance group manager. (required) 2079 body: object, The request body. 2080 The object takes the form of: 2081 2082{ 2083 "autoHealingPolicies": [ 2084 { 2085 "healthCheck": "A String", # The URL for the health check that signals autohealing. 2086 "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]. 2087 }, 2088 ], 2089} 2090 2091 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). 2092 x__xgafv: string, V1 error format. 2093 Allowed values 2094 1 - v1 error format 2095 2 - v2 error format 2096 2097Returns: 2098 An object of the form: 2099 2100 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 2101 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 2102 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 2103 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 2104 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 2105 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 2106 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 2107 { 2108 "code": "A String", # [Output Only] The error type identifier for this error. 2109 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 2110 "message": "A String", # [Output Only] An optional, human-readable error message. 2111 }, 2112 ], 2113 }, 2114 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 2115 "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. 2116 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 2117 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 2118 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 2119 "name": "A String", # [Output Only] Name of the operation. 2120 "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. 2121 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 2122 "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. 2123 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 2124 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 2125 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 2126 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 2127 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 2128 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 2129 "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. 2130 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 2131 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 2132 { 2133 "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. 2134 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 2135 { 2136 "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). 2137 "value": "A String", # [Output Only] A warning data value corresponding to the key. 2138 }, 2139 ], 2140 "message": "A String", # [Output Only] A human-readable description of the warning code. 2141 }, 2142 ], 2143 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 2144}</pre> 2145</div> 2146 2147<div class="method"> 2148 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</code> 2149 <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. 2150 2151Args: 2152 project: string, Project ID for this request. (required) 2153 zone: string, The name of the zone where the managed instance group is located. (required) 2154 instanceGroupManager: string, The name of the managed instance group. (required) 2155 body: object, The request body. 2156 The object takes the form of: 2157 2158{ 2159 "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. 2160} 2161 2162 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). 2163 x__xgafv: string, V1 error format. 2164 Allowed values 2165 1 - v1 error format 2166 2 - v2 error format 2167 2168Returns: 2169 An object of the form: 2170 2171 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 2172 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 2173 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 2174 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 2175 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 2176 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 2177 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 2178 { 2179 "code": "A String", # [Output Only] The error type identifier for this error. 2180 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 2181 "message": "A String", # [Output Only] An optional, human-readable error message. 2182 }, 2183 ], 2184 }, 2185 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 2186 "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. 2187 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 2188 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 2189 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 2190 "name": "A String", # [Output Only] Name of the operation. 2191 "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. 2192 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 2193 "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. 2194 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 2195 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 2196 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 2197 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 2198 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 2199 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 2200 "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. 2201 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 2202 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 2203 { 2204 "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. 2205 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 2206 { 2207 "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). 2208 "value": "A String", # [Output Only] A warning data value corresponding to the key. 2209 }, 2210 ], 2211 "message": "A String", # [Output Only] A human-readable description of the warning code. 2212 }, 2213 ], 2214 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 2215}</pre> 2216</div> 2217 2218<div class="method"> 2219 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</code> 2220 <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. 2221 2222Args: 2223 project: string, Project ID for this request. (required) 2224 zone: string, The name of the zone where the managed instance group is located. (required) 2225 instanceGroupManager: string, The name of the managed instance group. (required) 2226 body: object, The request body. 2227 The object takes the form of: 2228 2229{ 2230 "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. 2231 "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. 2232 "A String", 2233 ], 2234} 2235 2236 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). 2237 x__xgafv: string, V1 error format. 2238 Allowed values 2239 1 - v1 error format 2240 2 - v2 error format 2241 2242Returns: 2243 An object of the form: 2244 2245 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 2246 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 2247 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 2248 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 2249 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 2250 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 2251 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 2252 { 2253 "code": "A String", # [Output Only] The error type identifier for this error. 2254 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 2255 "message": "A String", # [Output Only] An optional, human-readable error message. 2256 }, 2257 ], 2258 }, 2259 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 2260 "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. 2261 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 2262 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 2263 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 2264 "name": "A String", # [Output Only] Name of the operation. 2265 "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. 2266 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 2267 "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. 2268 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 2269 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 2270 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 2271 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 2272 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 2273 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 2274 "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. 2275 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 2276 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 2277 { 2278 "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. 2279 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 2280 { 2281 "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). 2282 "value": "A String", # [Output Only] A warning data value corresponding to the key. 2283 }, 2284 ], 2285 "message": "A String", # [Output Only] A human-readable description of the warning code. 2286 }, 2287 ], 2288 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 2289}</pre> 2290</div> 2291 2292<div class="method"> 2293 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None, x__xgafv=None)</code> 2294 <pre>Returns permissions that a caller has on the specified resource. 2295 2296Args: 2297 project: string, Project ID for this request. (required) 2298 zone: string, The name of the zone for this request. (required) 2299 resource: string, Name or id of the resource for this request. (required) 2300 body: object, The request body. 2301 The object takes the form of: 2302 2303{ 2304 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. 2305 "A String", 2306 ], 2307} 2308 2309 x__xgafv: string, V1 error format. 2310 Allowed values 2311 1 - v1 error format 2312 2 - v2 error format 2313 2314Returns: 2315 An object of the form: 2316 2317 { 2318 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. 2319 "A String", 2320 ], 2321}</pre> 2322</div> 2323 2324<div class="method"> 2325 <code class="details" id="update">update(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</code> 2326 <pre>Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG. 2327 2328Args: 2329 project: string, Project ID for this request. (required) 2330 zone: string, The name of the zone where you want to create the managed instance group. (required) 2331 instanceGroupManager: string, The name of the instance group manager. (required) 2332 body: object, The request body. 2333 The object takes the form of: 2334 2335{ # 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. 2336 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 2337 { 2338 "healthCheck": "A String", # The URL for the health check that signals autohealing. 2339 "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]. 2340 }, 2341 ], 2342 "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. 2343 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 2344 "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. 2345 "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. 2346 "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. 2347 "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. 2348 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 2349 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 2350 "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. 2351 "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. 2352 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 2353 "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. 2354 }, 2355 "description": "A String", # An optional description of this resource. 2356 "distributionPolicy": { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group. 2357 "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). 2358 "zones": [ # Zones where the regional managed instance group will create and manage its instances. 2359 { 2360 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located. 2361 }, 2362 ], 2363 }, 2364 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER. 2365 "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. 2366 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 2367 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 2368 "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. 2369 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 2370 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 2371 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 2372 { # The named port. For example: <"http", 80>. 2373 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 2374 "port": 42, # The port number, which can be a value between 1 and 65535. 2375 }, 2376 ], 2377 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 2378 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 2379 "serviceAccount": "A String", # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used. 2380 "statefulPolicy": { # Stateful configuration for this Instanced Group Manager 2381 "preservedState": { # Configuration of preserved resources. 2382 "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. 2383 "a_key": { 2384 "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. 2385 }, 2386 }, 2387 "externalIPs": { # External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. 2388 "a_key": { 2389 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 2390 }, 2391 }, 2392 "internalIPs": { # Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. 2393 "a_key": { 2394 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 2395 }, 2396 }, 2397 }, 2398 }, 2399 "status": { # [Output Only] The status of this managed instance group. 2400 "autoscaler": "A String", # [Output Only] The URL of the Autoscaler that targets this instance group manager. 2401 "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. 2402 "stateful": { # [Output Only] Stateful status of the given Instance Group Manager. 2403 "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. 2404 "isStateful": True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. This field is deprecated in favor of has_stateful_config. 2405 "perInstanceConfigs": { # [Output Only] Status of per-instance configs on the instance. 2406 "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. 2407 }, 2408 }, 2409 "versionTarget": { # [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager. 2410 "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. 2411 }, 2412 }, 2413 "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. 2414 "A String", 2415 ], 2416 "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. 2417 "updatePolicy": { # The update policy for this managed instance group. 2418 "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. 2419 "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. 2420 "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. 2421 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 2422 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 2423 }, 2424 "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. 2425 "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. 2426 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 2427 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 2428 }, 2429 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600]. 2430 "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. 2431 "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. 2432 "replacementMethod": "A String", # What action should be used to replace instances. See minimal_action.REPLACE 2433 "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). 2434 }, 2435 "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. 2436 { 2437 "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. 2438 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group. 2439 "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. 2440 "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. 2441 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 2442 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 2443 }, 2444 }, 2445 ], 2446 "zone": "A String", # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources). 2447} 2448 2449 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). 2450 x__xgafv: string, V1 error format. 2451 Allowed values 2452 1 - v1 error format 2453 2 - v2 error format 2454 2455Returns: 2456 An object of the form: 2457 2458 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 2459 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 2460 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 2461 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 2462 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 2463 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 2464 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 2465 { 2466 "code": "A String", # [Output Only] The error type identifier for this error. 2467 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 2468 "message": "A String", # [Output Only] An optional, human-readable error message. 2469 }, 2470 ], 2471 }, 2472 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 2473 "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. 2474 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 2475 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 2476 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 2477 "name": "A String", # [Output Only] Name of the operation. 2478 "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. 2479 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 2480 "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. 2481 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 2482 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 2483 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 2484 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 2485 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 2486 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 2487 "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. 2488 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 2489 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 2490 { 2491 "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. 2492 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 2493 { 2494 "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). 2495 "value": "A String", # [Output Only] A warning data value corresponding to the key. 2496 }, 2497 ], 2498 "message": "A String", # [Output Only] A human-readable description of the warning code. 2499 }, 2500 ], 2501 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 2502}</pre> 2503</div> 2504 2505<div class="method"> 2506 <code class="details" id="updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None, x__xgafv=None)</code> 2507 <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. 2508 2509Args: 2510 project: string, Project ID for this request. (required) 2511 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required) 2512 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required) 2513 body: object, The request body. 2514 The object takes the form of: 2515 2516{ # InstanceGroupManagers.updatePerInstanceConfigs 2517 "perInstanceConfigs": [ # The list of per-instance configs to insert or patch on this managed instance group. 2518 { 2519 "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. 2520 "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. 2521 "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. 2522 "disks": { # Preserved disks defined for this instance. This map is keyed with the device names of the disks. 2523 "a_key": { 2524 "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. 2525 "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. 2526 "source": "A String", # The URL of the disk resource that is stateful and should be attached to the VM instance. 2527 }, 2528 }, 2529 "externalIPs": { # Preserved external IPs defined for this instance. This map is keyed with the name of the network interface. 2530 "a_key": { 2531 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 2532 "ipAddress": { # Ip address representation 2533 "address": "A String", # The URL of the reservation for this IP address. 2534 "literal": "A String", # An IPv4 internal network address to assign to the instance for this network interface. 2535 }, 2536 }, 2537 }, 2538 "internalIPs": { # Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface. 2539 "a_key": { 2540 "autoDelete": "A String", # These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. 2541 "ipAddress": { # Ip address representation 2542 "address": "A String", # The URL of the reservation for this IP address. 2543 "literal": "A String", # An IPv4 internal network address to assign to the instance for this network interface. 2544 }, 2545 }, 2546 }, 2547 "metadata": { # Preserved metadata defined for this instance. 2548 "a_key": "A String", 2549 }, 2550 }, 2551 "status": "A String", # The status of applying this per-instance config on the corresponding managed instance. 2552 }, 2553 ], 2554} 2555 2556 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). 2557 x__xgafv: string, V1 error format. 2558 Allowed values 2559 1 - v1 error format 2560 2 - v2 error format 2561 2562Returns: 2563 An object of the form: 2564 2565 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 2566 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 2567 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 2568 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 2569 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 2570 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 2571 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 2572 { 2573 "code": "A String", # [Output Only] The error type identifier for this error. 2574 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 2575 "message": "A String", # [Output Only] An optional, human-readable error message. 2576 }, 2577 ], 2578 }, 2579 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 2580 "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. 2581 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 2582 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 2583 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 2584 "name": "A String", # [Output Only] Name of the operation. 2585 "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. 2586 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 2587 "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. 2588 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 2589 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 2590 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 2591 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 2592 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 2593 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 2594 "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. 2595 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 2596 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 2597 { 2598 "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. 2599 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 2600 { 2601 "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). 2602 "value": "A String", # [Output Only] A warning data value corresponding to the key. 2603 }, 2604 ], 2605 "message": "A String", # [Output Only] A human-readable description of the warning code. 2606 }, 2607 ], 2608 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 2609}</pre> 2610</div> 2611 2612</body></html>