Home | History | Annotate | Download | only in dyn
      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_v1.html">Compute Engine API</a> . <a href="compute_v1.instanceGroupManagers.html">instanceGroupManagers</a></h1>
     76 <h2>Instance Methods</h2>
     77 <p class="toc_element">
     78   <code><a href="#abandonInstances">abandonInstances(project, zone, instanceGroupManager, body)</a></code></p>
     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="#list_next">list_next(previous_request, previous_response)</a></code></p>
    106 <p class="firstline">Retrieves the next page of results.</p>
    107 <p class="toc_element">
    108   <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body)</a></code></p>
    109 <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>
    110 <p class="toc_element">
    111   <code><a href="#resize">resize(project, zone, instanceGroupManager, size)</a></code></p>
    112 <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>
    113 <p class="toc_element">
    114   <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body)</a></code></p>
    115 <p class="firstline">Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.</p>
    116 <p class="toc_element">
    117   <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body)</a></code></p>
    118 <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>
    119 <h3>Method Details</h3>
    120 <div class="method">
    121     <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body)</code>
    122   <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.
    123 
    124 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.
    125 
    126 You can specify a maximum of 1000 instances with this method per request.
    127 
    128 Args:
    129   project: string, Project ID for this request. (required)
    130   zone: string, The name of the zone where the managed instance group is located. (required)
    131   instanceGroupManager: string, The name of the managed instance group. (required)
    132   body: object, The request body. (required)
    133     The object takes the form of:
    134 
    135 {
    136     "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].
    137       "A String",
    138     ],
    139   }
    140 
    141 
    142 Returns:
    143   An object of the form:
    144 
    145     { # An Operation resource, used to manage asynchronous API requests.
    146     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    147     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    148     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    149     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    150     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    151     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    152     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    153     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    154     "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
    155     "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
    156     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    157     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    158     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    159     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    160       {
    161         "message": "A String", # [Output Only] A human-readable description of the warning code.
    162         "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
    163         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    164             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    165           {
    166             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    167             "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).
    168           },
    169         ],
    170       },
    171     ],
    172     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    173     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    174     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    175     "name": "A String", # [Output Only] Name of the resource.
    176     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    177     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    178       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    179         {
    180           "message": "A String", # [Output Only] An optional, human-readable error message.
    181           "code": "A String", # [Output Only] The error type identifier for this error.
    182           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    183         },
    184       ],
    185     },
    186     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    187     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    188     "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.
    189   }</pre>
    190 </div>
    191 
    192 <div class="method">
    193     <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
    194   <pre>Retrieves the list of managed instance groups and groups them by zone.
    195 
    196 Args:
    197   project: string, Project ID for this request. (required)
    198   orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
    199 
    200 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.
    201 
    202 Currently, only sorting by name or creationTimestamp desc is supported.
    203   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)
    204   pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
    205   filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
    206 
    207 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.
    208 
    209 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
    210 
    211 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.
    212 
    213 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.
    214 
    215 Returns:
    216   An object of the form:
    217 
    218     {
    219     "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
    220     "items": { # [Output Only] A map of filtered managed instance group lists.
    221       "a_key": { # [Output Only] The name of the scope that contains this set of managed instance groups.
    222         "warning": { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty.
    223           "message": "A String", # [Output Only] A human-readable description of the warning code.
    224           "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
    225           "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    226               # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    227             {
    228               "value": "A String", # [Output Only] A warning data value corresponding to the key.
    229               "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).
    230             },
    231           ],
    232         },
    233         "instanceGroupManagers": [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone.
    234           { # An Instance Group Manager resource.
    235               "currentActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
    236                 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
    237                 "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.
    238                 "creating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
    239                     #
    240                     # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
    241                 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
    242                 "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.
    243                 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
    244                 "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.
    245                 "refreshing": 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
    246               },
    247               "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    248               "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
    249               "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.
    250               "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
    251               "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
    252               "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
    253               "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.
    254                 "A String",
    255               ],
    256               "baseInstanceName": "A String", # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
    257               "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.
    258               "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.
    259               "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
    260                 { # The named port. For example: .
    261                   "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
    262                   "port": 42, # The port number, which can be a value between 1 and 65535.
    263                 },
    264               ],
    265               "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
    266               "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
    267               "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
    268               "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
    269             },
    270         ],
    271       },
    272     },
    273     "kind": "compute#instanceGroupManagerAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups.
    274     "id": "A String", # [Output Only] A unique identifier for this aggregated list of managed instance groups. The server generates this identifier.
    275     "selfLink": "A String", # [Output Only] The URL for this resource type. The server generates this URL.
    276   }</pre>
    277 </div>
    278 
    279 <div class="method">
    280     <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
    281   <pre>Retrieves the next page of results.
    282 
    283 Args:
    284   previous_request: The request for the previous page. (required)
    285   previous_response: The response from the request for the previous page. (required)
    286 
    287 Returns:
    288   A request object that you can call 'execute()' on to request the next
    289   page. Returns None if there are no more items in the collection.
    290     </pre>
    291 </div>
    292 
    293 <div class="method">
    294     <code class="details" id="delete">delete(project, zone, instanceGroupManager)</code>
    295   <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.
    296 
    297 Args:
    298   project: string, Project ID for this request. (required)
    299   zone: string, The name of the zone where the managed instance group is located. (required)
    300   instanceGroupManager: string, The name of the managed instance group to delete. (required)
    301 
    302 Returns:
    303   An object of the form:
    304 
    305     { # An Operation resource, used to manage asynchronous API requests.
    306     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    307     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    308     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    309     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    310     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    311     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    312     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    313     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    314     "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
    315     "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
    316     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    317     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    318     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    319     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    320       {
    321         "message": "A String", # [Output Only] A human-readable description of the warning code.
    322         "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
    323         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    324             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    325           {
    326             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    327             "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).
    328           },
    329         ],
    330       },
    331     ],
    332     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    333     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    334     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    335     "name": "A String", # [Output Only] Name of the resource.
    336     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    337     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    338       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    339         {
    340           "message": "A String", # [Output Only] An optional, human-readable error message.
    341           "code": "A String", # [Output Only] The error type identifier for this error.
    342           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    343         },
    344       ],
    345     },
    346     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    347     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    348     "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.
    349   }</pre>
    350 </div>
    351 
    352 <div class="method">
    353     <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body)</code>
    354   <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.
    355 
    356 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.
    357 
    358 You can specify a maximum of 1000 instances with this method per request.
    359 
    360 Args:
    361   project: string, Project ID for this request. (required)
    362   zone: string, The name of the zone where the managed instance group is located. (required)
    363   instanceGroupManager: string, The name of the managed instance group. (required)
    364   body: object, The request body. (required)
    365     The object takes the form of:
    366 
    367 {
    368     "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].
    369       "A String",
    370     ],
    371   }
    372 
    373 
    374 Returns:
    375   An object of the form:
    376 
    377     { # An Operation resource, used to manage asynchronous API requests.
    378     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    379     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    380     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    381     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    382     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    383     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    384     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    385     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    386     "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
    387     "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
    388     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    389     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    390     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    391     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    392       {
    393         "message": "A String", # [Output Only] A human-readable description of the warning code.
    394         "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
    395         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    396             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    397           {
    398             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    399             "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).
    400           },
    401         ],
    402       },
    403     ],
    404     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    405     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    406     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    407     "name": "A String", # [Output Only] Name of the resource.
    408     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    409     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    410       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    411         {
    412           "message": "A String", # [Output Only] An optional, human-readable error message.
    413           "code": "A String", # [Output Only] The error type identifier for this error.
    414           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    415         },
    416       ],
    417     },
    418     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    419     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    420     "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.
    421   }</pre>
    422 </div>
    423 
    424 <div class="method">
    425     <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
    426   <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.
    427 
    428 Args:
    429   project: string, Project ID for this request. (required)
    430   zone: string, The name of the zone where the managed instance group is located. (required)
    431   instanceGroupManager: string, The name of the managed instance group. (required)
    432 
    433 Returns:
    434   An object of the form:
    435 
    436     { # An Instance Group Manager resource.
    437       "currentActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
    438         "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
    439         "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.
    440         "creating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
    441             #
    442             # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
    443         "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
    444         "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.
    445         "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
    446         "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.
    447         "refreshing": 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
    448       },
    449       "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    450       "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
    451       "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.
    452       "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
    453       "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
    454       "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
    455       "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.
    456         "A String",
    457       ],
    458       "baseInstanceName": "A String", # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
    459       "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.
    460       "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.
    461       "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
    462         { # The named port. For example: .
    463           "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
    464           "port": 42, # The port number, which can be a value between 1 and 65535.
    465         },
    466       ],
    467       "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
    468       "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
    469       "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
    470       "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
    471     }</pre>
    472 </div>
    473 
    474 <div class="method">
    475     <code class="details" id="insert">insert(project, zone, body)</code>
    476   <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.
    477 
    478 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.
    479 
    480 Args:
    481   project: string, Project ID for this request. (required)
    482   zone: string, The name of the zone where you want to create the managed instance group. (required)
    483   body: object, The request body. (required)
    484     The object takes the form of:
    485 
    486 { # An Instance Group Manager resource.
    487     "currentActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
    488       "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
    489       "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.
    490       "creating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
    491           #
    492           # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
    493       "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
    494       "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.
    495       "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
    496       "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.
    497       "refreshing": 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
    498     },
    499     "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    500     "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
    501     "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.
    502     "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
    503     "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
    504     "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
    505     "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.
    506       "A String",
    507     ],
    508     "baseInstanceName": "A String", # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
    509     "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.
    510     "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.
    511     "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
    512       { # The named port. For example: .
    513         "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
    514         "port": 42, # The port number, which can be a value between 1 and 65535.
    515       },
    516     ],
    517     "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
    518     "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
    519     "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
    520     "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
    521   }
    522 
    523 
    524 Returns:
    525   An object of the form:
    526 
    527     { # An Operation resource, used to manage asynchronous API requests.
    528     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    529     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    530     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    531     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    532     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    533     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    534     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    535     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    536     "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
    537     "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
    538     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    539     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    540     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    541     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    542       {
    543         "message": "A String", # [Output Only] A human-readable description of the warning code.
    544         "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
    545         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    546             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    547           {
    548             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    549             "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).
    550           },
    551         ],
    552       },
    553     ],
    554     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    555     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    556     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    557     "name": "A String", # [Output Only] Name of the resource.
    558     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    559     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    560       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    561         {
    562           "message": "A String", # [Output Only] An optional, human-readable error message.
    563           "code": "A String", # [Output Only] The error type identifier for this error.
    564           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    565         },
    566       ],
    567     },
    568     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    569     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    570     "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.
    571   }</pre>
    572 </div>
    573 
    574 <div class="method">
    575     <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
    576   <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
    577 
    578 Args:
    579   project: string, Project ID for this request. (required)
    580   zone: string, The name of the zone where the managed instance group is located. (required)
    581   orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
    582 
    583 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.
    584 
    585 Currently, only sorting by name or creationTimestamp desc is supported.
    586   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)
    587   pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
    588   filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
    589 
    590 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.
    591 
    592 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
    593 
    594 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.
    595 
    596 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.
    597 
    598 Returns:
    599   An object of the form:
    600 
    601     { # [Output Only] A list of managed instance groups.
    602     "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
    603     "items": [ # [Output Only] A list of managed instance groups.
    604       { # An Instance Group Manager resource.
    605           "currentActions": { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
    606             "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
    607             "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.
    608             "creating": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
    609                 #
    610                 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
    611             "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
    612             "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.
    613             "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
    614             "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.
    615             "refreshing": 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
    616           },
    617           "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    618           "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
    619           "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.
    620           "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
    621           "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource.
    622           "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
    623           "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.
    624             "A String",
    625           ],
    626           "baseInstanceName": "A String", # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
    627           "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.
    628           "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.
    629           "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
    630             { # The named port. For example: .
    631               "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
    632               "port": 42, # The port number, which can be a value between 1 and 65535.
    633             },
    634           ],
    635           "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
    636           "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
    637           "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL.
    638           "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
    639         },
    640     ],
    641     "kind": "compute#instanceGroupManagerList", # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
    642     "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier.
    643     "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
    644   }</pre>
    645 </div>
    646 
    647 <div class="method">
    648     <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</code>
    649   <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.
    650 
    651 Args:
    652   project: string, Project ID for this request. (required)
    653   zone: string, The name of the zone where the managed instance group is located. (required)
    654   instanceGroupManager: string, The name of the managed instance group. (required)
    655   order_by: string, A parameter
    656   maxResults: integer, A parameter
    657   pageToken: string, A parameter
    658   filter: string, A parameter
    659 
    660 Returns:
    661   An object of the form:
    662 
    663     {
    664     "managedInstances": [ # [Output Only] The list of instances in the managed instance group.
    665       {
    666         "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
    667             # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
    668             # - CREATING The managed instance group is creating this instance. If the group fails to create this instance, it will try again until it is successful.
    669             # - 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.
    670             # - RECREATING The managed instance group is recreating this instance.
    671             # - DELETING The managed instance group is permanently deleting this instance.
    672             # - ABANDONING The managed instance group is abandoning this instance. The instance will be removed from the instance group and from any target pools that are associated with this group.
    673             # - RESTARTING The managed instance group is restarting the instance.
    674             # - REFRESHING The managed instance group is applying configuration changes to the instance without stopping it. For example, the group can update the target pool list for an instance without stopping that instance.
    675         "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
    676         "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance.
    677           "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
    678             "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    679               {
    680                 "message": "A String", # [Output Only] An optional, human-readable error message.
    681                 "code": "A String", # [Output Only] The error type identifier for this error.
    682                 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    683               },
    684             ],
    685           },
    686         },
    687         "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
    688         "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist.
    689       },
    690     ],
    691   }</pre>
    692 </div>
    693 
    694 <div class="method">
    695     <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
    696   <pre>Retrieves the next page of results.
    697 
    698 Args:
    699   previous_request: The request for the previous page. (required)
    700   previous_response: The response from the request for the previous page. (required)
    701 
    702 Returns:
    703   A request object that you can call 'execute()' on to request the next
    704   page. Returns None if there are no more items in the collection.
    705     </pre>
    706 </div>
    707 
    708 <div class="method">
    709     <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body)</code>
    710   <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.
    711 
    712 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.
    713 
    714 You can specify a maximum of 1000 instances with this method per request.
    715 
    716 Args:
    717   project: string, Project ID for this request. (required)
    718   zone: string, The name of the zone where the managed instance group is located. (required)
    719   instanceGroupManager: string, The name of the managed instance group. (required)
    720   body: object, The request body. (required)
    721     The object takes the form of:
    722 
    723 {
    724     "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].
    725       "A String",
    726     ],
    727   }
    728 
    729 
    730 Returns:
    731   An object of the form:
    732 
    733     { # An Operation resource, used to manage asynchronous API requests.
    734     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    735     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    736     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    737     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    738     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    739     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    740     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    741     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    742     "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
    743     "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
    744     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    745     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    746     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    747     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    748       {
    749         "message": "A String", # [Output Only] A human-readable description of the warning code.
    750         "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
    751         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    752             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    753           {
    754             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    755             "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).
    756           },
    757         ],
    758       },
    759     ],
    760     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    761     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    762     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    763     "name": "A String", # [Output Only] Name of the resource.
    764     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    765     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    766       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    767         {
    768           "message": "A String", # [Output Only] An optional, human-readable error message.
    769           "code": "A String", # [Output Only] The error type identifier for this error.
    770           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    771         },
    772       ],
    773     },
    774     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    775     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    776     "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.
    777   }</pre>
    778 </div>
    779 
    780 <div class="method">
    781     <code class="details" id="resize">resize(project, zone, instanceGroupManager, size)</code>
    782   <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.
    783 
    784 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.
    785 
    786 Args:
    787   project: string, Project ID for this request. (required)
    788   zone: string, The name of the zone where the managed instance group is located. (required)
    789   instanceGroupManager: string, The name of the managed instance group. (required)
    790   size: integer, The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter. (required)
    791 
    792 Returns:
    793   An object of the form:
    794 
    795     { # An Operation resource, used to manage asynchronous API requests.
    796     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    797     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    798     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    799     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    800     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    801     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    802     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    803     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    804     "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
    805     "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
    806     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    807     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    808     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    809     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    810       {
    811         "message": "A String", # [Output Only] A human-readable description of the warning code.
    812         "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
    813         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    814             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    815           {
    816             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    817             "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).
    818           },
    819         ],
    820       },
    821     ],
    822     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    823     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    824     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    825     "name": "A String", # [Output Only] Name of the resource.
    826     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    827     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    828       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    829         {
    830           "message": "A String", # [Output Only] An optional, human-readable error message.
    831           "code": "A String", # [Output Only] The error type identifier for this error.
    832           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    833         },
    834       ],
    835     },
    836     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    837     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    838     "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.
    839   }</pre>
    840 </div>
    841 
    842 <div class="method">
    843     <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body)</code>
    844   <pre>Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.
    845 
    846 Args:
    847   project: string, Project ID for this request. (required)
    848   zone: string, The name of the zone where the managed instance group is located. (required)
    849   instanceGroupManager: string, The name of the managed instance group. (required)
    850   body: object, The request body. (required)
    851     The object takes the form of:
    852 
    853 {
    854     "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group.
    855   }
    856 
    857 
    858 Returns:
    859   An object of the form:
    860 
    861     { # An Operation resource, used to manage asynchronous API requests.
    862     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    863     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    864     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    865     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    866     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    867     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    868     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    869     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    870     "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
    871     "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
    872     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    873     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    874     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    875     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    876       {
    877         "message": "A String", # [Output Only] A human-readable description of the warning code.
    878         "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
    879         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    880             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    881           {
    882             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    883             "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).
    884           },
    885         ],
    886       },
    887     ],
    888     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    889     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    890     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    891     "name": "A String", # [Output Only] Name of the resource.
    892     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    893     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    894       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    895         {
    896           "message": "A String", # [Output Only] An optional, human-readable error message.
    897           "code": "A String", # [Output Only] The error type identifier for this error.
    898           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    899         },
    900       ],
    901     },
    902     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    903     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    904     "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.
    905   }</pre>
    906 </div>
    907 
    908 <div class="method">
    909     <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body)</code>
    910   <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.
    911 
    912 Args:
    913   project: string, Project ID for this request. (required)
    914   zone: string, The name of the zone where the managed instance group is located. (required)
    915   instanceGroupManager: string, The name of the managed instance group. (required)
    916   body: object, The request body. (required)
    917     The object takes the form of:
    918 
    919 {
    920     "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.
    921       "A String",
    922     ],
    923     "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.
    924   }
    925 
    926 
    927 Returns:
    928   An object of the form:
    929 
    930     { # An Operation resource, used to manage asynchronous API requests.
    931     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    932     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    933     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    934     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    935     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    936     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    937     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    938     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    939     "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
    940     "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
    941     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    942     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    943     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    944     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    945       {
    946         "message": "A String", # [Output Only] A human-readable description of the warning code.
    947         "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
    948         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    949             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    950           {
    951             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    952             "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).
    953           },
    954         ],
    955       },
    956     ],
    957     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    958     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    959     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    960     "name": "A String", # [Output Only] Name of the resource.
    961     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    962     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    963       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    964         {
    965           "message": "A String", # [Output Only] An optional, human-readable error message.
    966           "code": "A String", # [Output Only] The error type identifier for this error.
    967           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    968         },
    969       ],
    970     },
    971     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    972     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    973     "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.
    974   }</pre>
    975 </div>
    976 
    977 </body></html>