blob: 5980cf7704ca0bf991b4e8862e97d99b8e183795 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.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>
79<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>
80<p class="toc_element">
81 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
82<p class="firstline">Retrieves the list of managed instance groups and groups them by zone.</p>
83<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
87 <code><a href="#delete">delete(project, zone, instanceGroupManager)</a></code></p>
88<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>
89<p class="toc_element">
90 <code><a href="#deleteInstances">deleteInstances(project, zone, instanceGroupManager, body)</a></code></p>
91<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>
92<p class="toc_element">
93 <code><a href="#get">get(project, zone, instanceGroupManager)</a></code></p>
94<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>
95<p class="toc_element">
96 <code><a href="#insert">insert(project, zone, body)</a></code></p>
97<p class="firstline">Creates a managed instance group using the information that you specify in the request. After the group is created, 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>
98<p class="toc_element">
99 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
100<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700103<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>
104<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="#patch">patch(project, zone, instanceGroupManager, body)</a></code></p>
109<p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports patch semantics.</p>
110<p class="toc_element">
111 <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body)</a></code></p>
112<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>
113<p class="toc_element">
114 <code><a href="#resize">resize(project, zone, instanceGroupManager, size)</a></code></p>
115<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>
116<p class="toc_element">
117 <code><a href="#resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body)</a></code></p>
118<p class="firstline">Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.</p>
119<p class="toc_element">
120 <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body)</a></code></p>
121<p class="firstline">Modifies the autohealing policies.</p>
122<p class="toc_element">
123 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body)</a></code></p>
124<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>
125<p class="toc_element">
126 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body)</a></code></p>
127<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>
128<p class="toc_element">
129 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p>
130<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
131<p class="toc_element">
132 <code><a href="#update">update(project, zone, instanceGroupManager, body)</a></code></p>
133<p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.</p>
134<h3>Method Details</h3>
135<div class="method">
136 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body)</code>
137 <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.
138
139Args:
140 project: string, Project ID for this request. (required)
141 zone: string, The name of the zone where the managed instance group is located. (required)
142 instanceGroupManager: string, The name of the managed instance group. (required)
143 body: object, The request body. (required)
144 The object takes the form of:
145
146{
147 "instances": [ # The URL for one or more instances to abandon from the managed instance group.
148 "A String",
149 ],
150 }
151
152
153Returns:
154 An object of the form:
155
156 { # An Operation resource, used to manage asynchronous API requests.
157 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
158 "clientOperationId": "A String", # [Output Only] Reserved for future use.
159 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
160 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
161 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
162 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
163 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
164 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
165 "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.
166 "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.
167 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
168 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
169 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
170 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
171 {
172 "message": "A String", # [Output Only] A human-readable description of the warning code.
173 "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.
174 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
175 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
176 {
177 "value": "A String", # [Output Only] A warning data value corresponding to the key.
178 "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).
179 },
180 ],
181 },
182 ],
183 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
184 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
185 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
186 "name": "A String", # [Output Only] Name of the resource.
187 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
188 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
189 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
190 {
191 "message": "A String", # [Output Only] An optional, human-readable error message.
192 "code": "A String", # [Output Only] The error type identifier for this error.
193 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
194 },
195 ],
196 },
197 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
198 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800199 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700200 }</pre>
201</div>
202
203<div class="method">
204 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
205 <pre>Retrieves the list of managed instance groups and groups them by zone.
206
207Args:
208 project: string, Project ID for this request. (required)
209 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
210
211You 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.
212
213Currently, only sorting by name or creationTimestamp desc is supported.
214 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.
215 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.
216 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.
217
218The 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.
219
220For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
221
222You 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.
223
224To 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.
225
226Returns:
227 An object of the form:
228
229 {
230 "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.
231 "items": { # [Output Only] A map of filtered managed instance group lists.
232 "a_key": { # [Output Only] The name of the scope that contains this set of managed instance groups.
233 "warning": { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty.
234 "message": "A String", # [Output Only] A human-readable description of the warning code.
235 "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.
236 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
237 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
238 {
239 "value": "A String", # [Output Only] A warning data value corresponding to the key.
240 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
241 },
242 ],
243 },
244 "instanceGroupManagers": [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone.
245 { # An Instance Group Manager resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700246 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700247 "pendingActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
248 "recreating": 42, # [Output Only] The number of instances in the managed instance group that are pending to be recreated.
249 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are pending to be deleted.
250 "creating": 42, # [Output Only] The number of instances in the managed instance group that are pending to be created.
251 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are pending to be restarted.
252 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800253 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
254 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
255 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
256 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used.
257 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
258 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700259 "updatePolicy": { # The update policy for this managed instance group.
260 "type": "A String",
261 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be created above the InstanceGroupManager.targetSize during the update process. By default, a fixed value of 1 is used. Using maxSurge > 0 will cause instance names to change during the update process. At least one of { maxSurge, maxUnavailable } must be greater than 0.
262 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
263 "fixed": 42, # fixed must be non-negative.
264 "percent": 42, # percent must belong to [0, 100].
265 },
266 "minimalAction": "A String", # Minimal action to be taken on an instance. The order of action types is: RESTART < REPLACE.
267 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable during the update process. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a fixed value of 1 is used. At least one of { maxSurge, maxUnavailable } must be greater than 0.
268 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
269 "fixed": 42, # fixed must be non-negative.
270 "percent": 42, # percent must belong to [0, 100].
271 },
272 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
273 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800274 "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.
275 "A String",
276 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700277 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
278 { # The named port. For example: .
279 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
280 "port": 42, # The port number, which can be a value between 1 and 65535.
281 },
282 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800283 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
284 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
285 {
286 "healthCheck": "A String", # The URL for the health check that signals autohealing.
287 "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
288 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when auto-healing. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a percent value of 100% is used.
289 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
290 "fixed": 42, # fixed must be non-negative.
291 "percent": 42, # percent must belong to [0, 100].
292 },
293 },
294 ],
295 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
296 "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.
297 "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.
298 "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.
299 "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.
300 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
301 "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.
302 "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.
303 #
304 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
305 "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified.
306 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
307 "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.
308 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
309 "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.
310 "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.
311 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700312 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800313 "versions": [ # Versions supported by this IGM. User should set this field if they need fine-grained control over how many instances in each version are run by this IGM. Versions are keyed by instanceTemplate. Every instanceTemplate can appear at most once. This field overrides instanceTemplate field. If both instanceTemplate and versions are set, the user receives a warning. "instanceTemplate: X" is semantically equivalent to "versions [ { instanceTemplate: X } ]". Exactly one version must have targetSize field left unset. Size of such a version will be calculated automatically.
314 {
315 "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Intended number of instances that are created from instanceTemplate. The final number of instances created from instanceTemplate will be equal to: * if expressed as fixed number: min(targetSize.fixed, instanceGroupManager.targetSize), * if expressed as percent: ceiling(targetSize.percent * InstanceGroupManager.targetSize). If unset, this version will handle all the remaining instances.
316 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
317 "fixed": 42, # fixed must be non-negative.
318 "percent": 42, # percent must belong to [0, 100].
319 },
320 "instanceTemplate": "A String",
321 "tag": "A String", # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged.
322 },
323 ],
324 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
325 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700326 },
327 ],
328 },
329 },
330 "kind": "compute#instanceGroupManagerAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups.
331 "id": "A String", # [Output Only] A unique identifier for this aggregated list of managed instance groups. The server generates this identifier.
332 "selfLink": "A String", # [Output Only] The URL for this resource type. The server generates this URL.
333 }</pre>
334</div>
335
336<div class="method">
337 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
338 <pre>Retrieves the next page of results.
339
340Args:
341 previous_request: The request for the previous page. (required)
342 previous_response: The response from the request for the previous page. (required)
343
344Returns:
345 A request object that you can call 'execute()' on to request the next
346 page. Returns None if there are no more items in the collection.
347 </pre>
348</div>
349
350<div class="method">
351 <code class="details" id="delete">delete(project, zone, instanceGroupManager)</code>
352 <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.
353
354Args:
355 project: string, Project ID for this request. (required)
356 zone: string, The name of the zone where the managed instance group is located. (required)
357 instanceGroupManager: string, The name of the managed instance group to delete. (required)
358
359Returns:
360 An object of the form:
361
362 { # An Operation resource, used to manage asynchronous API requests.
363 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
364 "clientOperationId": "A String", # [Output Only] Reserved for future use.
365 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
366 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
367 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
368 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
369 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
370 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
371 "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.
372 "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.
373 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
374 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
375 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
376 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
377 {
378 "message": "A String", # [Output Only] A human-readable description of the warning code.
379 "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.
380 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
381 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
382 {
383 "value": "A String", # [Output Only] A warning data value corresponding to the key.
384 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
385 },
386 ],
387 },
388 ],
389 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
390 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
391 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
392 "name": "A String", # [Output Only] Name of the resource.
393 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
394 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
395 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
396 {
397 "message": "A String", # [Output Only] An optional, human-readable error message.
398 "code": "A String", # [Output Only] The error type identifier for this error.
399 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
400 },
401 ],
402 },
403 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
404 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800405 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700406 }</pre>
407</div>
408
409<div class="method">
410 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body)</code>
411 <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.
412
413Args:
414 project: string, Project ID for this request. (required)
415 zone: string, The name of the zone where the managed instance group is located. (required)
416 instanceGroupManager: string, The name of the managed instance group. (required)
417 body: object, The request body. (required)
418 The object takes the form of:
419
420{
421 "instances": [ # The list of instances to delete from this managed instance group. Specify one or more instance URLs.
422 "A String",
423 ],
424 }
425
426
427Returns:
428 An object of the form:
429
430 { # An Operation resource, used to manage asynchronous API requests.
431 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
432 "clientOperationId": "A String", # [Output Only] Reserved for future use.
433 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
434 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
435 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
436 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
437 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
438 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
439 "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.
440 "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.
441 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
442 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
443 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
444 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
445 {
446 "message": "A String", # [Output Only] A human-readable description of the warning code.
447 "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.
448 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
449 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
450 {
451 "value": "A String", # [Output Only] A warning data value corresponding to the key.
452 "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).
453 },
454 ],
455 },
456 ],
457 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
458 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
459 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
460 "name": "A String", # [Output Only] Name of the resource.
461 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
462 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
463 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
464 {
465 "message": "A String", # [Output Only] An optional, human-readable error message.
466 "code": "A String", # [Output Only] The error type identifier for this error.
467 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
468 },
469 ],
470 },
471 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
472 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800473 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700474 }</pre>
475</div>
476
477<div class="method">
478 <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
479 <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.
480
481Args:
482 project: string, Project ID for this request. (required)
483 zone: string, The name of the zone where the managed instance group is located. (required)
484 instanceGroupManager: string, The name of the managed instance group. (required)
485
486Returns:
487 An object of the form:
488
489 { # An Instance Group Manager resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700490 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700491 "pendingActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
492 "recreating": 42, # [Output Only] The number of instances in the managed instance group that are pending to be recreated.
493 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are pending to be deleted.
494 "creating": 42, # [Output Only] The number of instances in the managed instance group that are pending to be created.
495 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are pending to be restarted.
496 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800497 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
498 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
499 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
500 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used.
501 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
502 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700503 "updatePolicy": { # The update policy for this managed instance group.
504 "type": "A String",
505 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be created above the InstanceGroupManager.targetSize during the update process. By default, a fixed value of 1 is used. Using maxSurge > 0 will cause instance names to change during the update process. At least one of { maxSurge, maxUnavailable } must be greater than 0.
506 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
507 "fixed": 42, # fixed must be non-negative.
508 "percent": 42, # percent must belong to [0, 100].
509 },
510 "minimalAction": "A String", # Minimal action to be taken on an instance. The order of action types is: RESTART < REPLACE.
511 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable during the update process. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a fixed value of 1 is used. At least one of { maxSurge, maxUnavailable } must be greater than 0.
512 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
513 "fixed": 42, # fixed must be non-negative.
514 "percent": 42, # percent must belong to [0, 100].
515 },
516 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
517 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800518 "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.
519 "A String",
520 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700521 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
522 { # The named port. For example: .
523 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
524 "port": 42, # The port number, which can be a value between 1 and 65535.
525 },
526 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800527 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
528 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
529 {
530 "healthCheck": "A String", # The URL for the health check that signals autohealing.
531 "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
532 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when auto-healing. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a percent value of 100% is used.
533 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
534 "fixed": 42, # fixed must be non-negative.
535 "percent": 42, # percent must belong to [0, 100].
536 },
537 },
538 ],
539 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
540 "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.
541 "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.
542 "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.
543 "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.
544 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
545 "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.
546 "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.
547 #
548 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
549 "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified.
550 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
551 "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.
552 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
553 "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.
554 "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.
555 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700556 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800557 "versions": [ # Versions supported by this IGM. User should set this field if they need fine-grained control over how many instances in each version are run by this IGM. Versions are keyed by instanceTemplate. Every instanceTemplate can appear at most once. This field overrides instanceTemplate field. If both instanceTemplate and versions are set, the user receives a warning. "instanceTemplate: X" is semantically equivalent to "versions [ { instanceTemplate: X } ]". Exactly one version must have targetSize field left unset. Size of such a version will be calculated automatically.
558 {
559 "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Intended number of instances that are created from instanceTemplate. The final number of instances created from instanceTemplate will be equal to: * if expressed as fixed number: min(targetSize.fixed, instanceGroupManager.targetSize), * if expressed as percent: ceiling(targetSize.percent * InstanceGroupManager.targetSize). If unset, this version will handle all the remaining instances.
560 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
561 "fixed": 42, # fixed must be non-negative.
562 "percent": 42, # percent must belong to [0, 100].
563 },
564 "instanceTemplate": "A String",
565 "tag": "A String", # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged.
566 },
567 ],
568 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
569 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700570 }</pre>
571</div>
572
573<div class="method">
574 <code class="details" id="insert">insert(project, zone, body)</code>
575 <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.
576
577Args:
578 project: string, Project ID for this request. (required)
579 zone: string, The name of the zone where you want to create the managed instance group. (required)
580 body: object, The request body. (required)
581 The object takes the form of:
582
583{ # An Instance Group Manager resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700584 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700585 "pendingActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
586 "recreating": 42, # [Output Only] The number of instances in the managed instance group that are pending to be recreated.
587 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are pending to be deleted.
588 "creating": 42, # [Output Only] The number of instances in the managed instance group that are pending to be created.
589 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are pending to be restarted.
590 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800591 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
592 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
593 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
594 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used.
595 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
596 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700597 "updatePolicy": { # The update policy for this managed instance group.
598 "type": "A String",
599 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be created above the InstanceGroupManager.targetSize during the update process. By default, a fixed value of 1 is used. Using maxSurge > 0 will cause instance names to change during the update process. At least one of { maxSurge, maxUnavailable } must be greater than 0.
600 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
601 "fixed": 42, # fixed must be non-negative.
602 "percent": 42, # percent must belong to [0, 100].
603 },
604 "minimalAction": "A String", # Minimal action to be taken on an instance. The order of action types is: RESTART < REPLACE.
605 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable during the update process. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a fixed value of 1 is used. At least one of { maxSurge, maxUnavailable } must be greater than 0.
606 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
607 "fixed": 42, # fixed must be non-negative.
608 "percent": 42, # percent must belong to [0, 100].
609 },
610 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
611 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800612 "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.
613 "A String",
614 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700615 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
616 { # The named port. For example: .
617 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
618 "port": 42, # The port number, which can be a value between 1 and 65535.
619 },
620 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800621 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
622 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
623 {
624 "healthCheck": "A String", # The URL for the health check that signals autohealing.
625 "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
626 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when auto-healing. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a percent value of 100% is used.
627 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
628 "fixed": 42, # fixed must be non-negative.
629 "percent": 42, # percent must belong to [0, 100].
630 },
631 },
632 ],
633 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
634 "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.
635 "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.
636 "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.
637 "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.
638 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
639 "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.
640 "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.
641 #
642 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
643 "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified.
644 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
645 "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.
646 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
647 "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.
648 "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.
649 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700650 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800651 "versions": [ # Versions supported by this IGM. User should set this field if they need fine-grained control over how many instances in each version are run by this IGM. Versions are keyed by instanceTemplate. Every instanceTemplate can appear at most once. This field overrides instanceTemplate field. If both instanceTemplate and versions are set, the user receives a warning. "instanceTemplate: X" is semantically equivalent to "versions [ { instanceTemplate: X } ]". Exactly one version must have targetSize field left unset. Size of such a version will be calculated automatically.
652 {
653 "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Intended number of instances that are created from instanceTemplate. The final number of instances created from instanceTemplate will be equal to: * if expressed as fixed number: min(targetSize.fixed, instanceGroupManager.targetSize), * if expressed as percent: ceiling(targetSize.percent * InstanceGroupManager.targetSize). If unset, this version will handle all the remaining instances.
654 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
655 "fixed": 42, # fixed must be non-negative.
656 "percent": 42, # percent must belong to [0, 100].
657 },
658 "instanceTemplate": "A String",
659 "tag": "A String", # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged.
660 },
661 ],
662 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
663 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700664 }
665
666
667Returns:
668 An object of the form:
669
670 { # An Operation resource, used to manage asynchronous API requests.
671 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
672 "clientOperationId": "A String", # [Output Only] Reserved for future use.
673 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
674 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
675 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
676 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
677 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
678 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
679 "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.
680 "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.
681 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
682 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
683 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
684 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
685 {
686 "message": "A String", # [Output Only] A human-readable description of the warning code.
687 "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.
688 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
689 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
690 {
691 "value": "A String", # [Output Only] A warning data value corresponding to the key.
692 "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).
693 },
694 ],
695 },
696 ],
697 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
698 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
699 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
700 "name": "A String", # [Output Only] Name of the resource.
701 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
702 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
703 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
704 {
705 "message": "A String", # [Output Only] An optional, human-readable error message.
706 "code": "A String", # [Output Only] The error type identifier for this error.
707 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
708 },
709 ],
710 },
711 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
712 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800713 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700714 }</pre>
715</div>
716
717<div class="method">
718 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
719 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
720
721Args:
722 project: string, Project ID for this request. (required)
723 zone: string, The name of the zone where the managed instance group is located. (required)
724 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
725
726You 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.
727
728Currently, only sorting by name or creationTimestamp desc is supported.
729 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.
730 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.
731 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.
732
733The 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.
734
735For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
736
737You 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.
738
739To 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.
740
741Returns:
742 An object of the form:
743
744 { # [Output Only] A list of managed instance groups.
745 "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.
746 "items": [ # [Output Only] A list of managed instance groups.
747 { # An Instance Group Manager resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700748 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700749 "pendingActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
750 "recreating": 42, # [Output Only] The number of instances in the managed instance group that are pending to be recreated.
751 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are pending to be deleted.
752 "creating": 42, # [Output Only] The number of instances in the managed instance group that are pending to be created.
753 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are pending to be restarted.
754 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800755 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
756 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
757 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
758 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used.
759 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
760 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700761 "updatePolicy": { # The update policy for this managed instance group.
762 "type": "A String",
763 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be created above the InstanceGroupManager.targetSize during the update process. By default, a fixed value of 1 is used. Using maxSurge > 0 will cause instance names to change during the update process. At least one of { maxSurge, maxUnavailable } must be greater than 0.
764 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
765 "fixed": 42, # fixed must be non-negative.
766 "percent": 42, # percent must belong to [0, 100].
767 },
768 "minimalAction": "A String", # Minimal action to be taken on an instance. The order of action types is: RESTART < REPLACE.
769 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable during the update process. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a fixed value of 1 is used. At least one of { maxSurge, maxUnavailable } must be greater than 0.
770 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
771 "fixed": 42, # fixed must be non-negative.
772 "percent": 42, # percent must belong to [0, 100].
773 },
774 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
775 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800776 "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.
777 "A String",
778 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700779 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
780 { # The named port. For example: .
781 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
782 "port": 42, # The port number, which can be a value between 1 and 65535.
783 },
784 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800785 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
786 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
787 {
788 "healthCheck": "A String", # The URL for the health check that signals autohealing.
789 "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
790 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when auto-healing. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a percent value of 100% is used.
791 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
792 "fixed": 42, # fixed must be non-negative.
793 "percent": 42, # percent must belong to [0, 100].
794 },
795 },
796 ],
797 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
798 "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.
799 "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.
800 "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.
801 "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.
802 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
803 "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.
804 "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.
805 #
806 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
807 "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified.
808 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
809 "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.
810 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
811 "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.
812 "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.
813 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700814 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800815 "versions": [ # Versions supported by this IGM. User should set this field if they need fine-grained control over how many instances in each version are run by this IGM. Versions are keyed by instanceTemplate. Every instanceTemplate can appear at most once. This field overrides instanceTemplate field. If both instanceTemplate and versions are set, the user receives a warning. "instanceTemplate: X" is semantically equivalent to "versions [ { instanceTemplate: X } ]". Exactly one version must have targetSize field left unset. Size of such a version will be calculated automatically.
816 {
817 "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Intended number of instances that are created from instanceTemplate. The final number of instances created from instanceTemplate will be equal to: * if expressed as fixed number: min(targetSize.fixed, instanceGroupManager.targetSize), * if expressed as percent: ceiling(targetSize.percent * InstanceGroupManager.targetSize). If unset, this version will handle all the remaining instances.
818 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
819 "fixed": 42, # fixed must be non-negative.
820 "percent": 42, # percent must belong to [0, 100].
821 },
822 "instanceTemplate": "A String",
823 "tag": "A String", # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged.
824 },
825 ],
826 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
827 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700828 },
829 ],
830 "kind": "compute#instanceGroupManagerList", # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
831 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
832 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
833 }</pre>
834</div>
835
836<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800837 <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700838 <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.
839
840Args:
841 project: string, Project ID for this request. (required)
842 zone: string, The name of the zone where the managed instance group is located. (required)
843 instanceGroupManager: string, The name of the managed instance group. (required)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800844 order_by: string, A parameter
845 maxResults: integer, A parameter
846 pageToken: string, A parameter
847 filter: string, A parameter
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700848
849Returns:
850 An object of the form:
851
852 {
853 "managedInstances": [ # [Output Only] The list of instances in the managed instance group.
854 {
855 "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist.
856 "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance.
857 "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
858 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
859 {
860 "message": "A String", # [Output Only] An optional, human-readable error message.
861 "code": "A String", # [Output Only] The error type identifier for this error.
862 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
863 },
864 ],
865 },
866 },
867 "tag": "A String", # [Output Only] Tag describing the version.
868 "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
869 "instanceTemplate": "A String", # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }.
870 "standbyMode": "A String", # [Output Only] Standby mode of the instance. This field is non-empty iff the instance is a standby.
871 "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
872 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
873 # - 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.
874 # - 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.
875 # - RECREATING The managed instance group is recreating this instance.
876 # - DELETING The managed instance group is permanently deleting this instance.
877 # - 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.
878 # - RESTARTING The managed instance group is restarting the instance.
879 # - 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.
880 "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
881 },
882 ],
883 }</pre>
884</div>
885
886<div class="method">
887 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
888 <pre>Retrieves the next page of results.
889
890Args:
891 previous_request: The request for the previous page. (required)
892 previous_response: The response from the request for the previous page. (required)
893
894Returns:
895 A request object that you can call 'execute()' on to request the next
896 page. Returns None if there are no more items in the collection.
897 </pre>
898</div>
899
900<div class="method">
901 <code class="details" id="patch">patch(project, zone, instanceGroupManager, body)</code>
902 <pre>Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports patch semantics.
903
904Args:
905 project: string, Project ID for this request. (required)
906 zone: string, The name of the zone where you want to create the managed instance group. (required)
907 instanceGroupManager: string, The name of the instance group manager. (required)
908 body: object, The request body. (required)
909 The object takes the form of:
910
911{ # An Instance Group Manager resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700912 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700913 "pendingActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
914 "recreating": 42, # [Output Only] The number of instances in the managed instance group that are pending to be recreated.
915 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are pending to be deleted.
916 "creating": 42, # [Output Only] The number of instances in the managed instance group that are pending to be created.
917 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are pending to be restarted.
918 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800919 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
920 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
921 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
922 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used.
923 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
924 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700925 "updatePolicy": { # The update policy for this managed instance group.
926 "type": "A String",
927 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be created above the InstanceGroupManager.targetSize during the update process. By default, a fixed value of 1 is used. Using maxSurge > 0 will cause instance names to change during the update process. At least one of { maxSurge, maxUnavailable } must be greater than 0.
928 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
929 "fixed": 42, # fixed must be non-negative.
930 "percent": 42, # percent must belong to [0, 100].
931 },
932 "minimalAction": "A String", # Minimal action to be taken on an instance. The order of action types is: RESTART < REPLACE.
933 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable during the update process. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a fixed value of 1 is used. At least one of { maxSurge, maxUnavailable } must be greater than 0.
934 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
935 "fixed": 42, # fixed must be non-negative.
936 "percent": 42, # percent must belong to [0, 100].
937 },
938 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
939 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800940 "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.
941 "A String",
942 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700943 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
944 { # The named port. For example: .
945 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
946 "port": 42, # The port number, which can be a value between 1 and 65535.
947 },
948 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800949 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
950 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
951 {
952 "healthCheck": "A String", # The URL for the health check that signals autohealing.
953 "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
954 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when auto-healing. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a percent value of 100% is used.
955 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
956 "fixed": 42, # fixed must be non-negative.
957 "percent": 42, # percent must belong to [0, 100].
958 },
959 },
960 ],
961 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
962 "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.
963 "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.
964 "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.
965 "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.
966 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
967 "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.
968 "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.
969 #
970 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
971 "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified.
972 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
973 "abandoning": 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
974 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
975 "creatingWithoutRetries": 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.
976 "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.
977 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700978 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800979 "versions": [ # Versions supported by this IGM. User should set this field if they need fine-grained control over how many instances in each version are run by this IGM. Versions are keyed by instanceTemplate. Every instanceTemplate can appear at most once. This field overrides instanceTemplate field. If both instanceTemplate and versions are set, the user receives a warning. "instanceTemplate: X" is semantically equivalent to "versions [ { instanceTemplate: X } ]". Exactly one version must have targetSize field left unset. Size of such a version will be calculated automatically.
980 {
981 "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Intended number of instances that are created from instanceTemplate. The final number of instances created from instanceTemplate will be equal to: * if expressed as fixed number: min(targetSize.fixed, instanceGroupManager.targetSize), * if expressed as percent: ceiling(targetSize.percent * InstanceGroupManager.targetSize). If unset, this version will handle all the remaining instances.
982 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
983 "fixed": 42, # fixed must be non-negative.
984 "percent": 42, # percent must belong to [0, 100].
985 },
986 "instanceTemplate": "A String",
987 "tag": "A String", # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged.
988 },
989 ],
990 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
991 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700992 }
993
994
995Returns:
996 An object of the form:
997
998 { # An Operation resource, used to manage asynchronous API requests.
999 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1000 "clientOperationId": "A String", # [Output Only] Reserved for future use.
1001 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1002 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1003 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1004 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1005 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1006 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1007 "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.
1008 "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.
1009 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1010 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1011 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1012 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1013 {
1014 "message": "A String", # [Output Only] A human-readable description of the warning code.
1015 "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.
1016 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1017 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1018 {
1019 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1020 "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).
1021 },
1022 ],
1023 },
1024 ],
1025 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1026 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1027 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1028 "name": "A String", # [Output Only] Name of the resource.
1029 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1030 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1031 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1032 {
1033 "message": "A String", # [Output Only] An optional, human-readable error message.
1034 "code": "A String", # [Output Only] The error type identifier for this error.
1035 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1036 },
1037 ],
1038 },
1039 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1040 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001041 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001042 }</pre>
1043</div>
1044
1045<div class="method">
1046 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body)</code>
1047 <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.
1048
1049Args:
1050 project: string, Project ID for this request. (required)
1051 zone: string, The name of the zone where the managed instance group is located. (required)
1052 instanceGroupManager: string, The name of the managed instance group. (required)
1053 body: object, The request body. (required)
1054 The object takes the form of:
1055
1056{
1057 "instances": [ # The URL for one or more instances to recreate.
1058 "A String",
1059 ],
1060 }
1061
1062
1063Returns:
1064 An object of the form:
1065
1066 { # An Operation resource, used to manage asynchronous API requests.
1067 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1068 "clientOperationId": "A String", # [Output Only] Reserved for future use.
1069 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1070 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1071 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1072 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1073 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1074 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1075 "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.
1076 "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.
1077 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1078 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1079 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1080 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1081 {
1082 "message": "A String", # [Output Only] A human-readable description of the warning code.
1083 "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.
1084 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1085 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1086 {
1087 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1088 "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).
1089 },
1090 ],
1091 },
1092 ],
1093 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1094 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1095 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1096 "name": "A String", # [Output Only] Name of the resource.
1097 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1098 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1099 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1100 {
1101 "message": "A String", # [Output Only] An optional, human-readable error message.
1102 "code": "A String", # [Output Only] The error type identifier for this error.
1103 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1104 },
1105 ],
1106 },
1107 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1108 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001109 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001110 }</pre>
1111</div>
1112
1113<div class="method">
1114 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size)</code>
1115 <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.
1116
1117Args:
1118 project: string, Project ID for this request. (required)
1119 zone: string, The name of the zone where the managed instance group is located. (required)
1120 instanceGroupManager: string, The name of the managed instance group. (required)
1121 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)
1122
1123Returns:
1124 An object of the form:
1125
1126 { # An Operation resource, used to manage asynchronous API requests.
1127 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1128 "clientOperationId": "A String", # [Output Only] Reserved for future use.
1129 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1130 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1131 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1132 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1133 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1134 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1135 "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.
1136 "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.
1137 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1138 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1139 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1140 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1141 {
1142 "message": "A String", # [Output Only] A human-readable description of the warning code.
1143 "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.
1144 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1145 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1146 {
1147 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1148 "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).
1149 },
1150 ],
1151 },
1152 ],
1153 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1154 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1155 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1156 "name": "A String", # [Output Only] Name of the resource.
1157 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1158 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1159 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1160 {
1161 "message": "A String", # [Output Only] An optional, human-readable error message.
1162 "code": "A String", # [Output Only] The error type identifier for this error.
1163 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1164 },
1165 ],
1166 },
1167 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1168 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001169 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001170 }</pre>
1171</div>
1172
1173<div class="method">
1174 <code class="details" id="resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body)</code>
1175 <pre>Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.
1176
1177If you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.
1178
1179Args:
1180 project: string, Project ID for this request. (required)
1181 zone: string, The name of the zone where the managed instance group is located. (required)
1182 instanceGroupManager: string, The name of the managed instance group. (required)
1183 body: object, The request body. (required)
1184 The object takes the form of:
1185
1186{
1187 "noCreationRetries": True or False, # If this flag is true, the managed instance group attempts to create all instances initiated by this resize request only once. If there is an error during creation, the managed instance group does not retry create this instance, and we will decrease the targetSize of the request instead. If the flag is false, the group attemps to recreate each instance continuously until it succeeds.
1188 #
1189 # This flag matters only in the first attempt of creation of an instance. After an instance is successfully created while this flag is enabled, the instance behaves the same way as all the other instances created with a regular resize request. In particular, if a running instance dies unexpectedly at a later time and needs to be recreated, this mode does not affect the recreation behavior in that scenario.
1190 #
1191 # This flag is applicable only to the current resize request. It does not influence other resize requests in any way.
1192 #
1193 # You can see which instances is being creating in which mode by calling the get or listManagedInstances API.
1194 "targetSize": 42, # The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.
1195 }
1196
1197
1198Returns:
1199 An object of the form:
1200
1201 { # An Operation resource, used to manage asynchronous API requests.
1202 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1203 "clientOperationId": "A String", # [Output Only] Reserved for future use.
1204 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1205 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1206 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1207 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1208 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1209 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1210 "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.
1211 "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.
1212 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1213 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1214 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1215 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1216 {
1217 "message": "A String", # [Output Only] A human-readable description of the warning code.
1218 "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.
1219 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1220 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1221 {
1222 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1223 "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).
1224 },
1225 ],
1226 },
1227 ],
1228 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1229 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1230 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1231 "name": "A String", # [Output Only] Name of the resource.
1232 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1233 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1234 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1235 {
1236 "message": "A String", # [Output Only] An optional, human-readable error message.
1237 "code": "A String", # [Output Only] The error type identifier for this error.
1238 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1239 },
1240 ],
1241 },
1242 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1243 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001244 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001245 }</pre>
1246</div>
1247
1248<div class="method">
1249 <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body)</code>
1250 <pre>Modifies the autohealing policies.
1251
1252Args:
1253 project: string, Project ID for this request. (required)
1254 zone: string, The name of the zone where the managed instance group is located. (required)
1255 instanceGroupManager: string, The name of the instance group manager. (required)
1256 body: object, The request body. (required)
1257 The object takes the form of:
1258
1259{
1260 "autoHealingPolicies": [
1261 {
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001262 "healthCheck": "A String", # The URL for the health check that signals autohealing.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001263 "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
1264 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when auto-healing. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a percent value of 100% is used.
1265 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
1266 "fixed": 42, # fixed must be non-negative.
1267 "percent": 42, # percent must belong to [0, 100].
1268 },
1269 },
1270 ],
1271 }
1272
1273
1274Returns:
1275 An object of the form:
1276
1277 { # An Operation resource, used to manage asynchronous API requests.
1278 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1279 "clientOperationId": "A String", # [Output Only] Reserved for future use.
1280 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1281 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1282 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1283 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1284 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1285 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1286 "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.
1287 "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.
1288 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1289 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1290 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1291 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1292 {
1293 "message": "A String", # [Output Only] A human-readable description of the warning code.
1294 "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.
1295 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1296 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1297 {
1298 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1299 "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).
1300 },
1301 ],
1302 },
1303 ],
1304 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1305 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1306 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1307 "name": "A String", # [Output Only] Name of the resource.
1308 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1309 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1310 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1311 {
1312 "message": "A String", # [Output Only] An optional, human-readable error message.
1313 "code": "A String", # [Output Only] The error type identifier for this error.
1314 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1315 },
1316 ],
1317 },
1318 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1319 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001320 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001321 }</pre>
1322</div>
1323
1324<div class="method">
1325 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body)</code>
1326 <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.
1327
1328Args:
1329 project: string, Project ID for this request. (required)
1330 zone: string, The name of the zone where the managed instance group is located. (required)
1331 instanceGroupManager: string, The name of the managed instance group. (required)
1332 body: object, The request body. (required)
1333 The object takes the form of:
1334
1335{
1336 "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.
1337 }
1338
1339
1340Returns:
1341 An object of the form:
1342
1343 { # An Operation resource, used to manage asynchronous API requests.
1344 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1345 "clientOperationId": "A String", # [Output Only] Reserved for future use.
1346 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1347 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1348 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1349 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1350 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1351 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1352 "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.
1353 "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.
1354 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1355 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1356 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1357 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1358 {
1359 "message": "A String", # [Output Only] A human-readable description of the warning code.
1360 "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.
1361 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1362 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1363 {
1364 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1365 "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).
1366 },
1367 ],
1368 },
1369 ],
1370 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1371 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1372 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1373 "name": "A String", # [Output Only] Name of the resource.
1374 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1375 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1376 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1377 {
1378 "message": "A String", # [Output Only] An optional, human-readable error message.
1379 "code": "A String", # [Output Only] The error type identifier for this error.
1380 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1381 },
1382 ],
1383 },
1384 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1385 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001386 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001387 }</pre>
1388</div>
1389
1390<div class="method">
1391 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body)</code>
1392 <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.
1393
1394Args:
1395 project: string, Project ID for this request. (required)
1396 zone: string, The name of the zone where the managed instance group is located. (required)
1397 instanceGroupManager: string, The name of the managed instance group. (required)
1398 body: object, The request body. (required)
1399 The object takes the form of:
1400
1401{
1402 "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.
1403 "A String",
1404 ],
1405 "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.
1406 }
1407
1408
1409Returns:
1410 An object of the form:
1411
1412 { # An Operation resource, used to manage asynchronous API requests.
1413 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1414 "clientOperationId": "A String", # [Output Only] Reserved for future use.
1415 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1416 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1417 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1418 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1419 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1420 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1421 "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.
1422 "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.
1423 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1424 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1425 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1426 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1427 {
1428 "message": "A String", # [Output Only] A human-readable description of the warning code.
1429 "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.
1430 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1431 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1432 {
1433 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1434 "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).
1435 },
1436 ],
1437 },
1438 ],
1439 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1440 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1441 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1442 "name": "A String", # [Output Only] Name of the resource.
1443 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1444 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1445 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1446 {
1447 "message": "A String", # [Output Only] An optional, human-readable error message.
1448 "code": "A String", # [Output Only] The error type identifier for this error.
1449 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1450 },
1451 ],
1452 },
1453 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1454 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001455 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001456 }</pre>
1457</div>
1458
1459<div class="method">
1460 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code>
1461 <pre>Returns permissions that a caller has on the specified resource.
1462
1463Args:
1464 project: string, Project ID for this request. (required)
1465 zone: string, The name of the zone for this request. (required)
1466 resource: string, Name of the resource for this request. (required)
1467 body: object, The request body. (required)
1468 The object takes the form of:
1469
1470{
1471 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1472 "A String",
1473 ],
1474 }
1475
1476
1477Returns:
1478 An object of the form:
1479
1480 {
1481 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1482 "A String",
1483 ],
1484 }</pre>
1485</div>
1486
1487<div class="method">
1488 <code class="details" id="update">update(project, zone, instanceGroupManager, body)</code>
1489 <pre>Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.
1490
1491Args:
1492 project: string, Project ID for this request. (required)
1493 zone: string, The name of the zone where you want to create the managed instance group. (required)
1494 instanceGroupManager: string, The name of the instance group manager. (required)
1495 body: object, The request body. (required)
1496 The object takes the form of:
1497
1498{ # An Instance Group Manager resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001499 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001500 "pendingActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
1501 "recreating": 42, # [Output Only] The number of instances in the managed instance group that are pending to be recreated.
1502 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are pending to be deleted.
1503 "creating": 42, # [Output Only] The number of instances in the managed instance group that are pending to be created.
1504 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are pending to be restarted.
1505 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001506 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1507 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1508 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
1509 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used.
1510 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1511 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001512 "updatePolicy": { # The update policy for this managed instance group.
1513 "type": "A String",
1514 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be created above the InstanceGroupManager.targetSize during the update process. By default, a fixed value of 1 is used. Using maxSurge > 0 will cause instance names to change during the update process. At least one of { maxSurge, maxUnavailable } must be greater than 0.
1515 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
1516 "fixed": 42, # fixed must be non-negative.
1517 "percent": 42, # percent must belong to [0, 100].
1518 },
1519 "minimalAction": "A String", # Minimal action to be taken on an instance. The order of action types is: RESTART < REPLACE.
1520 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable during the update process. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a fixed value of 1 is used. At least one of { maxSurge, maxUnavailable } must be greater than 0.
1521 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
1522 "fixed": 42, # fixed must be non-negative.
1523 "percent": 42, # percent must belong to [0, 100].
1524 },
1525 "minReadySec": 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1526 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001527 "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.
1528 "A String",
1529 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001530 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1531 { # The named port. For example: .
1532 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1533 "port": 42, # The port number, which can be a value between 1 and 65535.
1534 },
1535 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001536 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1537 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value.
1538 {
1539 "healthCheck": "A String", # The URL for the health check that signals autohealing.
1540 "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
1541 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # Maximum number of instances that can be unavailable when auto-healing. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a percent value of 100% is used.
1542 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
1543 "fixed": 42, # fixed must be non-negative.
1544 "percent": 42, # percent must belong to [0, 100].
1545 },
1546 },
1547 ],
1548 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
1549 "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.
1550 "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.
1551 "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.
1552 "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.
1553 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1554 "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.
1555 "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.
1556 #
1557 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1558 "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified.
1559 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1560 "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.
1561 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1562 "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.
1563 "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.
1564 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001565 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001566 "versions": [ # Versions supported by this IGM. User should set this field if they need fine-grained control over how many instances in each version are run by this IGM. Versions are keyed by instanceTemplate. Every instanceTemplate can appear at most once. This field overrides instanceTemplate field. If both instanceTemplate and versions are set, the user receives a warning. "instanceTemplate: X" is semantically equivalent to "versions [ { instanceTemplate: X } ]". Exactly one version must have targetSize field left unset. Size of such a version will be calculated automatically.
1567 {
1568 "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Intended number of instances that are created from instanceTemplate. The final number of instances created from instanceTemplate will be equal to: * if expressed as fixed number: min(targetSize.fixed, instanceGroupManager.targetSize), * if expressed as percent: ceiling(targetSize.percent * InstanceGroupManager.targetSize). If unset, this version will handle all the remaining instances.
1569 "calculated": 42, # [Output Only] Absolute value calculated based on mode: mode = fixed -> calculated = fixed = percent -> calculated = ceiling(percent/100 * base_value)
1570 "fixed": 42, # fixed must be non-negative.
1571 "percent": 42, # percent must belong to [0, 100].
1572 },
1573 "instanceTemplate": "A String",
1574 "tag": "A String", # Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged.
1575 },
1576 ],
1577 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1578 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001579 }
1580
1581
1582Returns:
1583 An object of the form:
1584
1585 { # An Operation resource, used to manage asynchronous API requests.
1586 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1587 "clientOperationId": "A String", # [Output Only] Reserved for future use.
1588 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1589 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1590 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1591 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1592 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1593 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1594 "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.
1595 "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.
1596 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1597 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1598 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1599 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1600 {
1601 "message": "A String", # [Output Only] A human-readable description of the warning code.
1602 "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.
1603 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1604 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1605 {
1606 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1607 "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).
1608 },
1609 ],
1610 },
1611 ],
1612 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1613 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1614 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1615 "name": "A String", # [Output Only] Name of the resource.
1616 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1617 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1618 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1619 {
1620 "message": "A String", # [Output Only] An optional, human-readable error message.
1621 "code": "A String", # [Output Only] The error type identifier for this error.
1622 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1623 },
1624 ],
1625 },
1626 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1627 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001628 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001629 }</pre>
1630</div>
1631
1632</body></html>