1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.regionInstanceGroupManagers.html">regionInstanceGroupManagers</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#abandonInstances">abandonInstances(project, region, instanceGroupManager, body)</a></code></p> 79<p class="firstline">Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.</p> 80<p class="toc_element"> 81 <code><a href="#delete">delete(project, region, instanceGroupManager)</a></code></p> 82<p class="firstline">Deletes the specified managed instance group and all of the instances in that group.</p> 83<p class="toc_element"> 84 <code><a href="#deleteInstances">deleteInstances(project, region, instanceGroupManager, body)</a></code></p> 85<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> 86<p class="toc_element"> 87 <code><a href="#get">get(project, region, instanceGroupManager)</a></code></p> 88<p class="firstline">Returns all of the details about the specified managed instance group.</p> 89<p class="toc_element"> 90 <code><a href="#insert">insert(project, region, body)</a></code></p> 91<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> 92<p class="toc_element"> 93 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 94<p class="firstline">Retrieves the list of managed instance groups that are contained within the specified region.</p> 95<p class="toc_element"> 96 <code><a href="#listManagedInstances">listManagedInstances(project, region, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 97<p class="firstline">Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.</p> 98<p class="toc_element"> 99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 100<p class="firstline">Retrieves the next page of results.</p> 101<p class="toc_element"> 102 <code><a href="#recreateInstances">recreateInstances(project, region, instanceGroupManager, body)</a></code></p> 103<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> 104<p class="toc_element"> 105 <code><a href="#resize">resize(project, region, instanceGroupManager, size)</a></code></p> 106<p class="firstline">Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the current instance template. If you decrease the size, the group schedules delete actions on one or more 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> 107<p class="toc_element"> 108 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, region, instanceGroupManager, body)</a></code></p> 109<p class="firstline">Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.</p> 110<p class="toc_element"> 111 <code><a href="#setTargetPools">setTargetPools(project, region, instanceGroupManager, body)</a></code></p> 112<p class="firstline">Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.</p> 113<h3>Method Details</h3> 114<div class="method"> 115 <code class="details" id="abandonInstances">abandonInstances(project, region, instanceGroupManager, body)</code> 116 <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. 117 118If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. 119 120You can specify a maximum of 1000 instances with this method per request. 121 122Args: 123 project: string, Project ID for this request. (required) 124 region: string, Name of the region scoping this request. (required) 125 instanceGroupManager: string, Name of the managed instance group. (required) 126 body: object, The request body. (required) 127 The object takes the form of: 128 129{ 130 "instances": [ # The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. 131 "A String", 132 ], 133 } 134 135 136Returns: 137 An object of the form: 138 139 { # An Operation resource, used to manage asynchronous API requests. 140 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 141 "clientOperationId": "A String", # [Output Only] Reserved for future use. 142 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 143 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 144 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 145 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 146 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 147 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 148 "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. 149 "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. 150 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 151 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 152 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 153 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 154 { 155 "message": "A String", # [Output Only] A human-readable description of the warning code. 156 "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. 157 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 158 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 159 { 160 "value": "A String", # [Output Only] A warning data value corresponding to the key. 161 "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). 162 }, 163 ], 164 }, 165 ], 166 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 167 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 168 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 169 "name": "A String", # [Output Only] Name of the resource. 170 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 171 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 172 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 173 { 174 "message": "A String", # [Output Only] An optional, human-readable error message. 175 "code": "A String", # [Output Only] The error type identifier for this error. 176 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 177 }, 178 ], 179 }, 180 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 181 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 182 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 183 }</pre> 184</div> 185 186<div class="method"> 187 <code class="details" id="delete">delete(project, region, instanceGroupManager)</code> 188 <pre>Deletes the specified managed instance group and all of the instances in that group. 189 190Args: 191 project: string, Project ID for this request. (required) 192 region: string, Name of the region scoping this request. (required) 193 instanceGroupManager: string, Name of the managed instance group to delete. (required) 194 195Returns: 196 An object of the form: 197 198 { # An Operation resource, used to manage asynchronous API requests. 199 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 200 "clientOperationId": "A String", # [Output Only] Reserved for future use. 201 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 202 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 203 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 204 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 205 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 206 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 207 "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. 208 "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. 209 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 210 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 211 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 212 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 213 { 214 "message": "A String", # [Output Only] A human-readable description of the warning code. 215 "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. 216 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 217 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 218 { 219 "value": "A String", # [Output Only] A warning data value corresponding to the key. 220 "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). 221 }, 222 ], 223 }, 224 ], 225 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 226 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 227 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 228 "name": "A String", # [Output Only] Name of the resource. 229 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 230 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 231 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 232 { 233 "message": "A String", # [Output Only] An optional, human-readable error message. 234 "code": "A String", # [Output Only] The error type identifier for this error. 235 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 236 }, 237 ], 238 }, 239 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 240 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 241 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 242 }</pre> 243</div> 244 245<div class="method"> 246 <code class="details" id="deleteInstances">deleteInstances(project, region, instanceGroupManager, body)</code> 247 <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. 248 249If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. 250 251You can specify a maximum of 1000 instances with this method per request. 252 253Args: 254 project: string, Project ID for this request. (required) 255 region: string, Name of the region scoping this request. (required) 256 instanceGroupManager: string, Name of the managed instance group. (required) 257 body: object, The request body. (required) 258 The object takes the form of: 259 260{ 261 "instances": [ # The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. 262 "A String", 263 ], 264 } 265 266 267Returns: 268 An object of the form: 269 270 { # An Operation resource, used to manage asynchronous API requests. 271 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 272 "clientOperationId": "A String", # [Output Only] Reserved for future use. 273 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 274 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 275 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 276 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 277 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 278 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 279 "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. 280 "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. 281 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 282 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 283 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 284 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 285 { 286 "message": "A String", # [Output Only] A human-readable description of the warning code. 287 "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. 288 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 289 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 290 { 291 "value": "A String", # [Output Only] A warning data value corresponding to the key. 292 "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). 293 }, 294 ], 295 }, 296 ], 297 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 298 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 299 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 300 "name": "A String", # [Output Only] Name of the resource. 301 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 302 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 303 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 304 { 305 "message": "A String", # [Output Only] An optional, human-readable error message. 306 "code": "A String", # [Output Only] The error type identifier for this error. 307 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 308 }, 309 ], 310 }, 311 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 312 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 313 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 314 }</pre> 315</div> 316 317<div class="method"> 318 <code class="details" id="get">get(project, region, instanceGroupManager)</code> 319 <pre>Returns all of the details about the specified managed instance group. 320 321Args: 322 project: string, Project ID for this request. (required) 323 region: string, Name of the region scoping this request. (required) 324 instanceGroupManager: string, Name of the managed instance group to return. (required) 325 326Returns: 327 An object of the form: 328 329 { # An Instance Group Manager resource. 330 "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. 331 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 332 "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. 333 "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. 334 # 335 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. 336 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 337 "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. 338 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 339 "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. 340 "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. 341 }, 342 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 343 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). 344 "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. 345 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 346 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 347 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 348 "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. 349 "A String", 350 ], 351 "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. 352 "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. 353 "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. 354 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 355 { # The named port. For example: . 356 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 357 "port": 42, # The port number, which can be a value between 1 and 65535. 358 }, 359 ], 360 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 361 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 362 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 363 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 364 }</pre> 365</div> 366 367<div class="method"> 368 <code class="details" id="insert">insert(project, region, body)</code> 369 <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. 370 371A regional managed instance group can contain up to 2000 instances. 372 373Args: 374 project: string, Project ID for this request. (required) 375 region: string, Name of the region scoping this request. (required) 376 body: object, The request body. (required) 377 The object takes the form of: 378 379{ # An Instance Group Manager resource. 380 "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. 381 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 382 "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. 383 "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. 384 # 385 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. 386 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 387 "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. 388 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 389 "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. 390 "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. 391 }, 392 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 393 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). 394 "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. 395 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 396 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 397 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 398 "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. 399 "A String", 400 ], 401 "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. 402 "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. 403 "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. 404 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 405 { # The named port. For example: . 406 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 407 "port": 42, # The port number, which can be a value between 1 and 65535. 408 }, 409 ], 410 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 411 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 412 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 413 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 414 } 415 416 417Returns: 418 An object of the form: 419 420 { # An Operation resource, used to manage asynchronous API requests. 421 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 422 "clientOperationId": "A String", # [Output Only] Reserved for future use. 423 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 424 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 425 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 426 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 427 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 428 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 429 "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. 430 "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. 431 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 432 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 433 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 434 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 435 { 436 "message": "A String", # [Output Only] A human-readable description of the warning code. 437 "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. 438 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 439 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 440 { 441 "value": "A String", # [Output Only] A warning data value corresponding to the key. 442 "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). 443 }, 444 ], 445 }, 446 ], 447 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 448 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 449 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 450 "name": "A String", # [Output Only] Name of the resource. 451 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 452 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 453 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 454 { 455 "message": "A String", # [Output Only] An optional, human-readable error message. 456 "code": "A String", # [Output Only] The error type identifier for this error. 457 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 458 }, 459 ], 460 }, 461 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 462 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 463 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 464 }</pre> 465</div> 466 467<div class="method"> 468 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 469 <pre>Retrieves the list of managed instance groups that are contained within the specified region. 470 471Args: 472 project: string, Project ID for this request. (required) 473 region: string, Name of the region scoping this request. (required) 474 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 475 476You 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. 477 478Currently, only sorting by name or creationTimestamp desc is supported. 479 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) 480 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. 481 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. 482 483The 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. 484 485For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. 486 487You 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. 488 489To 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. 490 491Returns: 492 An object of the form: 493 494 { # Contains a list of managed instance groups. 495 "nextPageToken": "A String", # [Output only] A token used to continue a truncated list request. 496 "items": [ # A list of managed instance groups. 497 { # An Instance Group Manager resource. 498 "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. 499 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 500 "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. 501 "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. 502 # 503 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. 504 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 505 "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. 506 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 507 "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. 508 "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. 509 }, 510 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 511 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). 512 "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. 513 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 514 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 515 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 516 "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. 517 "A String", 518 ], 519 "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. 520 "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. 521 "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. 522 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 523 { # The named port. For example: . 524 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 525 "port": 42, # The port number, which can be a value between 1 and 65535. 526 }, 527 ], 528 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 529 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 530 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 531 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 532 }, 533 ], 534 "kind": "compute#regionInstanceGroupManagerList", # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups that exist in th regional scope. 535 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 536 "selfLink": "A String", # [Output only] The URL for this resource type. The server generates this URL. 537 }</pre> 538</div> 539 540<div class="method"> 541 <code class="details" id="listManagedInstances">listManagedInstances(project, region, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</code> 542 <pre>Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. 543 544Args: 545 project: string, Project ID for this request. (required) 546 region: string, Name of the region scoping this request. (required) 547 instanceGroupManager: string, The name of the managed instance group. (required) 548 order_by: string, A parameter 549 maxResults: integer, A parameter 550 pageToken: string, A parameter 551 filter: string, A parameter 552 553Returns: 554 An object of the form: 555 556 { 557 "managedInstances": [ # List of managed instances. 558 { 559 "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values: 560 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance. 561 # - 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. 562 # - 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. 563 # - RECREATING The managed instance group is recreating this instance. 564 # - DELETING The managed instance group is permanently deleting this instance. 565 # - 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. 566 # - RESTARTING The managed instance group is restarting the instance. 567 # - 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. 568 "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created. 569 "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance. 570 "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance. 571 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 572 { 573 "message": "A String", # [Output Only] An optional, human-readable error message. 574 "code": "A String", # [Output Only] The error type identifier for this error. 575 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 576 }, 577 ], 578 }, 579 }, 580 "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist. 581 "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist. 582 }, 583 ], 584 }</pre> 585</div> 586 587<div class="method"> 588 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 589 <pre>Retrieves the next page of results. 590 591Args: 592 previous_request: The request for the previous page. (required) 593 previous_response: The response from the request for the previous page. (required) 594 595Returns: 596 A request object that you can call 'execute()' on to request the next 597 page. Returns None if there are no more items in the collection. 598 </pre> 599</div> 600 601<div class="method"> 602 <code class="details" id="recreateInstances">recreateInstances(project, region, instanceGroupManager, body)</code> 603 <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. 604 605If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. 606 607You can specify a maximum of 1000 instances with this method per request. 608 609Args: 610 project: string, Project ID for this request. (required) 611 region: string, Name of the region scoping this request. (required) 612 instanceGroupManager: string, Name of the managed instance group. (required) 613 body: object, The request body. (required) 614 The object takes the form of: 615 616{ 617 "instances": [ # The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. 618 "A String", 619 ], 620 } 621 622 623Returns: 624 An object of the form: 625 626 { # An Operation resource, used to manage asynchronous API requests. 627 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 628 "clientOperationId": "A String", # [Output Only] Reserved for future use. 629 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 630 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 631 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 632 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 633 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 634 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 635 "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. 636 "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. 637 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 638 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 639 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 640 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 641 { 642 "message": "A String", # [Output Only] A human-readable description of the warning code. 643 "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. 644 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 645 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 646 { 647 "value": "A String", # [Output Only] A warning data value corresponding to the key. 648 "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). 649 }, 650 ], 651 }, 652 ], 653 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 654 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 655 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 656 "name": "A String", # [Output Only] Name of the resource. 657 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 658 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 659 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 660 { 661 "message": "A String", # [Output Only] An optional, human-readable error message. 662 "code": "A String", # [Output Only] The error type identifier for this error. 663 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 664 }, 665 ], 666 }, 667 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 668 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 669 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 670 }</pre> 671</div> 672 673<div class="method"> 674 <code class="details" id="resize">resize(project, region, instanceGroupManager, size)</code> 675 <pre>Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the current instance template. If you decrease the size, the group schedules delete actions on one or more 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. 676 677If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. 678 679Args: 680 project: string, Project ID for this request. (required) 681 region: string, Name of the region scoping this request. (required) 682 instanceGroupManager: string, Name of the managed instance group. (required) 683 size: integer, Number of instances that should exist in this instance group manager. (required) 684 685Returns: 686 An object of the form: 687 688 { # An Operation resource, used to manage asynchronous API requests. 689 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 690 "clientOperationId": "A String", # [Output Only] Reserved for future use. 691 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 692 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 693 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 694 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 695 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 696 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 697 "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. 698 "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. 699 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 700 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 701 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 702 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 703 { 704 "message": "A String", # [Output Only] A human-readable description of the warning code. 705 "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. 706 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 707 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 708 { 709 "value": "A String", # [Output Only] A warning data value corresponding to the key. 710 "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). 711 }, 712 ], 713 }, 714 ], 715 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 716 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 717 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 718 "name": "A String", # [Output Only] Name of the resource. 719 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 720 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 721 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 722 { 723 "message": "A String", # [Output Only] An optional, human-readable error message. 724 "code": "A String", # [Output Only] The error type identifier for this error. 725 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 726 }, 727 ], 728 }, 729 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 730 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 731 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 732 }</pre> 733</div> 734 735<div class="method"> 736 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, region, instanceGroupManager, body)</code> 737 <pre>Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected. 738 739Args: 740 project: string, Project ID for this request. (required) 741 region: string, Name of the region scoping this request. (required) 742 instanceGroupManager: string, The name of the managed instance group. (required) 743 body: object, The request body. (required) 744 The object takes the form of: 745 746{ 747 "instanceTemplate": "A String", # URL of the InstanceTemplate resource from which all new instances will be created. 748 } 749 750 751Returns: 752 An object of the form: 753 754 { # An Operation resource, used to manage asynchronous API requests. 755 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 756 "clientOperationId": "A String", # [Output Only] Reserved for future use. 757 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 758 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 759 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 760 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 761 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 762 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 763 "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. 764 "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. 765 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 766 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 767 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 768 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 769 { 770 "message": "A String", # [Output Only] A human-readable description of the warning code. 771 "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. 772 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 773 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 774 { 775 "value": "A String", # [Output Only] A warning data value corresponding to the key. 776 "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). 777 }, 778 ], 779 }, 780 ], 781 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 782 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 783 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 784 "name": "A String", # [Output Only] Name of the resource. 785 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 786 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 787 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 788 { 789 "message": "A String", # [Output Only] An optional, human-readable error message. 790 "code": "A String", # [Output Only] The error type identifier for this error. 791 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 792 }, 793 ], 794 }, 795 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 796 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 797 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 798 }</pre> 799</div> 800 801<div class="method"> 802 <code class="details" id="setTargetPools">setTargetPools(project, region, instanceGroupManager, body)</code> 803 <pre>Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected. 804 805Args: 806 project: string, Project ID for this request. (required) 807 region: string, Name of the region scoping this request. (required) 808 instanceGroupManager: string, Name of the managed instance group. (required) 809 body: object, The request body. (required) 810 The object takes the form of: 811 812{ 813 "targetPools": [ # The URL of 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. 814 "A String", 815 ], 816 "fingerprint": "A String", # Fingerprint of the target pools information, which is a hash of the contents. This field is used for optimistic locking when you update the target pool entries. This field is optional. 817 } 818 819 820Returns: 821 An object of the form: 822 823 { # An Operation resource, used to manage asynchronous API requests. 824 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 825 "clientOperationId": "A String", # [Output Only] Reserved for future use. 826 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 827 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 828 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 829 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 830 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 831 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 832 "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. 833 "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. 834 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 835 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 836 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 837 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 838 { 839 "message": "A String", # [Output Only] A human-readable description of the warning code. 840 "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. 841 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 842 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 843 { 844 "value": "A String", # [Output Only] A warning data value corresponding to the key. 845 "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). 846 }, 847 ], 848 }, 849 ], 850 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 851 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 852 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 853 "name": "A String", # [Output Only] Name of the resource. 854 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 855 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 856 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 857 { 858 "message": "A String", # [Output Only] An optional, human-readable error message. 859 "code": "A String", # [Output Only] The error type identifier for this error. 860 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 861 }, 862 ], 863 }, 864 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 865 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 866 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 867 }</pre> 868</div> 869 870</body></html>