1 <html><body> 2 <style> 3 4 body, 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 15 body { 16 font-size: 13px; 17 padding: 1em; 18 } 19 20 h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23 } 24 25 h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28 } 29 30 h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34 } 35 36 pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39 } 40 41 pre { 42 margin-top: 0.5em; 43 } 44 45 h1, h2, h3, p { 46 font-family: Arial, sans serif; 47 } 48 49 h1, 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_beta.html">Compute Engine API</a> . <a href="compute_beta.instanceGroupManagers.html">instanceGroupManagers</a></h1> 76 <h2>Instance Methods</h2> 77 <p class="toc_element"> 78 <code><a href="#abandonInstances">abandonInstances(project, zone, instanceGroupManager, body)</a></code></p> 79 <p class="firstline">Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.</p> 80 <p class="toc_element"> 81 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 82 <p class="firstline">Retrieves the list of managed instance groups and groups them by zone.</p> 83 <p class="toc_element"> 84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p> 85 <p class="firstline">Retrieves the next page of results.</p> 86 <p class="toc_element"> 87 <code><a href="#delete">delete(project, zone, instanceGroupManager)</a></code></p> 88 <p class="firstline">Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.</p> 89 <p class="toc_element"> 90 <code><a href="#deleteInstances">deleteInstances(project, zone, instanceGroupManager, body)</a></code></p> 91 <p class="firstline">Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.</p> 92 <p class="toc_element"> 93 <code><a href="#get">get(project, zone, instanceGroupManager)</a></code></p> 94 <p class="firstline">Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.</p> 95 <p class="toc_element"> 96 <code><a href="#insert">insert(project, zone, body)</a></code></p> 97 <p class="firstline">Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.</p> 98 <p class="toc_element"> 99 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 100 <p class="firstline">Retrieves a list of managed instance groups that are contained within the specified project and zone.</p> 101 <p class="toc_element"> 102 <code><a href="#listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 103 <p class="firstline">Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.</p> 104 <p class="toc_element"> 105 <code><a href="#listManagedInstances_next">listManagedInstances_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="#list_next">list_next(previous_request, previous_response)</a></code></p> 109 <p class="firstline">Retrieves the next page of results.</p> 110 <p class="toc_element"> 111 <code><a href="#patch">patch(project, zone, instanceGroupManager, body)</a></code></p> 112 <p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports patch semantics.</p> 113 <p class="toc_element"> 114 <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body)</a></code></p> 115 <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> 116 <p class="toc_element"> 117 <code><a href="#resize">resize(project, zone, instanceGroupManager, size)</a></code></p> 118 <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> 119 <p class="toc_element"> 120 <code><a href="#resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body)</a></code></p> 121 <p class="firstline">Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.</p> 122 <p class="toc_element"> 123 <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body)</a></code></p> 124 <p class="firstline">Modifies the autohealing policies.</p> 125 <p class="toc_element"> 126 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body)</a></code></p> 127 <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> 128 <p class="toc_element"> 129 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body)</a></code></p> 130 <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> 131 <p class="toc_element"> 132 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p> 133 <p class="firstline">Returns permissions that a caller has on the specified resource.</p> 134 <p class="toc_element"> 135 <code><a href="#update">update(project, zone, instanceGroupManager, body)</a></code></p> 136 <p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.</p> 137 <h3>Method Details</h3> 138 <div class="method"> 139 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body)</code> 140 <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. 141 142 If 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. 143 144 You can specify a maximum of 1000 instances with this method per request. 145 146 Args: 147 project: string, Project ID for this request. (required) 148 zone: string, The name of the zone where the managed instance group is located. (required) 149 instanceGroupManager: string, The name of the managed instance group. (required) 150 body: object, The request body. (required) 151 The object takes the form of: 152 153 { 154 "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]. 155 "A String", 156 ], 157 } 158 159 160 Returns: 161 An object of the form: 162 163 { # An Operation resource, used to manage asynchronous API requests. 164 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 165 "clientOperationId": "A String", # [Output Only] Reserved for future use. 166 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 167 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 168 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 169 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 170 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 171 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 172 "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. 173 "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. 174 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 175 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 176 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 177 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 178 { 179 "message": "A String", # [Output Only] A human-readable description of the warning code. 180 "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. 181 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 182 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 183 { 184 "value": "A String", # [Output Only] A warning data value corresponding to the key. 185 "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). 186 }, 187 ], 188 }, 189 ], 190 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 191 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 192 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 193 "name": "A String", # [Output Only] Name of the resource. 194 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 195 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 196 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 197 { 198 "message": "A String", # [Output Only] An optional, human-readable error message. 199 "code": "A String", # [Output Only] The error type identifier for this error. 200 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 201 }, 202 ], 203 }, 204 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 205 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 206 "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. 207 }</pre> 208 </div> 209 210 <div class="method"> 211 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 212 <pre>Retrieves the list of managed instance groups and groups them by zone. 213 214 Args: 215 project: string, Project ID for this request. (required) 216 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 217 218 You 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. 219 220 Currently, only sorting by name or creationTimestamp desc is supported. 221 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) 222 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. 223 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. 224 225 The 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. 226 227 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. 228 229 You 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. 230 231 To 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. 232 233 Returns: 234 An object of the form: 235 236 { 237 "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. 238 "items": { # [Output Only] A map of filtered managed instance group lists. 239 "a_key": { # [Output Only] The name of the scope that contains this set of managed instance groups. 240 "warning": { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty. 241 "message": "A String", # [Output Only] A human-readable description of the warning code. 242 "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. 243 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 244 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 245 { 246 "value": "A String", # [Output Only] A warning data value corresponding to the key. 247 "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). 248 }, 249 ], 250 }, 251 "instanceGroupManagers": [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone. 252 { # An Instance Group Manager resource. 253 "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. 254 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 255 "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. 256 "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. 257 # 258 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. 259 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 260 "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. 261 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 262 "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. 263 "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. 264 }, 265 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 266 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). 267 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 268 { 269 "healthCheck": "A String", # The URL for the health check that signals autohealing. 270 "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600]. 271 }, 272 ], 273 "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. 274 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER. 275 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 276 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used. 277 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 278 "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. 279 "A String", 280 ], 281 "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. 282 "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. 283 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 284 "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. 285 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 286 { # The named port. For example: . 287 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 288 "port": 42, # The port number, which can be a value between 1 and 65535. 289 }, 290 ], 291 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 292 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 293 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 294 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 295 }, 296 ], 297 }, 298 }, 299 "kind": "compute#instanceGroupManagerAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups. 300 "id": "A String", # [Output Only] A unique identifier for this aggregated list of managed instance groups. The server generates this identifier. 301 "selfLink": "A String", # [Output Only] The URL for this resource type. The server generates this URL. 302 }</pre> 303 </div> 304 305 <div class="method"> 306 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code> 307 <pre>Retrieves the next page of results. 308 309 Args: 310 previous_request: The request for the previous page. (required) 311 previous_response: The response from the request for the previous page. (required) 312 313 Returns: 314 A request object that you can call 'execute()' on to request the next 315 page. Returns None if there are no more items in the collection. 316 </pre> 317 </div> 318 319 <div class="method"> 320 <code class="details" id="delete">delete(project, zone, instanceGroupManager)</code> 321 <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. 322 323 Args: 324 project: string, Project ID for this request. (required) 325 zone: string, The name of the zone where the managed instance group is located. (required) 326 instanceGroupManager: string, The name of the managed instance group to delete. (required) 327 328 Returns: 329 An object of the form: 330 331 { # An Operation resource, used to manage asynchronous API requests. 332 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 333 "clientOperationId": "A String", # [Output Only] Reserved for future use. 334 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 335 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 336 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 337 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 338 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 339 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 340 "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. 341 "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. 342 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 343 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 344 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 345 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 346 { 347 "message": "A String", # [Output Only] A human-readable description of the warning code. 348 "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. 349 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 350 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 351 { 352 "value": "A String", # [Output Only] A warning data value corresponding to the key. 353 "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). 354 }, 355 ], 356 }, 357 ], 358 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 359 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 360 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 361 "name": "A String", # [Output Only] Name of the resource. 362 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 363 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 364 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 365 { 366 "message": "A String", # [Output Only] An optional, human-readable error message. 367 "code": "A String", # [Output Only] The error type identifier for this error. 368 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 369 }, 370 ], 371 }, 372 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 373 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 374 "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. 375 }</pre> 376 </div> 377 378 <div class="method"> 379 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body)</code> 380 <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. 381 382 If 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. 383 384 You can specify a maximum of 1000 instances with this method per request. 385 386 Args: 387 project: string, Project ID for this request. (required) 388 zone: string, The name of the zone where the managed instance group is located. (required) 389 instanceGroupManager: string, The name of the managed instance group. (required) 390 body: object, The request body. (required) 391 The object takes the form of: 392 393 { 394 "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]. 395 "A String", 396 ], 397 } 398 399 400 Returns: 401 An object of the form: 402 403 { # An Operation resource, used to manage asynchronous API requests. 404 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 405 "clientOperationId": "A String", # [Output Only] Reserved for future use. 406 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 407 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 408 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 409 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 410 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 411 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 412 "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. 413 "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. 414 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 415 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 416 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 417 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 418 { 419 "message": "A String", # [Output Only] A human-readable description of the warning code. 420 "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. 421 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 422 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 423 { 424 "value": "A String", # [Output Only] A warning data value corresponding to the key. 425 "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). 426 }, 427 ], 428 }, 429 ], 430 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 431 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 432 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 433 "name": "A String", # [Output Only] Name of the resource. 434 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 435 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 436 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 437 { 438 "message": "A String", # [Output Only] An optional, human-readable error message. 439 "code": "A String", # [Output Only] The error type identifier for this error. 440 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 441 }, 442 ], 443 }, 444 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 445 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 446 "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. 447 }</pre> 448 </div> 449 450 <div class="method"> 451 <code class="details" id="get">get(project, zone, instanceGroupManager)</code> 452 <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. 453 454 Args: 455 project: string, Project ID for this request. (required) 456 zone: string, The name of the zone where the managed instance group is located. (required) 457 instanceGroupManager: string, The name of the managed instance group. (required) 458 459 Returns: 460 An object of the form: 461 462 { # An Instance Group Manager resource. 463 "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. 464 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 465 "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. 466 "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. 467 # 468 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. 469 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 470 "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. 471 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 472 "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. 473 "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. 474 }, 475 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 476 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). 477 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 478 { 479 "healthCheck": "A String", # The URL for the health check that signals autohealing. 480 "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600]. 481 }, 482 ], 483 "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. 484 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER. 485 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 486 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used. 487 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 488 "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. 489 "A String", 490 ], 491 "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. 492 "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. 493 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 494 "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. 495 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 496 { # The named port. For example: . 497 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 498 "port": 42, # The port number, which can be a value between 1 and 65535. 499 }, 500 ], 501 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 502 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 503 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 504 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 505 }</pre> 506 </div> 507 508 <div class="method"> 509 <code class="details" id="insert">insert(project, zone, body)</code> 510 <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. 511 512 A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit. 513 514 Args: 515 project: string, Project ID for this request. (required) 516 zone: string, The name of the zone where you want to create the managed instance group. (required) 517 body: object, The request body. (required) 518 The object takes the form of: 519 520 { # An Instance Group Manager resource. 521 "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. 522 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 523 "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. 524 "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. 525 # 526 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. 527 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 528 "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. 529 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 530 "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. 531 "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. 532 }, 533 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 534 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). 535 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 536 { 537 "healthCheck": "A String", # The URL for the health check that signals autohealing. 538 "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600]. 539 }, 540 ], 541 "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. 542 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER. 543 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 544 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used. 545 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 546 "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. 547 "A String", 548 ], 549 "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. 550 "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. 551 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 552 "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. 553 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 554 { # The named port. For example: . 555 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 556 "port": 42, # The port number, which can be a value between 1 and 65535. 557 }, 558 ], 559 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 560 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 561 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 562 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 563 } 564 565 566 Returns: 567 An object of the form: 568 569 { # An Operation resource, used to manage asynchronous API requests. 570 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 571 "clientOperationId": "A String", # [Output Only] Reserved for future use. 572 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 573 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 574 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 575 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 576 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 577 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 578 "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. 579 "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. 580 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 581 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 582 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 583 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 584 { 585 "message": "A String", # [Output Only] A human-readable description of the warning code. 586 "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. 587 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 588 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 589 { 590 "value": "A String", # [Output Only] A warning data value corresponding to the key. 591 "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). 592 }, 593 ], 594 }, 595 ], 596 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 597 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 598 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 599 "name": "A String", # [Output Only] Name of the resource. 600 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 601 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 602 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 603 { 604 "message": "A String", # [Output Only] An optional, human-readable error message. 605 "code": "A String", # [Output Only] The error type identifier for this error. 606 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 607 }, 608 ], 609 }, 610 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 611 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 612 "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. 613 }</pre> 614 </div> 615 616 <div class="method"> 617 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 618 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone. 619 620 Args: 621 project: string, Project ID for this request. (required) 622 zone: string, The name of the zone where the managed instance group is located. (required) 623 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 624 625 You 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. 626 627 Currently, only sorting by name or creationTimestamp desc is supported. 628 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) 629 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. 630 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. 631 632 The 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. 633 634 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. 635 636 You 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. 637 638 To 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. 639 640 Returns: 641 An object of the form: 642 643 { # [Output Only] A list of managed instance groups. 644 "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. 645 "items": [ # [Output Only] A list of managed instance groups. 646 { # An Instance Group Manager resource. 647 "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. 648 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 649 "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. 650 "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. 651 # 652 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. 653 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 654 "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. 655 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 656 "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. 657 "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. 658 }, 659 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 660 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). 661 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 662 { 663 "healthCheck": "A String", # The URL for the health check that signals autohealing. 664 "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600]. 665 }, 666 ], 667 "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. 668 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER. 669 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 670 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used. 671 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 672 "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. 673 "A String", 674 ], 675 "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. 676 "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. 677 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 678 "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. 679 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 680 { # The named port. For example: . 681 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 682 "port": 42, # The port number, which can be a value between 1 and 65535. 683 }, 684 ], 685 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 686 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 687 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 688 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 689 }, 690 ], 691 "kind": "compute#instanceGroupManagerList", # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups. 692 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 693 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 694 }</pre> 695 </div> 696 697 <div class="method"> 698 <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</code> 699 <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. 700 701 Args: 702 project: string, Project ID for this request. (required) 703 zone: string, The name of the zone where the managed instance group is located. (required) 704 instanceGroupManager: string, The name of the managed instance group. (required) 705 order_by: string, A parameter 706 maxResults: integer, A parameter 707 pageToken: string, A parameter 708 filter: string, A parameter 709 710 Returns: 711 An object of the form: 712 713 { 714 "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. 715 "managedInstances": [ # [Output Only] The list of instances in the managed instance group. 716 { 717 "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist. 718 "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance. 719 "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance. 720 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 721 { 722 "message": "A String", # [Output Only] An optional, human-readable error message. 723 "code": "A String", # [Output Only] The error type identifier for this error. 724 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 725 }, 726 ], 727 }, 728 }, 729 "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created. 730 "version": { # [Output Only] Intended version of this instance. 731 "instanceTemplate": "A String", # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }. 732 "name": "A String", # [Output Only] Name of the version. 733 }, 734 "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values: 735 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance. 736 # - 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. 737 # - 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. 738 # - RECREATING The managed instance group is recreating this instance. 739 # - DELETING The managed instance group is permanently deleting this instance. 740 # - 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. 741 # - RESTARTING The managed instance group is restarting the instance. 742 # - 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. 743 "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist. 744 }, 745 ], 746 }</pre> 747 </div> 748 749 <div class="method"> 750 <code class="details" id="listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</code> 751 <pre>Retrieves the next page of results. 752 753 Args: 754 previous_request: The request for the previous page. (required) 755 previous_response: The response from the request for the previous page. (required) 756 757 Returns: 758 A request object that you can call 'execute()' on to request the next 759 page. Returns None if there are no more items in the collection. 760 </pre> 761 </div> 762 763 <div class="method"> 764 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 765 <pre>Retrieves the next page of results. 766 767 Args: 768 previous_request: The request for the previous page. (required) 769 previous_response: The response from the request for the previous page. (required) 770 771 Returns: 772 A request object that you can call 'execute()' on to request the next 773 page. Returns None if there are no more items in the collection. 774 </pre> 775 </div> 776 777 <div class="method"> 778 <code class="details" id="patch">patch(project, zone, instanceGroupManager, body)</code> 779 <pre>Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports patch semantics. 780 781 Args: 782 project: string, Project ID for this request. (required) 783 zone: string, The name of the zone where you want to create the managed instance group. (required) 784 instanceGroupManager: string, The name of the instance group manager. (required) 785 body: object, The request body. (required) 786 The object takes the form of: 787 788 { # An Instance Group Manager resource. 789 "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. 790 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 791 "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. 792 "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. 793 # 794 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. 795 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 796 "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. 797 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 798 "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. 799 "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. 800 }, 801 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 802 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). 803 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 804 { 805 "healthCheck": "A String", # The URL for the health check that signals autohealing. 806 "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600]. 807 }, 808 ], 809 "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. 810 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER. 811 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 812 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used. 813 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 814 "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. 815 "A String", 816 ], 817 "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. 818 "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. 819 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 820 "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. 821 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 822 { # The named port. For example: . 823 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 824 "port": 42, # The port number, which can be a value between 1 and 65535. 825 }, 826 ], 827 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 828 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 829 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 830 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 831 } 832 833 834 Returns: 835 An object of the form: 836 837 { # An Operation resource, used to manage asynchronous API requests. 838 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 839 "clientOperationId": "A String", # [Output Only] Reserved for future use. 840 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 841 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 842 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 843 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 844 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 845 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 846 "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. 847 "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. 848 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 849 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 850 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 851 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 852 { 853 "message": "A String", # [Output Only] A human-readable description of the warning code. 854 "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. 855 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 856 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 857 { 858 "value": "A String", # [Output Only] A warning data value corresponding to the key. 859 "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). 860 }, 861 ], 862 }, 863 ], 864 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 865 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 866 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 867 "name": "A String", # [Output Only] Name of the resource. 868 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 869 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 870 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 871 { 872 "message": "A String", # [Output Only] An optional, human-readable error message. 873 "code": "A String", # [Output Only] The error type identifier for this error. 874 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 875 }, 876 ], 877 }, 878 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 879 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 880 "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. 881 }</pre> 882 </div> 883 884 <div class="method"> 885 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body)</code> 886 <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. 887 888 If 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. 889 890 You can specify a maximum of 1000 instances with this method per request. 891 892 Args: 893 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) 896 body: object, The request body. (required) 897 The object takes the form of: 898 899 { 900 "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]. 901 "A String", 902 ], 903 } 904 905 906 Returns: 907 An object of the form: 908 909 { # An Operation resource, used to manage asynchronous API requests. 910 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 911 "clientOperationId": "A String", # [Output Only] Reserved for future use. 912 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 913 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 914 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 915 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 916 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 917 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 918 "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. 919 "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. 920 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 921 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 922 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 923 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 924 { 925 "message": "A String", # [Output Only] A human-readable description of the warning code. 926 "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. 927 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 928 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 929 { 930 "value": "A String", # [Output Only] A warning data value corresponding to the key. 931 "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). 932 }, 933 ], 934 }, 935 ], 936 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 937 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 938 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 939 "name": "A String", # [Output Only] Name of the resource. 940 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 941 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 942 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 943 { 944 "message": "A String", # [Output Only] An optional, human-readable error message. 945 "code": "A String", # [Output Only] The error type identifier for this error. 946 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 947 }, 948 ], 949 }, 950 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 951 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 952 "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. 953 }</pre> 954 </div> 955 956 <div class="method"> 957 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size)</code> 958 <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. 959 960 If 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. 961 962 Args: 963 project: string, Project ID for this request. (required) 964 zone: string, The name of the zone where the managed instance group is located. (required) 965 instanceGroupManager: string, The name of the managed instance group. (required) 966 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) 967 968 Returns: 969 An object of the form: 970 971 { # An Operation resource, used to manage asynchronous API requests. 972 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 973 "clientOperationId": "A String", # [Output Only] Reserved for future use. 974 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 975 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 976 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 977 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 978 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 979 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 980 "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. 981 "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. 982 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 983 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 984 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 985 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 986 { 987 "message": "A String", # [Output Only] A human-readable description of the warning code. 988 "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. 989 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 990 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 991 { 992 "value": "A String", # [Output Only] A warning data value corresponding to the key. 993 "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). 994 }, 995 ], 996 }, 997 ], 998 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 999 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1000 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1001 "name": "A String", # [Output Only] Name of the resource. 1002 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 1003 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1004 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1005 { 1006 "message": "A String", # [Output Only] An optional, human-readable error message. 1007 "code": "A String", # [Output Only] The error type identifier for this error. 1008 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1009 }, 1010 ], 1011 }, 1012 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1013 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1014 "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. 1015 }</pre> 1016 </div> 1017 1018 <div class="method"> 1019 <code class="details" id="resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body)</code> 1020 <pre>Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method. 1021 1022 If you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method. 1023 1024 If 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. 1025 1026 Args: 1027 project: string, Project ID for this request. (required) 1028 zone: string, The name of the zone where the managed instance group is located. (required) 1029 instanceGroupManager: string, The name of the managed instance group. (required) 1030 body: object, The request body. (required) 1031 The object takes the form of: 1032 1033 { 1034 "noCreationRetries": True or False, # If this flag is true, the managed instance group attempts to create all instances initiated by this resize request only once. If there is an error during creation, the managed instance group does not retry create this instance, and we will decrease the targetSize of the request instead. If the flag is false, the group attemps to recreate each instance continuously until it succeeds. 1035 # 1036 # This flag matters only in the first attempt of creation of an instance. After an instance is successfully created while this flag is enabled, the instance behaves the same way as all the other instances created with a regular resize request. In particular, if a running instance dies unexpectedly at a later time and needs to be recreated, this mode does not affect the recreation behavior in that scenario. 1037 # 1038 # This flag is applicable only to the current resize request. It does not influence other resize requests in any way. 1039 # 1040 # You can see which instances is being creating in which mode by calling the get or listManagedInstances API. 1041 "targetSize": 42, # The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter. 1042 } 1043 1044 1045 Returns: 1046 An object of the form: 1047 1048 { # An Operation resource, used to manage asynchronous API requests. 1049 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1050 "clientOperationId": "A String", # [Output Only] Reserved for future use. 1051 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1052 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1053 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 1054 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1055 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1056 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1057 "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. 1058 "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. 1059 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1060 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1061 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1062 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1063 { 1064 "message": "A String", # [Output Only] A human-readable description of the warning code. 1065 "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. 1066 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1067 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1068 { 1069 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1070 "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). 1071 }, 1072 ], 1073 }, 1074 ], 1075 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 1076 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1077 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1078 "name": "A String", # [Output Only] Name of the resource. 1079 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 1080 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1081 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1082 { 1083 "message": "A String", # [Output Only] An optional, human-readable error message. 1084 "code": "A String", # [Output Only] The error type identifier for this error. 1085 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1086 }, 1087 ], 1088 }, 1089 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1090 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1091 "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. 1092 }</pre> 1093 </div> 1094 1095 <div class="method"> 1096 <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body)</code> 1097 <pre>Modifies the autohealing policies. 1098 1099 Args: 1100 project: string, Project ID for this request. (required) 1101 zone: string, The name of the zone where the managed instance group is located. (required) 1102 instanceGroupManager: string, The name of the instance group manager. (required) 1103 body: object, The request body. (required) 1104 The object takes the form of: 1105 1106 { 1107 "autoHealingPolicies": [ 1108 { 1109 "healthCheck": "A String", # The URL for the health check that signals autohealing. 1110 "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600]. 1111 }, 1112 ], 1113 } 1114 1115 1116 Returns: 1117 An object of the form: 1118 1119 { # An Operation resource, used to manage asynchronous API requests. 1120 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1121 "clientOperationId": "A String", # [Output Only] Reserved for future use. 1122 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1123 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1124 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 1125 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1126 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1127 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1128 "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. 1129 "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. 1130 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1131 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1132 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1133 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1134 { 1135 "message": "A String", # [Output Only] A human-readable description of the warning code. 1136 "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. 1137 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1138 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1139 { 1140 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1141 "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). 1142 }, 1143 ], 1144 }, 1145 ], 1146 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 1147 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1148 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1149 "name": "A String", # [Output Only] Name of the resource. 1150 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 1151 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1152 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1153 { 1154 "message": "A String", # [Output Only] An optional, human-readable error message. 1155 "code": "A String", # [Output Only] The error type identifier for this error. 1156 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1157 }, 1158 ], 1159 }, 1160 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1161 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1162 "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. 1163 }</pre> 1164 </div> 1165 1166 <div class="method"> 1167 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body)</code> 1168 <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. 1169 1170 Args: 1171 project: string, Project ID for this request. (required) 1172 zone: string, The name of the zone where the managed instance group is located. (required) 1173 instanceGroupManager: string, The name of the managed instance group. (required) 1174 body: object, The request body. (required) 1175 The object takes the form of: 1176 1177 { 1178 "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. 1179 } 1180 1181 1182 Returns: 1183 An object of the form: 1184 1185 { # An Operation resource, used to manage asynchronous API requests. 1186 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1187 "clientOperationId": "A String", # [Output Only] Reserved for future use. 1188 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1189 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1190 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 1191 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1192 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1193 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1194 "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. 1195 "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. 1196 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1197 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1198 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1199 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1200 { 1201 "message": "A String", # [Output Only] A human-readable description of the warning code. 1202 "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. 1203 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1204 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1205 { 1206 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1207 "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). 1208 }, 1209 ], 1210 }, 1211 ], 1212 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 1213 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1214 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1215 "name": "A String", # [Output Only] Name of the resource. 1216 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 1217 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1218 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1219 { 1220 "message": "A String", # [Output Only] An optional, human-readable error message. 1221 "code": "A String", # [Output Only] The error type identifier for this error. 1222 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1223 }, 1224 ], 1225 }, 1226 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1227 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1228 "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. 1229 }</pre> 1230 </div> 1231 1232 <div class="method"> 1233 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body)</code> 1234 <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. 1235 1236 Args: 1237 project: string, Project ID for this request. (required) 1238 zone: string, The name of the zone where the managed instance group is located. (required) 1239 instanceGroupManager: string, The name of the managed instance group. (required) 1240 body: object, The request body. (required) 1241 The object takes the form of: 1242 1243 { 1244 "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. 1245 "A String", 1246 ], 1247 "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. 1248 } 1249 1250 1251 Returns: 1252 An object of the form: 1253 1254 { # An Operation resource, used to manage asynchronous API requests. 1255 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1256 "clientOperationId": "A String", # [Output Only] Reserved for future use. 1257 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1258 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1259 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 1260 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1261 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1262 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1263 "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. 1264 "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. 1265 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1266 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1267 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1268 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1269 { 1270 "message": "A String", # [Output Only] A human-readable description of the warning code. 1271 "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. 1272 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1273 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1274 { 1275 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1276 "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). 1277 }, 1278 ], 1279 }, 1280 ], 1281 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 1282 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1283 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1284 "name": "A String", # [Output Only] Name of the resource. 1285 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 1286 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1287 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1288 { 1289 "message": "A String", # [Output Only] An optional, human-readable error message. 1290 "code": "A String", # [Output Only] The error type identifier for this error. 1291 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1292 }, 1293 ], 1294 }, 1295 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1296 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1297 "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. 1298 }</pre> 1299 </div> 1300 1301 <div class="method"> 1302 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code> 1303 <pre>Returns permissions that a caller has on the specified resource. 1304 1305 Args: 1306 project: string, Project ID for this request. (required) 1307 zone: string, The name of the zone for this request. (required) 1308 resource: string, Name of the resource for this request. (required) 1309 body: object, The request body. (required) 1310 The object takes the form of: 1311 1312 { 1313 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. 1314 "A String", 1315 ], 1316 } 1317 1318 1319 Returns: 1320 An object of the form: 1321 1322 { 1323 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. 1324 "A String", 1325 ], 1326 }</pre> 1327 </div> 1328 1329 <div class="method"> 1330 <code class="details" id="update">update(project, zone, instanceGroupManager, body)</code> 1331 <pre>Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method. 1332 1333 Args: 1334 project: string, Project ID for this request. (required) 1335 zone: string, The name of the zone where you want to create the managed instance group. (required) 1336 instanceGroupManager: string, The name of the instance group manager. (required) 1337 body: object, The request body. (required) 1338 The object takes the form of: 1339 1340 { # An Instance Group Manager resource. 1341 "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. 1342 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 1343 "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. 1344 "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. 1345 # 1346 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. 1347 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 1348 "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. 1349 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 1350 "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. 1351 "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. 1352 }, 1353 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 1354 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). 1355 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 1356 { 1357 "healthCheck": "A String", # The URL for the health check that signals autohealing. 1358 "initialDelaySec": 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600]. 1359 }, 1360 ], 1361 "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. 1362 "failoverAction": "A String", # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER. 1363 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 1364 "serviceAccount": "A String", # Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used. 1365 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 1366 "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. 1367 "A String", 1368 ], 1369 "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. 1370 "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. 1371 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 1372 "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. 1373 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 1374 { # The named port. For example: . 1375 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 1376 "port": 42, # The port number, which can be a value between 1 and 65535. 1377 }, 1378 ], 1379 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 1380 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 1381 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 1382 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 1383 } 1384 1385 1386 Returns: 1387 An object of the form: 1388 1389 { # An Operation resource, used to manage asynchronous API requests. 1390 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1391 "clientOperationId": "A String", # [Output Only] Reserved for future use. 1392 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1393 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1394 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 1395 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1396 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1397 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1398 "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. 1399 "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. 1400 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1401 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1402 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1403 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1404 { 1405 "message": "A String", # [Output Only] A human-readable description of the warning code. 1406 "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. 1407 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1408 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1409 { 1410 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1411 "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). 1412 }, 1413 ], 1414 }, 1415 ], 1416 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 1417 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1418 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1419 "name": "A String", # [Output Only] Name of the resource. 1420 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 1421 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1422 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1423 { 1424 "message": "A String", # [Output Only] An optional, human-readable error message. 1425 "code": "A String", # [Output Only] The error type identifier for this error. 1426 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1427 }, 1428 ], 1429 }, 1430 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1431 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1432 "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. 1433 }</pre> 1434 </div> 1435 1436 </body></html>