blob: 0c8141d789f8d411edb537deeb47f01956216ed6 [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">
78 <code><a href="#abandonInstances">abandonInstances(project, zone, instanceGroupManager, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080079<p class="firstline">Schedules a group action to remove the specified instances 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">
87 <code><a href="#delete">delete(project, zone, instanceGroupManager)</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">
90 <code><a href="#deleteInstances">deleteInstances(project, zone, instanceGroupManager, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080091<p class="firstline">Schedules a group action to delete the specified instances in the managed instance group. 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>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070094<p class="firstline">Returns all of the details about the specified managed instance group. Get 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">
96 <code><a href="#insert">insert(project, zone, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080097<p class="firstline">Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group 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">
108 <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800109<p class="firstline">Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700110<p class="toc_element">
111 <code><a href="#resize">resize(project, zone, instanceGroupManager, size)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800112<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 -0700113<p class="toc_element">
114 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body)</a></code></p>
115<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>
116<p class="toc_element">
117 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800118<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 -0700119<h3>Method Details</h3>
120<div class="method">
121 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800122 <pre>Schedules a group action to remove the specified instances 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 -0700123
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400124If 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.
125
126You can specify a maximum of 1000 instances with this method per request.
127
Takashi Matsuo06694102015-09-11 13:55:40 -0700128Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800129 project: string, Project ID for this request. (required)
130 zone: string, The name of the zone where the managed instance group is located. (required)
131 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700132 body: object, The request body. (required)
133 The object takes the form of:
134
135{
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400136 "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 -0700137 "A String",
138 ],
139 }
140
141
142Returns:
143 An object of the form:
144
145 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800146 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
147 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400148 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800149 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
150 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
151 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
152 "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 -0700153 "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 -0800154 "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.
155 "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 -0700156 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800157 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
158 "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 -0700159 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
160 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800161 "message": "A String", # [Output Only] A human-readable description of the warning code.
162 "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.
163 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
164 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700165 {
166 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700167 "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 -0700168 },
169 ],
170 },
171 ],
172 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800173 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
174 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700175 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800176 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700177 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
178 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
179 {
180 "message": "A String", # [Output Only] An optional, human-readable error message.
181 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700182 "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 -0700183 },
184 ],
185 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800186 "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 -0700187 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800188 "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 -0700189 }</pre>
190</div>
191
192<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700193 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800194 <pre>Retrieves the list of managed instance groups and groups them by zone.
Takashi Matsuo06694102015-09-11 13:55:40 -0700195
196Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800197 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700198 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
199
200You 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.
201
202Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400203 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 -0800204 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.
205 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
Takashi Matsuo06694102015-09-11 13:55:40 -0700206
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800207The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
Takashi Matsuo06694102015-09-11 13:55:40 -0700208
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700209For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800210
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700211You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800212
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700213To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700214
215Returns:
216 An object of the form:
217
218 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800219 "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.
220 "items": { # [Output Only] A map of filtered managed instance group lists.
221 "a_key": { # [Output Only] The name of the scope that contains this set of managed instance groups.
Takashi Matsuo06694102015-09-11 13:55:40 -0700222 "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 -0800223 "message": "A String", # [Output Only] A human-readable description of the warning code.
224 "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.
225 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
226 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700227 {
228 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700229 "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 -0700230 },
231 ],
232 },
233 "instanceGroupManagers": [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700234 { # An Instance Group Manager resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800235 "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.
236 "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 -0700237 "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 -0700238 "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.
239 #
240 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Takashi Matsuo06694102015-09-11 13:55:40 -0700241 "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 -0800242 "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 -0700243 "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 -0700244 "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 -0700245 "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.
246 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800247 "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 -0700248 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Takashi Matsuo06694102015-09-11 13:55:40 -0700249 "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 -0700250 "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 -0800251 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700252 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800253 "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 -0700254 "A String",
255 ],
256 "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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700257 "fingerprint": "A String", # [Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700258 "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 -0800259 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
260 { # The named port. For example: .
261 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
262 "port": 42, # The port number, which can be a value between 1 and 65535.
263 },
264 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700265 "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 -0800266 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
267 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700268 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
269 },
270 ],
271 },
272 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800273 "kind": "compute#instanceGroupManagerAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups.
274 "id": "A String", # [Output Only] A unique identifier for this aggregated list of managed instance groups. The server generates this identifier.
275 "selfLink": "A String", # [Output Only] The URL for this resource type. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700276 }</pre>
277</div>
278
279<div class="method">
280 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
281 <pre>Retrieves the next page of results.
282
283Args:
284 previous_request: The request for the previous page. (required)
285 previous_response: The response from the request for the previous page. (required)
286
287Returns:
288 A request object that you can call 'execute()' on to request the next
289 page. Returns None if there are no more items in the collection.
290 </pre>
291</div>
292
293<div class="method">
294 <code class="details" id="delete">delete(project, zone, instanceGroupManager)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800295 <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 -0700296
297Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800298 project: string, Project ID for this request. (required)
299 zone: string, The name of the zone where the managed instance group is located. (required)
300 instanceGroupManager: string, The name of the managed instance group to delete. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700301
302Returns:
303 An object of the form:
304
305 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800306 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
307 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400308 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800309 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
310 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
311 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
312 "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 -0700313 "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 -0800314 "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.
315 "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 -0700316 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800317 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
318 "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 -0700319 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
320 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800321 "message": "A String", # [Output Only] A human-readable description of the warning code.
322 "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.
323 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
324 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700325 {
326 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700327 "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 -0700328 },
329 ],
330 },
331 ],
332 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800333 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
334 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700335 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800336 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700337 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
338 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
339 {
340 "message": "A String", # [Output Only] An optional, human-readable error message.
341 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700342 "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 -0700343 },
344 ],
345 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800346 "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 -0700347 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800348 "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 -0700349 }</pre>
350</div>
351
352<div class="method">
353 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800354 <pre>Schedules a group action to delete the specified instances in the managed instance group. 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 -0700355
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400356If 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.
357
358You can specify a maximum of 1000 instances with this method per request.
359
Takashi Matsuo06694102015-09-11 13:55:40 -0700360Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800361 project: string, Project ID for this request. (required)
362 zone: string, The name of the zone where the managed instance group is located. (required)
363 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700364 body: object, The request body. (required)
365 The object takes the form of:
366
367{
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400368 "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 -0700369 "A String",
370 ],
371 }
372
373
374Returns:
375 An object of the form:
376
377 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800378 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
379 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400380 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800381 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
382 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
383 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
384 "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 -0700385 "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 -0800386 "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.
387 "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 -0700388 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800389 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
390 "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 -0700391 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
392 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800393 "message": "A String", # [Output Only] A human-readable description of the warning code.
394 "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.
395 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
396 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700397 {
398 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700399 "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 -0700400 },
401 ],
402 },
403 ],
404 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800405 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
406 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700407 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800408 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700409 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
410 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
411 {
412 "message": "A String", # [Output Only] An optional, human-readable error message.
413 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700414 "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 -0700415 },
416 ],
417 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800418 "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 -0700419 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800420 "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 -0700421 }</pre>
422</div>
423
424<div class="method">
425 <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700426 <pre>Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700427
428Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800429 project: string, Project ID for this request. (required)
430 zone: string, The name of the zone where the managed instance group is located. (required)
431 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700432
433Returns:
434 An object of the form:
435
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700436 { # An Instance Group Manager resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800437 "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.
438 "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 -0700439 "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 -0700440 "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.
441 #
442 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Takashi Matsuo06694102015-09-11 13:55:40 -0700443 "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 -0800444 "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 -0700445 "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 -0700446 "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 -0700447 "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.
448 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800449 "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 -0700450 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Takashi Matsuo06694102015-09-11 13:55:40 -0700451 "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 -0700452 "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 -0800453 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700454 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800455 "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 -0700456 "A String",
457 ],
458 "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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700459 "fingerprint": "A String", # [Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700460 "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 -0800461 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
462 { # The named port. For example: .
463 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
464 "port": 42, # The port number, which can be a value between 1 and 65535.
465 },
466 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700467 "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 -0800468 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
469 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700470 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
471 }</pre>
472</div>
473
474<div class="method">
475 <code class="details" id="insert">insert(project, zone, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800476 <pre>Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group 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 -0700477
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400478A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
479
Takashi Matsuo06694102015-09-11 13:55:40 -0700480Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800481 project: string, Project ID for this request. (required)
482 zone: string, The name of the zone where you want to create the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700483 body: object, The request body. (required)
484 The object takes the form of:
485
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700486{ # An Instance Group Manager resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800487 "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.
488 "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 -0700489 "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 -0700490 "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.
491 #
492 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Takashi Matsuo06694102015-09-11 13:55:40 -0700493 "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 -0800494 "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 -0700495 "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 -0700496 "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 -0700497 "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.
498 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800499 "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 -0700500 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Takashi Matsuo06694102015-09-11 13:55:40 -0700501 "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 -0700502 "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 -0800503 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700504 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800505 "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 -0700506 "A String",
507 ],
508 "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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700509 "fingerprint": "A String", # [Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700510 "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 -0800511 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
512 { # The named port. For example: .
513 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
514 "port": 42, # The port number, which can be a value between 1 and 65535.
515 },
516 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700517 "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 -0800518 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
519 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700520 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
521 }
522
523
524Returns:
525 An object of the form:
526
527 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800528 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
529 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400530 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800531 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
532 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
533 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
534 "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 -0700535 "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 -0800536 "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.
537 "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 -0700538 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800539 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
540 "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 -0700541 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
542 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800543 "message": "A String", # [Output Only] A human-readable description of the warning code.
544 "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.
545 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
546 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700547 {
548 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700549 "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 -0700550 },
551 ],
552 },
553 ],
554 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800555 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
556 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700557 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800558 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700559 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
560 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
561 {
562 "message": "A String", # [Output Only] An optional, human-readable error message.
563 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700564 "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 -0700565 },
566 ],
567 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800568 "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 -0700569 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800570 "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 -0700571 }</pre>
572</div>
573
574<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700575 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700576 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
577
578Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800579 project: string, Project ID for this request. (required)
580 zone: string, The name of the zone where the managed instance group is located. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700581 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
582
583You 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.
584
585Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400586 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 -0800587 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.
588 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
Takashi Matsuo06694102015-09-11 13:55:40 -0700589
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800590The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
Takashi Matsuo06694102015-09-11 13:55:40 -0700591
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700592For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800593
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700594You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800595
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700596To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700597
598Returns:
599 An object of the form:
600
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800601 { # [Output Only] A list of managed instance groups.
602 "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.
603 "items": [ # [Output Only] A list of managed instance groups.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700604 { # An Instance Group Manager resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800605 "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.
606 "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 -0700607 "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 -0700608 "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.
609 #
610 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Takashi Matsuo06694102015-09-11 13:55:40 -0700611 "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 -0800612 "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 -0700613 "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 -0700614 "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 -0700615 "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.
616 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800617 "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 -0700618 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Takashi Matsuo06694102015-09-11 13:55:40 -0700619 "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 -0700620 "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 -0800621 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700622 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800623 "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 -0700624 "A String",
625 ],
626 "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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700627 "fingerprint": "A String", # [Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700628 "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 -0800629 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
630 { # The named port. For example: .
631 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
632 "port": 42, # The port number, which can be a value between 1 and 65535.
633 },
634 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700635 "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 -0800636 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
637 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700638 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
639 },
640 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800641 "kind": "compute#instanceGroupManagerList", # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
642 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700643 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700644 }</pre>
645</div>
646
647<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800648 <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 -0800649 <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 -0700650
651Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800652 project: string, Project ID for this request. (required)
653 zone: string, The name of the zone where the managed instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700654 instanceGroupManager: string, The name of the managed instance group. (required)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800655 order_by: string, A parameter
656 maxResults: integer, A parameter
657 pageToken: string, A parameter
658 filter: string, A parameter
Takashi Matsuo06694102015-09-11 13:55:40 -0700659
660Returns:
661 An object of the form:
662
663 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800664 "managedInstances": [ # [Output Only] The list of instances in the managed instance group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700665 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800666 "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
667 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
668 # - 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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700669 # - 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800670 # - RECREATING The managed instance group is recreating this instance.
671 # - DELETING The managed instance group is permanently deleting this instance.
672 # - 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.
673 # - RESTARTING The managed instance group is restarting the instance.
674 # - 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.
675 "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
676 "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance.
677 "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700678 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
679 {
680 "message": "A String", # [Output Only] An optional, human-readable error message.
681 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700682 "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 -0700683 },
684 ],
685 },
686 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800687 "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
688 "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist.
Takashi Matsuo06694102015-09-11 13:55:40 -0700689 },
690 ],
691 }</pre>
692</div>
693
694<div class="method">
695 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
696 <pre>Retrieves the next page of results.
697
698Args:
699 previous_request: The request for the previous page. (required)
700 previous_response: The response from the request for the previous page. (required)
701
702Returns:
703 A request object that you can call 'execute()' on to request the next
704 page. Returns None if there are no more items in the collection.
705 </pre>
706</div>
707
708<div class="method">
709 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800710 <pre>Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled 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 -0700711
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400712If 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.
713
714You can specify a maximum of 1000 instances with this method per request.
715
Takashi Matsuo06694102015-09-11 13:55:40 -0700716Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800717 project: string, Project ID for this request. (required)
718 zone: string, The name of the zone where the managed instance group is located. (required)
719 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700720 body: object, The request body. (required)
721 The object takes the form of:
722
723{
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400724 "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 -0700725 "A String",
726 ],
727 }
728
729
730Returns:
731 An object of the form:
732
733 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800734 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
735 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400736 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800737 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
738 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
739 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
740 "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 -0700741 "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 -0800742 "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.
743 "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 -0700744 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800745 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
746 "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 -0700747 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
748 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800749 "message": "A String", # [Output Only] A human-readable description of the warning code.
750 "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.
751 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
752 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700753 {
754 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700755 "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 -0700756 },
757 ],
758 },
759 ],
760 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800761 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
762 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700763 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800764 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700765 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
766 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
767 {
768 "message": "A String", # [Output Only] An optional, human-readable error message.
769 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700770 "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 -0700771 },
772 ],
773 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800774 "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 -0700775 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800776 "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 -0700777 }</pre>
778</div>
779
780<div class="method">
781 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800782 <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 -0700783
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400784If 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.
785
Takashi Matsuo06694102015-09-11 13:55:40 -0700786Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800787 project: string, Project ID for this request. (required)
788 zone: string, The name of the zone where the managed instance group is located. (required)
789 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700790 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)
791
792Returns:
793 An object of the form:
794
795 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800796 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
797 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400798 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800799 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
800 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
801 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
802 "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 -0700803 "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 -0800804 "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.
805 "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 -0700806 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800807 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
808 "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 -0700809 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
810 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800811 "message": "A String", # [Output Only] A human-readable description of the warning code.
812 "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.
813 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
814 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700815 {
816 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700817 "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 -0700818 },
819 ],
820 },
821 ],
822 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800823 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
824 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700825 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800826 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700827 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
828 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
829 {
830 "message": "A String", # [Output Only] An optional, human-readable error message.
831 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700832 "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 -0700833 },
834 ],
835 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800836 "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 -0700837 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800838 "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 -0700839 }</pre>
840</div>
841
842<div class="method">
843 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body)</code>
844 <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.
845
846Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800847 project: string, Project ID for this request. (required)
848 zone: string, The name of the zone where the managed instance group is located. (required)
849 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700850 body: object, The request body. (required)
851 The object takes the form of:
852
853{
854 "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.
855 }
856
857
858Returns:
859 An object of the form:
860
861 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800862 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
863 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400864 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800865 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
866 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
867 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
868 "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 -0700869 "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 -0800870 "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.
871 "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 -0700872 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800873 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
874 "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 -0700875 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
876 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800877 "message": "A String", # [Output Only] A human-readable description of the warning code.
878 "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.
879 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
880 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700881 {
882 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700883 "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 -0700884 },
885 ],
886 },
887 ],
888 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800889 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
890 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700891 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800892 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700893 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
894 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
895 {
896 "message": "A String", # [Output Only] An optional, human-readable error message.
897 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700898 "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 -0700899 },
900 ],
901 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800902 "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 -0700903 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800904 "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 -0700905 }</pre>
906</div>
907
908<div class="method">
909 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800910 <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 -0700911
912Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800913 project: string, Project ID for this request. (required)
914 zone: string, The name of the zone where the managed instance group is located. (required)
915 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700916 body: object, The request body. (required)
917 The object takes the form of:
918
919{
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800920 "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 -0700921 "A String",
922 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800923 "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 -0700924 }
925
926
927Returns:
928 An object of the form:
929
930 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800931 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
932 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400933 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800934 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
935 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
936 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
937 "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 -0700938 "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 -0800939 "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.
940 "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 -0700941 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800942 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
943 "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 -0700944 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
945 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800946 "message": "A String", # [Output Only] A human-readable description of the warning code.
947 "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.
948 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
949 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700950 {
951 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700952 "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 -0700953 },
954 ],
955 },
956 ],
957 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800958 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
959 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700960 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800961 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700962 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
963 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
964 {
965 "message": "A String", # [Output Only] An optional, human-readable error message.
966 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700967 "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 -0700968 },
969 ],
970 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800971 "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 -0700972 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800973 "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 -0700974 }</pre>
975</div>
976
977</body></html>