blob: 3068e0b2d49a57c41ad68572f51e5ddd76f16ef9 [file] [log] [blame]
Takashi Matsuo06694102015-09-11 13:55:40 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.instanceGroupManagers.html">instanceGroupManagers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#abandonInstances">abandonInstances(project, zone, instanceGroupManager, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080079<p class="firstline">Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070080<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070081 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080082<p class="firstline">Retrieves the list of managed instance groups and groups them by zone.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070083<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
87 <code><a href="#delete">delete(project, zone, instanceGroupManager)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080088<p class="firstline">Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070089<p class="toc_element">
90 <code><a href="#deleteInstances">deleteInstances(project, zone, instanceGroupManager, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080091<p class="firstline">Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070092<p class="toc_element">
93 <code><a href="#get">get(project, zone, instanceGroupManager)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070094<p class="firstline">Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070095<p class="toc_element">
96 <code><a href="#insert">insert(project, zone, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080097<p class="firstline">Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070098<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070099 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700100<p class="firstline">Retrieves a list of managed instance groups that are contained within the specified project and zone.</p>
101<p class="toc_element">
102 <code><a href="#listManagedInstances">listManagedInstances(project, zone, instanceGroupManager)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800103<p class="firstline">Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700104<p class="toc_element">
105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
108 <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800109<p class="firstline">Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700110<p class="toc_element">
111 <code><a href="#resize">resize(project, zone, instanceGroupManager, size)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800112<p class="firstline">Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700113<p class="toc_element">
114 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body)</a></code></p>
115<p class="firstline">Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.</p>
116<p class="toc_element">
117 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800118<p class="firstline">Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700119<h3>Method Details</h3>
120<div class="method">
121 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800122 <pre>Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.
Takashi Matsuo06694102015-09-11 13:55:40 -0700123
124Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800125 project: string, Project ID for this request. (required)
126 zone: string, The name of the zone where the managed instance group is located. (required)
127 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700128 body: object, The request body. (required)
129 The object takes the form of:
130
131{
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800132 "instances": [ # The URL for one or more instances to abandon from the managed instance group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700133 "A String",
134 ],
135 }
136
137
138Returns:
139 An object of the form:
140
141 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800142 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
143 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700144 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800145 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
146 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
147 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
148 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700149 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800150 "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.
151 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Takashi Matsuo06694102015-09-11 13:55:40 -0700152 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800153 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
154 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700155 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
156 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800157 "message": "A String", # [Output Only] A human-readable description of the warning code.
158 "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.
159 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
160 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700161 {
162 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700163 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Takashi Matsuo06694102015-09-11 13:55:40 -0700164 },
165 ],
166 },
167 ],
168 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800169 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
170 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700171 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800172 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700173 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
174 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
175 {
176 "message": "A String", # [Output Only] An optional, human-readable error message.
177 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700178 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700179 },
180 ],
181 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800182 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700183 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700184 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700185 }</pre>
186</div>
187
188<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700189 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800190 <pre>Retrieves the list of managed instance groups and groups them by zone.
Takashi Matsuo06694102015-09-11 13:55:40 -0700191
192Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800193 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700194 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
195
196You 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.
197
198Currently, only sorting by name or creationTimestamp desc is supported.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800199 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.
200 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.
201 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
Takashi Matsuo06694102015-09-11 13:55:40 -0700202
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800203The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
Takashi Matsuo06694102015-09-11 13:55:40 -0700204
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700205For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800206
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700207You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800208
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700209To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700210
211Returns:
212 An object of the form:
213
214 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800215 "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.
216 "items": { # [Output Only] A map of filtered managed instance group lists.
217 "a_key": { # [Output Only] The name of the scope that contains this set of managed instance groups.
Takashi Matsuo06694102015-09-11 13:55:40 -0700218 "warning": { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800219 "message": "A String", # [Output Only] A human-readable description of the warning code.
220 "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.
221 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
222 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700223 {
224 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700225 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Takashi Matsuo06694102015-09-11 13:55:40 -0700226 },
227 ],
228 },
229 "instanceGroupManagers": [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700230 { # An Instance Group Manager resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800231 "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.
232 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
Takashi Matsuo06694102015-09-11 13:55:40 -0700233 "recreating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700234 "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.
235 #
236 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Takashi Matsuo06694102015-09-11 13:55:40 -0700237 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800238 "abandoning": 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
Takashi Matsuo06694102015-09-11 13:55:40 -0700239 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700240 "creatingWithoutRetries": 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.
Takashi Matsuo06694102015-09-11 13:55:40 -0700241 "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.
242 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800243 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700244 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Takashi Matsuo06694102015-09-11 13:55:40 -0700245 "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700246 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800247 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700248 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800249 "targetPools": [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700250 "A String",
251 ],
252 "baseInstanceName": "A String", # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700253 "fingerprint": "A String", # [Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700254 "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800255 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
256 { # The named port. For example: .
257 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
258 "port": 42, # The port number, which can be a value between 1 and 65535.
259 },
260 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700261 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800262 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
263 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700264 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
265 },
266 ],
267 },
268 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800269 "kind": "compute#instanceGroupManagerAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups.
270 "id": "A String", # [Output Only] A unique identifier for this aggregated list of managed instance groups. The server generates this identifier.
271 "selfLink": "A String", # [Output Only] The URL for this resource type. The server generates this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700272 }</pre>
273</div>
274
275<div class="method">
276 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
277 <pre>Retrieves the next page of results.
278
279Args:
280 previous_request: The request for the previous page. (required)
281 previous_response: The response from the request for the previous page. (required)
282
283Returns:
284 A request object that you can call 'execute()' on to request the next
285 page. Returns None if there are no more items in the collection.
286 </pre>
287</div>
288
289<div class="method">
290 <code class="details" id="delete">delete(project, zone, instanceGroupManager)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800291 <pre>Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.
Takashi Matsuo06694102015-09-11 13:55:40 -0700292
293Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800294 project: string, Project ID for this request. (required)
295 zone: string, The name of the zone where the managed instance group is located. (required)
296 instanceGroupManager: string, The name of the managed instance group to delete. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700297
298Returns:
299 An object of the form:
300
301 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800302 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
303 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700304 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800305 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
306 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
307 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
308 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700309 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800310 "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.
311 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Takashi Matsuo06694102015-09-11 13:55:40 -0700312 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800313 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
314 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700315 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
316 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800317 "message": "A String", # [Output Only] A human-readable description of the warning code.
318 "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.
319 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
320 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700321 {
322 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700323 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Takashi Matsuo06694102015-09-11 13:55:40 -0700324 },
325 ],
326 },
327 ],
328 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800329 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
330 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700331 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800332 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700333 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
334 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
335 {
336 "message": "A String", # [Output Only] An optional, human-readable error message.
337 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700338 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700339 },
340 ],
341 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800342 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700343 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700344 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700345 }</pre>
346</div>
347
348<div class="method">
349 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800350 <pre>Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.
Takashi Matsuo06694102015-09-11 13:55:40 -0700351
352Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800353 project: string, Project ID for this request. (required)
354 zone: string, The name of the zone where the managed instance group is located. (required)
355 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700356 body: object, The request body. (required)
357 The object takes the form of:
358
359{
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800360 "instances": [ # The list of instances to delete from this managed instance group. Specify one or more instance URLs.
Takashi Matsuo06694102015-09-11 13:55:40 -0700361 "A String",
362 ],
363 }
364
365
366Returns:
367 An object of the form:
368
369 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800370 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
371 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700372 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800373 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
374 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
375 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
376 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700377 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800378 "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.
379 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Takashi Matsuo06694102015-09-11 13:55:40 -0700380 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800381 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
382 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700383 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
384 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800385 "message": "A String", # [Output Only] A human-readable description of the warning code.
386 "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.
387 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
388 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700389 {
390 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700391 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Takashi Matsuo06694102015-09-11 13:55:40 -0700392 },
393 ],
394 },
395 ],
396 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800397 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
398 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700399 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800400 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700401 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
402 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
403 {
404 "message": "A String", # [Output Only] An optional, human-readable error message.
405 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700406 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700407 },
408 ],
409 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800410 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700411 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700412 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700413 }</pre>
414</div>
415
416<div class="method">
417 <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700418 <pre>Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700419
420Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800421 project: string, Project ID for this request. (required)
422 zone: string, The name of the zone where the managed instance group is located. (required)
423 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700424
425Returns:
426 An object of the form:
427
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700428 { # An Instance Group Manager resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800429 "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.
430 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
Takashi Matsuo06694102015-09-11 13:55:40 -0700431 "recreating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700432 "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.
433 #
434 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Takashi Matsuo06694102015-09-11 13:55:40 -0700435 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800436 "abandoning": 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
Takashi Matsuo06694102015-09-11 13:55:40 -0700437 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700438 "creatingWithoutRetries": 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.
Takashi Matsuo06694102015-09-11 13:55:40 -0700439 "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.
440 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800441 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700442 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Takashi Matsuo06694102015-09-11 13:55:40 -0700443 "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700444 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800445 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700446 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800447 "targetPools": [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700448 "A String",
449 ],
450 "baseInstanceName": "A String", # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700451 "fingerprint": "A String", # [Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700452 "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800453 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
454 { # The named port. For example: .
455 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
456 "port": 42, # The port number, which can be a value between 1 and 65535.
457 },
458 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700459 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800460 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
461 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700462 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
463 }</pre>
464</div>
465
466<div class="method">
467 <code class="details" id="insert">insert(project, zone, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800468 <pre>Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.
Takashi Matsuo06694102015-09-11 13:55:40 -0700469
470Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800471 project: string, Project ID for this request. (required)
472 zone: string, The name of the zone where you want to create the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700473 body: object, The request body. (required)
474 The object takes the form of:
475
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700476{ # An Instance Group Manager resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800477 "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.
478 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
Takashi Matsuo06694102015-09-11 13:55:40 -0700479 "recreating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700480 "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.
481 #
482 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Takashi Matsuo06694102015-09-11 13:55:40 -0700483 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800484 "abandoning": 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
Takashi Matsuo06694102015-09-11 13:55:40 -0700485 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700486 "creatingWithoutRetries": 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.
Takashi Matsuo06694102015-09-11 13:55:40 -0700487 "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.
488 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800489 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700490 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Takashi Matsuo06694102015-09-11 13:55:40 -0700491 "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700492 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800493 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700494 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800495 "targetPools": [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700496 "A String",
497 ],
498 "baseInstanceName": "A String", # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700499 "fingerprint": "A String", # [Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700500 "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800501 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
502 { # The named port. For example: .
503 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
504 "port": 42, # The port number, which can be a value between 1 and 65535.
505 },
506 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700507 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800508 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
509 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700510 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
511 }
512
513
514Returns:
515 An object of the form:
516
517 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800518 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
519 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700520 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800521 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
522 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
523 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
524 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700525 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800526 "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.
527 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Takashi Matsuo06694102015-09-11 13:55:40 -0700528 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800529 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
530 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700531 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
532 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800533 "message": "A String", # [Output Only] A human-readable description of the warning code.
534 "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.
535 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
536 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700537 {
538 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700539 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Takashi Matsuo06694102015-09-11 13:55:40 -0700540 },
541 ],
542 },
543 ],
544 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800545 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
546 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700547 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800548 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700549 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
550 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
551 {
552 "message": "A String", # [Output Only] An optional, human-readable error message.
553 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700554 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700555 },
556 ],
557 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800558 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700559 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700560 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700561 }</pre>
562</div>
563
564<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700565 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700566 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
567
568Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800569 project: string, Project ID for this request. (required)
570 zone: string, The name of the zone where the managed instance group is located. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700571 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
572
573You 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.
574
575Currently, only sorting by name or creationTimestamp desc is supported.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800576 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.
577 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.
578 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
Takashi Matsuo06694102015-09-11 13:55:40 -0700579
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800580The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
Takashi Matsuo06694102015-09-11 13:55:40 -0700581
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700582For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800583
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700584You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800585
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700586To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700587
588Returns:
589 An object of the form:
590
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800591 { # [Output Only] A list of managed instance groups.
592 "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.
593 "items": [ # [Output Only] A list of managed instance groups.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700594 { # An Instance Group Manager resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800595 "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.
596 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
Takashi Matsuo06694102015-09-11 13:55:40 -0700597 "recreating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700598 "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.
599 #
600 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Takashi Matsuo06694102015-09-11 13:55:40 -0700601 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800602 "abandoning": 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
Takashi Matsuo06694102015-09-11 13:55:40 -0700603 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700604 "creatingWithoutRetries": 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.
Takashi Matsuo06694102015-09-11 13:55:40 -0700605 "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.
606 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800607 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700608 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Takashi Matsuo06694102015-09-11 13:55:40 -0700609 "targetSize": 42, # The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700610 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800611 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700612 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800613 "targetPools": [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700614 "A String",
615 ],
616 "baseInstanceName": "A String", # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700617 "fingerprint": "A String", # [Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700618 "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800619 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
620 { # The named port. For example: .
621 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
622 "port": 42, # The port number, which can be a value between 1 and 65535.
623 },
624 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700625 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800626 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
627 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700628 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
629 },
630 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800631 "kind": "compute#instanceGroupManagerList", # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
632 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700633 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700634 }</pre>
635</div>
636
637<div class="method">
638 <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800639 <pre>Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.
Takashi Matsuo06694102015-09-11 13:55:40 -0700640
641Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800642 project: string, Project ID for this request. (required)
643 zone: string, The name of the zone where the managed instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700644 instanceGroupManager: string, The name of the managed instance group. (required)
645
646Returns:
647 An object of the form:
648
649 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800650 "managedInstances": [ # [Output Only] The list of instances in the managed instance group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700651 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800652 "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
653 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
654 # - CREATING The managed instance group is creating this instance. If the group fails to create this instance, it will try again until it is successful.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700655 # - CREATING_WITHOUT_RETRIES The managed instance group is attempting to create this instance only once. If the group fails to create this instance, it does not try again and the group's targetSize value is decreased instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800656 # - RECREATING The managed instance group is recreating this instance.
657 # - DELETING The managed instance group is permanently deleting this instance.
658 # - 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.
659 # - RESTARTING The managed instance group is restarting the instance.
660 # - 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.
661 "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
662 "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance.
663 "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700664 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
665 {
666 "message": "A String", # [Output Only] An optional, human-readable error message.
667 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700668 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700669 },
670 ],
671 },
672 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800673 "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
674 "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist.
Takashi Matsuo06694102015-09-11 13:55:40 -0700675 },
676 ],
677 }</pre>
678</div>
679
680<div class="method">
681 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
682 <pre>Retrieves the next page of results.
683
684Args:
685 previous_request: The request for the previous page. (required)
686 previous_response: The response from the request for the previous page. (required)
687
688Returns:
689 A request object that you can call 'execute()' on to request the next
690 page. Returns None if there are no more items in the collection.
691 </pre>
692</div>
693
694<div class="method">
695 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800696 <pre>Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.
Takashi Matsuo06694102015-09-11 13:55:40 -0700697
698Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800699 project: string, Project ID for this request. (required)
700 zone: string, The name of the zone where the managed instance group is located. (required)
701 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700702 body: object, The request body. (required)
703 The object takes the form of:
704
705{
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800706 "instances": [ # The URL for one or more instances to recreate.
Takashi Matsuo06694102015-09-11 13:55:40 -0700707 "A String",
708 ],
709 }
710
711
712Returns:
713 An object of the form:
714
715 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800716 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
717 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700718 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800719 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
720 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
721 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
722 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700723 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800724 "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.
725 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Takashi Matsuo06694102015-09-11 13:55:40 -0700726 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800727 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
728 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700729 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
730 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800731 "message": "A String", # [Output Only] A human-readable description of the warning code.
732 "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.
733 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
734 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700735 {
736 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700737 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Takashi Matsuo06694102015-09-11 13:55:40 -0700738 },
739 ],
740 },
741 ],
742 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800743 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
744 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700745 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800746 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700747 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
748 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
749 {
750 "message": "A String", # [Output Only] An optional, human-readable error message.
751 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700752 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700753 },
754 ],
755 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800756 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700757 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700758 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700759 }</pre>
760</div>
761
762<div class="method">
763 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800764 <pre>Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.
Takashi Matsuo06694102015-09-11 13:55:40 -0700765
766Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800767 project: string, Project ID for this request. (required)
768 zone: string, The name of the zone where the managed instance group is located. (required)
769 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700770 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)
771
772Returns:
773 An object of the form:
774
775 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800776 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
777 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700778 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800779 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
780 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
781 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
782 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700783 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800784 "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.
785 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Takashi Matsuo06694102015-09-11 13:55:40 -0700786 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800787 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
788 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700789 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
790 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800791 "message": "A String", # [Output Only] A human-readable description of the warning code.
792 "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.
793 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
794 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700795 {
796 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700797 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Takashi Matsuo06694102015-09-11 13:55:40 -0700798 },
799 ],
800 },
801 ],
802 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800803 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
804 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700805 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800806 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700807 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
808 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
809 {
810 "message": "A String", # [Output Only] An optional, human-readable error message.
811 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700812 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700813 },
814 ],
815 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800816 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700817 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700818 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700819 }</pre>
820</div>
821
822<div class="method">
823 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body)</code>
824 <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.
825
826Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800827 project: string, Project ID for this request. (required)
828 zone: string, The name of the zone where the managed instance group is located. (required)
829 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700830 body: object, The request body. (required)
831 The object takes the form of:
832
833{
834 "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.
835 }
836
837
838Returns:
839 An object of the form:
840
841 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800842 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
843 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700844 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800845 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
846 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
847 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
848 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700849 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800850 "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.
851 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Takashi Matsuo06694102015-09-11 13:55:40 -0700852 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800853 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
854 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700855 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
856 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800857 "message": "A String", # [Output Only] A human-readable description of the warning code.
858 "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.
859 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
860 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700861 {
862 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700863 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Takashi Matsuo06694102015-09-11 13:55:40 -0700864 },
865 ],
866 },
867 ],
868 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800869 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
870 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700871 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800872 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700873 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
874 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
875 {
876 "message": "A String", # [Output Only] An optional, human-readable error message.
877 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700878 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700879 },
880 ],
881 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800882 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700883 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700884 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700885 }</pre>
886</div>
887
888<div class="method">
889 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800890 <pre>Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.
Takashi Matsuo06694102015-09-11 13:55:40 -0700891
892Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800893 project: string, Project ID for this request. (required)
894 zone: string, The name of the zone where the managed instance group is located. (required)
895 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700896 body: object, The request body. (required)
897 The object takes the form of:
898
899{
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800900 "targetPools": [ # The list of target pool URLs that instances in this managed instance group belong to. The managed instance group applies these target pools to all of the instances in the group. Existing instances and new instances in the group all receive these target pool settings.
Takashi Matsuo06694102015-09-11 13:55:40 -0700901 "A String",
902 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800903 "fingerprint": "A String", # The fingerprint of the target pools information. Use this optional property to prevent conflicts when multiple users change the target pools settings concurrently. Obtain the fingerprint with the instanceGroupManagers.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700904 }
905
906
907Returns:
908 An object of the form:
909
910 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800911 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
912 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700913 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800914 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
915 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
916 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
917 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700918 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800919 "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.
920 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Takashi Matsuo06694102015-09-11 13:55:40 -0700921 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800922 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
923 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700924 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
925 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800926 "message": "A String", # [Output Only] A human-readable description of the warning code.
927 "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.
928 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
929 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700930 {
931 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700932 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Takashi Matsuo06694102015-09-11 13:55:40 -0700933 },
934 ],
935 },
936 ],
937 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800938 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
939 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700940 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800941 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700942 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
943 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
944 {
945 "message": "A String", # [Output Only] An optional, human-readable error message.
946 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700947 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700948 },
949 ],
950 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800951 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700952 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700953 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700954 }</pre>
955</div>
956
957</body></html>