blob: 7ab6b8e69f8d0441f39e5686ac2918d5237125ed [file] [log] [blame]
Takashi Matsuo06694102015-09-11 13:55:40 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.instanceGroupManagers.html">instanceGroupManagers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#abandonInstances">abandonInstances(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
79<p class="firstline">Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070080<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070081 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080082<p class="firstline">Retrieves the list of managed instance groups and groups them by zone.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070083<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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#delete">delete(project, zone, instanceGroupManager, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080088<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>
Takashi Matsuo06694102015-09-11 13:55:40 -070089<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#deleteInstances">deleteInstances(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
91<p class="firstline">Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070092<p class="toc_element">
93 <code><a href="#get">get(project, zone, instanceGroupManager)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<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>
Takashi Matsuo06694102015-09-11 13:55:40 -070095<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 <code><a href="#insert">insert(project, zone, body, requestId=None)</a></code></p>
97<p class="firstline">Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070098<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070099 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700100<p class="firstline">Retrieves a list of managed instance groups that are contained within the specified project and zone.</p>
101<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800102 <code><a href="#listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800103<p class="firstline">Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700104<p class="toc_element">
105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700108 <code><a href="#patch">patch(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
109<p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700110<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700111 <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
112<p class="firstline">Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.</p>
113<p class="toc_element">
114 <code><a href="#resize">resize(project, zone, instanceGroupManager, size, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800115<p class="firstline">Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700116<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700118<p class="firstline">Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.</p>
119<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800121<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>
Takashi Matsuo06694102015-09-11 13:55:40 -0700122<h3>Method Details</h3>
123<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body, requestId=None)</code>
125 <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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700126
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400127If 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.
128
129You can specify a maximum of 1000 instances with this method per request.
130
Takashi Matsuo06694102015-09-11 13:55:40 -0700131Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800132 project: string, Project ID for this request. (required)
133 zone: string, The name of the zone where the managed instance group is located. (required)
134 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700135 body: object, The request body. (required)
136 The object takes the form of:
137
138{
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400139 "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].
Takashi Matsuo06694102015-09-11 13:55:40 -0700140 "A String",
141 ],
142 }
143
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700144 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.
145
146For 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.
147
148The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700149
150Returns:
151 An object of the form:
152
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 { # Represents an Operation resource.
154 #
155 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
156 #
157 # Operations can be global, regional or zonal.
158 # - For global operations, use the globalOperations resource.
159 # - For regional operations, use the regionOperations resource.
160 # - For zonal operations, use the zonalOperations resource.
161 #
162 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800163 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700164 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400165 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800166 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700167 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800168 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
169 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700170 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800171 "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.
172 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700173 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800174 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
175 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700176 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
177 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800178 "message": "A String", # [Output Only] A human-readable description of the warning code.
179 "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.
180 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
181 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700182 {
183 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700184 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -0700185 },
186 ],
187 },
188 ],
189 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800190 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
191 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700192 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700194 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
195 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
196 {
197 "message": "A String", # [Output Only] An optional, human-readable error message.
198 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700199 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700200 },
201 ],
202 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800203 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700204 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800205 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700206 }</pre>
207</div>
208
209<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700210 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800211 <pre>Retrieves the list of managed instance groups and groups them by zone.
Takashi Matsuo06694102015-09-11 13:55:40 -0700212
213Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800214 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700215 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
216
217You 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.
218
219Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400220 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)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800221 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700222 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
Takashi Matsuo06694102015-09-11 13:55:40 -0700223
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700224For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700225
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700226You 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800227
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700228To 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).
Takashi Matsuo06694102015-09-11 13:55:40 -0700229
230Returns:
231 An object of the form:
232
233 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800234 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700235 "kind": "compute#instanceGroupManagerAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups.
236 "items": { # A list of InstanceGroupManagersScopedList resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800237 "a_key": { # [Output Only] The name of the scope that contains this set of managed instance groups.
Takashi Matsuo06694102015-09-11 13:55:40 -0700238 "warning": { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800239 "message": "A String", # [Output Only] A human-readable description of the warning code.
240 "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.
241 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
242 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700243 {
244 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700245 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -0700246 },
247 ],
248 },
249 "instanceGroupManagers": [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700250 { # Represents a Managed Instance Group resource.
251 #
252 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
253 #
254 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
255 #
256 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
257 "status": { # [Output Only] The status of this managed instance group.
258 "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.
259 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800260 "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.
261 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
Takashi Matsuo06694102015-09-11 13:55:40 -0700262 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700263 "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.
264 #
265 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700266 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700267 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800268 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700269 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700270 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700271 "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.
272 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800273 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700274 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700275 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
276 #
277 # 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.
278 {
279 "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:
280 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
281 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
282 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
283 #
284 #
285 # - If the value is fixed, then the calculated value is equal to the fixed value.
286 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
287 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
288 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
289 },
290 "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.
291 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
292 },
293 ],
294 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
295 {
296 "healthCheck": "A String", # The URL for the health check that signals autohealing.
297 "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].
298 },
299 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700300 "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700301 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800302 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700303 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700304 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
305 "zones": [ # Zones where the regional managed instance group will create and manage instances.
306 {
307 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
308 },
309 ],
310 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800311 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700312 "A String",
313 ],
314 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700315 "updatePolicy": { # The update policy for this managed instance group.
316 "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).
317 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
318 #
319 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
320 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
321 #
322 #
323 # - If the value is fixed, then the calculated value is equal to the fixed value.
324 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
325 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
326 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
327 },
328 "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.
329 "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:
330 #
331 #
332 # - The instance's status is RUNNING.
333 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
334 #
335 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
336 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
337 #
338 #
339 # - If the value is fixed, then the calculated value is equal to the fixed value.
340 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
341 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
342 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
343 },
344 },
345 "fingerprint": "A String", # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.
346 #
347 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
Takashi Matsuo06694102015-09-11 13:55:40 -0700348 "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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800349 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
350 { # The named port. For example: .
351 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
352 "port": 42, # The port number, which can be a value between 1 and 65535.
353 },
354 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700355 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800356 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
357 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700358 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
359 },
360 ],
361 },
362 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700363 "warning": { # [Output Only] Informational warning message.
364 "message": "A String", # [Output Only] A human-readable description of the warning code.
365 "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.
366 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
367 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
368 {
369 "value": "A String", # [Output Only] A warning data value corresponding to the key.
370 "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).
371 },
372 ],
373 },
374 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
375 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700376 }</pre>
377</div>
378
379<div class="method">
380 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
381 <pre>Retrieves the next page of results.
382
383Args:
384 previous_request: The request for the previous page. (required)
385 previous_response: The response from the request for the previous page. (required)
386
387Returns:
388 A request object that you can call 'execute()' on to request the next
389 page. Returns None if there are no more items in the collection.
390 </pre>
391</div>
392
393<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700394 <code class="details" id="delete">delete(project, zone, instanceGroupManager, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800395 <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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700396
397Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800398 project: string, Project ID for this request. (required)
399 zone: string, The name of the zone where the managed instance group is located. (required)
400 instanceGroupManager: string, The name of the managed instance group to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 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.
402
403For 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.
404
405The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700406
407Returns:
408 An object of the form:
409
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700410 { # Represents an Operation resource.
411 #
412 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
413 #
414 # Operations can be global, regional or zonal.
415 # - For global operations, use the globalOperations resource.
416 # - For regional operations, use the regionOperations resource.
417 # - For zonal operations, use the zonalOperations resource.
418 #
419 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800420 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700421 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400422 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800423 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700424 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800425 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
426 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700427 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800428 "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.
429 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700430 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800431 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
432 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700433 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
434 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800435 "message": "A String", # [Output Only] A human-readable description of the warning code.
436 "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.
437 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
438 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700439 {
440 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700441 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -0700442 },
443 ],
444 },
445 ],
446 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800447 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
448 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700449 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700450 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700451 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
452 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
453 {
454 "message": "A String", # [Output Only] An optional, human-readable error message.
455 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700456 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700457 },
458 ],
459 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800460 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700461 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800462 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700463 }</pre>
464</div>
465
466<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700467 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body, requestId=None)</code>
468 <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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700469
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400470If 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.
471
472You can specify a maximum of 1000 instances with this method per request.
473
Takashi Matsuo06694102015-09-11 13:55:40 -0700474Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800475 project: string, Project ID for this request. (required)
476 zone: string, The name of the zone where the managed instance group is located. (required)
477 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700478 body: object, The request body. (required)
479 The object takes the form of:
480
481{
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400482 "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].
Takashi Matsuo06694102015-09-11 13:55:40 -0700483 "A String",
484 ],
485 }
486
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700487 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.
488
489For 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.
490
491The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700492
493Returns:
494 An object of the form:
495
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700496 { # Represents an Operation resource.
497 #
498 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
499 #
500 # Operations can be global, regional or zonal.
501 # - For global operations, use the globalOperations resource.
502 # - For regional operations, use the regionOperations resource.
503 # - For zonal operations, use the zonalOperations resource.
504 #
505 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800506 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700507 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400508 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800509 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700510 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800511 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
512 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700513 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800514 "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.
515 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700516 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800517 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
518 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700519 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
520 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800521 "message": "A String", # [Output Only] A human-readable description of the warning code.
522 "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.
523 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
524 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700525 {
526 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700527 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -0700528 },
529 ],
530 },
531 ],
532 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800533 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
534 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700535 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700536 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700537 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
538 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
539 {
540 "message": "A String", # [Output Only] An optional, human-readable error message.
541 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700542 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700543 },
544 ],
545 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800546 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700547 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800548 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700549 }</pre>
550</div>
551
552<div class="method">
553 <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700554 <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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700555
556Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800557 project: string, Project ID for this request. (required)
558 zone: string, The name of the zone where the managed instance group is located. (required)
559 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700560
561Returns:
562 An object of the form:
563
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700564 { # Represents a Managed Instance Group resource.
565 #
566 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
567 #
568 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
569 #
570 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
571 "status": { # [Output Only] The status of this managed instance group.
572 "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.
573 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800574 "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.
575 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
Takashi Matsuo06694102015-09-11 13:55:40 -0700576 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700577 "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.
578 #
579 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700580 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700581 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800582 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700583 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700584 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700585 "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.
586 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800587 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700588 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700589 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
590 #
591 # 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.
592 {
593 "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:
594 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
595 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
596 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
597 #
598 #
599 # - If the value is fixed, then the calculated value is equal to the fixed value.
600 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
601 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
602 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
603 },
604 "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.
605 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
606 },
607 ],
608 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
609 {
610 "healthCheck": "A String", # The URL for the health check that signals autohealing.
611 "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].
612 },
613 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700614 "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700615 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800616 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700617 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700618 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
619 "zones": [ # Zones where the regional managed instance group will create and manage instances.
620 {
621 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
622 },
623 ],
624 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800625 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700626 "A String",
627 ],
628 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700629 "updatePolicy": { # The update policy for this managed instance group.
630 "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).
631 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
632 #
633 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
634 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
635 #
636 #
637 # - If the value is fixed, then the calculated value is equal to the fixed value.
638 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
639 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
640 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
641 },
642 "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.
643 "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:
644 #
645 #
646 # - The instance's status is RUNNING.
647 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
648 #
649 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
650 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
651 #
652 #
653 # - If the value is fixed, then the calculated value is equal to the fixed value.
654 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
655 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
656 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
657 },
658 },
659 "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.
660 #
661 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
Takashi Matsuo06694102015-09-11 13:55:40 -0700662 "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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800663 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
664 { # The named port. For example: .
665 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
666 "port": 42, # The port number, which can be a value between 1 and 65535.
667 },
668 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700669 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800670 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
671 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700672 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
673 }</pre>
674</div>
675
676<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700677 <code class="details" id="insert">insert(project, zone, body, requestId=None)</code>
678 <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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700679
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400680A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
681
Takashi Matsuo06694102015-09-11 13:55:40 -0700682Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800683 project: string, Project ID for this request. (required)
684 zone: string, The name of the zone where you want to create the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700685 body: object, The request body. (required)
686 The object takes the form of:
687
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700688{ # Represents a Managed Instance Group resource.
689 #
690 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
691 #
692 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
693 #
694 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
695 "status": { # [Output Only] The status of this managed instance group.
696 "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.
697 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800698 "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.
699 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
Takashi Matsuo06694102015-09-11 13:55:40 -0700700 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700701 "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.
702 #
703 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700704 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700705 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800706 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700707 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700708 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700709 "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.
710 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800711 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700712 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
714 #
715 # 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.
716 {
717 "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:
718 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
719 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
720 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
721 #
722 #
723 # - If the value is fixed, then the calculated value is equal to the fixed value.
724 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
725 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
726 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
727 },
728 "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.
729 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
730 },
731 ],
732 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
733 {
734 "healthCheck": "A String", # The URL for the health check that signals autohealing.
735 "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].
736 },
737 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700738 "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700739 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800740 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700741 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700742 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
743 "zones": [ # Zones where the regional managed instance group will create and manage instances.
744 {
745 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
746 },
747 ],
748 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800749 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700750 "A String",
751 ],
752 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700753 "updatePolicy": { # The update policy for this managed instance group.
754 "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).
755 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
756 #
757 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
758 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
759 #
760 #
761 # - If the value is fixed, then the calculated value is equal to the fixed value.
762 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
763 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
764 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
765 },
766 "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.
767 "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:
768 #
769 #
770 # - The instance's status is RUNNING.
771 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
772 #
773 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
774 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
775 #
776 #
777 # - If the value is fixed, then the calculated value is equal to the fixed value.
778 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
779 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
780 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
781 },
782 },
783 "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.
784 #
785 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
Takashi Matsuo06694102015-09-11 13:55:40 -0700786 "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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800787 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
788 { # The named port. For example: .
789 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
790 "port": 42, # The port number, which can be a value between 1 and 65535.
791 },
792 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700793 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800794 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
795 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700796 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
797 }
798
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700799 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.
800
801For 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.
802
803The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700804
805Returns:
806 An object of the form:
807
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700808 { # Represents an Operation resource.
809 #
810 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
811 #
812 # Operations can be global, regional or zonal.
813 # - For global operations, use the globalOperations resource.
814 # - For regional operations, use the regionOperations resource.
815 # - For zonal operations, use the zonalOperations resource.
816 #
817 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800818 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700819 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400820 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800821 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700822 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800823 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
824 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700825 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800826 "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.
827 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700828 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800829 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
830 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700831 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
832 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800833 "message": "A String", # [Output Only] A human-readable description of the warning code.
834 "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.
835 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
836 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700837 {
838 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700839 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -0700840 },
841 ],
842 },
843 ],
844 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800845 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
846 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700847 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700848 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700849 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
850 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
851 {
852 "message": "A String", # [Output Only] An optional, human-readable error message.
853 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700854 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700855 },
856 ],
857 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800858 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700859 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800860 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700861 }</pre>
862</div>
863
864<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700865 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700866 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
867
868Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800869 project: string, Project ID for this request. (required)
870 zone: string, The name of the zone where the managed instance group is located. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700871 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
872
873You 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.
874
875Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400876 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)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800877 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700878 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
Takashi Matsuo06694102015-09-11 13:55:40 -0700879
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700880For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700881
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700882You 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800883
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700884To 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).
Takashi Matsuo06694102015-09-11 13:55:40 -0700885
886Returns:
887 An object of the form:
888
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800889 { # [Output Only] A list of managed instance groups.
890 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700891 "kind": "compute#instanceGroupManagerList", # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
892 "items": [ # A list of InstanceGroupManager resources.
893 { # Represents a Managed Instance Group resource.
894 #
895 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
896 #
897 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
898 #
899 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
900 "status": { # [Output Only] The status of this managed instance group.
901 "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.
902 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800903 "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.
904 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
Takashi Matsuo06694102015-09-11 13:55:40 -0700905 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700906 "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.
907 #
908 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700909 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700910 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800911 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700912 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700913 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700914 "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.
915 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800916 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700917 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700918 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
919 #
920 # 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.
921 {
922 "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:
923 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
924 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
925 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
926 #
927 #
928 # - If the value is fixed, then the calculated value is equal to the fixed value.
929 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
930 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
931 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
932 },
933 "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.
934 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
935 },
936 ],
937 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
938 {
939 "healthCheck": "A String", # The URL for the health check that signals autohealing.
940 "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].
941 },
942 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700943 "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700944 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800945 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700946 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700947 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
948 "zones": [ # Zones where the regional managed instance group will create and manage instances.
949 {
950 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
951 },
952 ],
953 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800954 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700955 "A String",
956 ],
957 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700958 "updatePolicy": { # The update policy for this managed instance group.
959 "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).
960 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
961 #
962 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
963 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
964 #
965 #
966 # - If the value is fixed, then the calculated value is equal to the fixed value.
967 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
968 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
969 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
970 },
971 "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.
972 "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:
973 #
974 #
975 # - The instance's status is RUNNING.
976 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
977 #
978 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
979 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
980 #
981 #
982 # - If the value is fixed, then the calculated value is equal to the fixed value.
983 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
984 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
985 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
986 },
987 },
988 "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.
989 #
990 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
Takashi Matsuo06694102015-09-11 13:55:40 -0700991 "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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800992 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
993 { # The named port. For example: .
994 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
995 "port": 42, # The port number, which can be a value between 1 and 65535.
996 },
997 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700998 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800999 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1000 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -07001001 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1002 },
1003 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001004 "warning": { # [Output Only] Informational warning message.
1005 "message": "A String", # [Output Only] A human-readable description of the warning code.
1006 "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.
1007 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1008 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1009 {
1010 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1011 "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).
1012 },
1013 ],
1014 },
1015 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001016 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Takashi Matsuo06694102015-09-11 13:55:40 -07001017 }</pre>
1018</div>
1019
1020<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001021 <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001022 <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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001023
1024Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001025 project: string, Project ID for this request. (required)
1026 zone: string, The name of the zone where the managed instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001027 instanceGroupManager: string, The name of the managed instance group. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001028 order_by: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1029
1030You 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.
1031
1032Currently, only sorting by name or creationTimestamp desc is supported.
1033 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)
1034 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.
1035 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
1036
1037For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
1038
1039You 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.
1040
1041To 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).
Takashi Matsuo06694102015-09-11 13:55:40 -07001042
1043Returns:
1044 An object of the form:
1045
1046 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001047 "managedInstances": [ # [Output Only] The list of instances in the managed instance group.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001048 { # A Managed Instance resource.
1049 "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001050 "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance.
1051 "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
Takashi Matsuo06694102015-09-11 13:55:40 -07001052 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1053 {
1054 "message": "A String", # [Output Only] An optional, human-readable error message.
1055 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001056 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -07001057 },
1058 ],
1059 },
1060 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001061 "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
1062 "version": { # [Output Only] Intended version of this instance.
1063 "instanceTemplate": "A String", # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }.
1064 "name": "A String", # [Output Only] Name of the version.
1065 },
1066 "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
1067 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
1068 # - 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.
1069 # - 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.
1070 # - RECREATING The managed instance group is recreating this instance.
1071 # - DELETING The managed instance group is permanently deleting this instance.
1072 # - 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.
1073 # - RESTARTING The managed instance group is restarting the instance.
1074 # - 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.
1075 # - VERIFYING The managed instance group has created the instance and it is in the process of being verified.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001076 "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
Takashi Matsuo06694102015-09-11 13:55:40 -07001077 },
1078 ],
1079 }</pre>
1080</div>
1081
1082<div class="method">
1083 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1084 <pre>Retrieves the next page of results.
1085
1086Args:
1087 previous_request: The request for the previous page. (required)
1088 previous_response: The response from the request for the previous page. (required)
1089
1090Returns:
1091 A request object that you can call 'execute()' on to request the next
1092 page. Returns None if there are no more items in the collection.
1093 </pre>
1094</div>
1095
1096<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001097 <code class="details" id="patch">patch(project, zone, instanceGroupManager, body, requestId=None)</code>
1098 <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.
1099
1100Args:
1101 project: string, Project ID for this request. (required)
1102 zone: string, The name of the zone where you want to create the managed instance group. (required)
1103 instanceGroupManager: string, The name of the instance group manager. (required)
1104 body: object, The request body. (required)
1105 The object takes the form of:
1106
1107{ # Represents a Managed Instance Group resource.
1108 #
1109 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1110 #
1111 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1112 #
1113 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)
1114 "status": { # [Output Only] The status of this managed instance group.
1115 "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.
1116 },
1117 "currentActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
1118 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1119 "recreating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
1120 "creating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
1121 #
1122 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1123 "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
1124 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1125 "abandoning": 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
1126 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1127 "creatingWithoutRetries": 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.
1128 "refreshing": 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
1129 },
1130 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1131 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
1132 "versions": [ # Specifies the instance templates used by this managed instance group to create instances.
1133 #
1134 # 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.
1135 {
1136 "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:
1137 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1138 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
1139 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1140 #
1141 #
1142 # - If the value is fixed, then the calculated value is equal to the fixed value.
1143 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1144 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1145 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1146 },
1147 "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached.
1148 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group.
1149 },
1150 ],
1151 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
1152 {
1153 "healthCheck": "A String", # The URL for the health check that signals autohealing.
1154 "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].
1155 },
1156 ],
1157 "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
1158 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1159 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
1160 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1161 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group.
1162 "zones": [ # Zones where the regional managed instance group will create and manage instances.
1163 {
1164 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located.
1165 },
1166 ],
1167 },
1168 "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.
1169 "A String",
1170 ],
1171 "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.
1172 "updatePolicy": { # The update policy for this managed instance group.
1173 "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).
1174 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1175 #
1176 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1177 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1178 #
1179 #
1180 # - If the value is fixed, then the calculated value is equal to the fixed value.
1181 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1182 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1183 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1184 },
1185 "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.
1186 "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:
1187 #
1188 #
1189 # - The instance's status is RUNNING.
1190 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1191 #
1192 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1193 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1194 #
1195 #
1196 # - If the value is fixed, then the calculated value is equal to the fixed value.
1197 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1198 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1199 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1200 },
1201 },
1202 "fingerprint": "A String", # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.
1203 #
1204 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1205 "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.
1206 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1207 { # The named port. For example: .
1208 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1209 "port": 42, # The port number, which can be a value between 1 and 65535.
1210 },
1211 ],
1212 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1213 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1214 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
1215 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1216 }
1217
1218 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.
1219
1220For 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.
1221
1222The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1223
1224Returns:
1225 An object of the form:
1226
1227 { # Represents an Operation resource.
1228 #
1229 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1230 #
1231 # Operations can be global, regional or zonal.
1232 # - For global operations, use the globalOperations resource.
1233 # - For regional operations, use the regionOperations resource.
1234 # - For zonal operations, use the zonalOperations resource.
1235 #
1236 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
1237 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1238 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1239 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1240 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1241 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1242 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1243 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1244 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1245 "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.
1246 "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.
1247 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1248 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1249 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1250 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1251 {
1252 "message": "A String", # [Output Only] A human-readable description of the warning code.
1253 "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.
1254 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1255 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1256 {
1257 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1258 "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).
1259 },
1260 ],
1261 },
1262 ],
1263 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1264 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1265 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1266 "name": "A String", # [Output Only] Name of the resource.
1267 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1268 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1269 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1270 {
1271 "message": "A String", # [Output Only] An optional, human-readable error message.
1272 "code": "A String", # [Output Only] The error type identifier for this error.
1273 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1274 },
1275 ],
1276 },
1277 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1278 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1279 "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.
1280 }</pre>
1281</div>
1282
1283<div class="method">
1284 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body, requestId=None)</code>
1285 <pre>Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.
Takashi Matsuo06694102015-09-11 13:55:40 -07001286
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001287If 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.
1288
1289You can specify a maximum of 1000 instances with this method per request.
1290
Takashi Matsuo06694102015-09-11 13:55:40 -07001291Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001292 project: string, Project ID for this request. (required)
1293 zone: string, The name of the zone where the managed instance group is located. (required)
1294 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001295 body: object, The request body. (required)
1296 The object takes the form of:
1297
1298{
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001299 "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].
Takashi Matsuo06694102015-09-11 13:55:40 -07001300 "A String",
1301 ],
1302 }
1303
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001304 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.
1305
1306For 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.
1307
1308The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -07001309
1310Returns:
1311 An object of the form:
1312
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001313 { # Represents an Operation resource.
1314 #
1315 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1316 #
1317 # Operations can be global, regional or zonal.
1318 # - For global operations, use the globalOperations resource.
1319 # - For regional operations, use the regionOperations resource.
1320 # - For zonal operations, use the zonalOperations resource.
1321 #
1322 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001323 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001324 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001325 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001326 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001327 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001328 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1329 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -07001330 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001331 "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.
1332 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001333 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001334 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1335 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -07001336 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1337 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001338 "message": "A String", # [Output Only] A human-readable description of the warning code.
1339 "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.
1340 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1341 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -07001342 {
1343 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001344 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -07001345 },
1346 ],
1347 },
1348 ],
1349 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001350 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1351 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -07001352 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001353 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -07001354 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1355 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1356 {
1357 "message": "A String", # [Output Only] An optional, human-readable error message.
1358 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001359 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -07001360 },
1361 ],
1362 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001363 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001364 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001365 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001366 }</pre>
1367</div>
1368
1369<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001370 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001371 <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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001372
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001373When 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:
1374
1375+ 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.
1376
1377This list is subject to change.
1378
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001379If 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.
1380
Takashi Matsuo06694102015-09-11 13:55:40 -07001381Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001382 project: string, Project ID for this request. (required)
1383 zone: string, The name of the zone where the managed instance group is located. (required)
1384 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001385 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)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001386 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.
1387
1388For 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.
1389
1390The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -07001391
1392Returns:
1393 An object of the form:
1394
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001395 { # Represents an Operation resource.
1396 #
1397 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1398 #
1399 # Operations can be global, regional or zonal.
1400 # - For global operations, use the globalOperations resource.
1401 # - For regional operations, use the regionOperations resource.
1402 # - For zonal operations, use the zonalOperations resource.
1403 #
1404 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001405 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001406 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001407 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001408 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001409 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001410 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1411 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -07001412 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001413 "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.
1414 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001415 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001416 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1417 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -07001418 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1419 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001420 "message": "A String", # [Output Only] A human-readable description of the warning code.
1421 "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.
1422 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1423 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -07001424 {
1425 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001426 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -07001427 },
1428 ],
1429 },
1430 ],
1431 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001432 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1433 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -07001434 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001435 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -07001436 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1437 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1438 {
1439 "message": "A String", # [Output Only] An optional, human-readable error message.
1440 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001441 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -07001442 },
1443 ],
1444 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001445 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001446 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001447 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001448 }</pre>
1449</div>
1450
1451<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001452 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body, requestId=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -07001453 <pre>Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.
1454
1455Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001456 project: string, Project ID for this request. (required)
1457 zone: string, The name of the zone where the managed instance group is located. (required)
1458 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001459 body: object, The request body. (required)
1460 The object takes the form of:
1461
1462{
1463 "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.
1464 }
1465
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001466 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.
1467
1468For 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.
1469
1470The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -07001471
1472Returns:
1473 An object of the form:
1474
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001475 { # Represents an Operation resource.
1476 #
1477 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1478 #
1479 # Operations can be global, regional or zonal.
1480 # - For global operations, use the globalOperations resource.
1481 # - For regional operations, use the regionOperations resource.
1482 # - For zonal operations, use the zonalOperations resource.
1483 #
1484 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001485 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001486 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001487 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001488 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001489 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001490 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1491 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -07001492 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001493 "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.
1494 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001495 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001496 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1497 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -07001498 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1499 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001500 "message": "A String", # [Output Only] A human-readable description of the warning code.
1501 "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.
1502 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1503 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -07001504 {
1505 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001506 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -07001507 },
1508 ],
1509 },
1510 ],
1511 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001512 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1513 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -07001514 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001515 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -07001516 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1517 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1518 {
1519 "message": "A String", # [Output Only] An optional, human-readable error message.
1520 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001521 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -07001522 },
1523 ],
1524 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001525 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001526 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001527 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001528 }</pre>
1529</div>
1530
1531<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001532 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001533 <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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001534
1535Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001536 project: string, Project ID for this request. (required)
1537 zone: string, The name of the zone where the managed instance group is located. (required)
1538 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001539 body: object, The request body. (required)
1540 The object takes the form of:
1541
1542{
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001543 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001544 "A String",
1545 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001546 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001547 }
1548
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001549 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.
1550
1551For 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.
1552
1553The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -07001554
1555Returns:
1556 An object of the form:
1557
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001558 { # Represents an Operation resource.
1559 #
1560 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1561 #
1562 # Operations can be global, regional or zonal.
1563 # - For global operations, use the globalOperations resource.
1564 # - For regional operations, use the regionOperations resource.
1565 # - For zonal operations, use the zonalOperations resource.
1566 #
1567 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001568 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001569 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001570 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001571 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001572 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001573 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1574 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -07001575 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001576 "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.
1577 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001578 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001579 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1580 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -07001581 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1582 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001583 "message": "A String", # [Output Only] A human-readable description of the warning code.
1584 "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.
1585 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1586 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -07001587 {
1588 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001589 "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).
Takashi Matsuo06694102015-09-11 13:55:40 -07001590 },
1591 ],
1592 },
1593 ],
1594 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001595 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1596 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -07001597 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001598 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -07001599 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1600 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1601 {
1602 "message": "A String", # [Output Only] An optional, human-readable error message.
1603 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001604 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -07001605 },
1606 ],
1607 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001608 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001609 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001610 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001611 }</pre>
1612</div>
1613
1614</body></html>