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