1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.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">Flags the specified instances to be removed 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">Flags the specified instances in the managed instance group for immediate deletion. 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. Gets 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, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.</p> 98<p class="toc_element"> 99 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 100<p class="firstline">Retrieves a list of managed instance groups that are contained within the specified project and zone.</p> 101<p class="toc_element"> 102 <code><a href="#listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 103<p class="firstline">Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.</p> 104<p class="toc_element"> 105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 106<p class="firstline">Retrieves the next page of results.</p> 107<p class="toc_element"> 108 <code><a href="#patch">patch(project, zone, instanceGroupManager, body, requestId=None)</a></code></p> 109<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 and uses the JSON merge patch format and processing rules.</p> 110<p class="toc_element"> 111 <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body, requestId=None)</a></code></p> 112<p class="firstline">Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.</p> 113<p class="toc_element"> 114 <code><a href="#resize">resize(project, zone, instanceGroupManager, size, requestId=None)</a></code></p> 115<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> 116<p class="toc_element"> 117 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body, requestId=None)</a></code></p> 118<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> 119<p class="toc_element"> 120 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body, requestId=None)</a></code></p> 121<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> 122<h3>Method Details</h3> 123<div class="method"> 124 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body, requestId=None)</code> 125 <pre>Flags the specified instances to be removed 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. 126 127If 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. 128 129You can specify a maximum of 1000 instances with this method per request. 130 131Args: 132 project: string, Project ID for this request. (required) 133 zone: string, The name of the zone where the managed instance group is located. (required) 134 instanceGroupManager: string, The name of the managed instance group. (required) 135 body: object, The request body. (required) 136 The object takes the form of: 137 138{ 139 "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]. 140 "A String", 141 ], 142 } 143 144 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 145 146For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. 147 148The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 149 150Returns: 151 An object of the form: 152 153 { # Represents an Operation resource. 154 # 155 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 156 # 157 # Operations can be global, regional or zonal. 158 # - For global operations, use the globalOperations resource. 159 # - For regional operations, use the regionOperations resource. 160 # - For zonal operations, use the zonalOperations resource. 161 # 162 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 163 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 164 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 165 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 166 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 167 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 168 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 169 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 170 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 171 "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. 172 "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. 173 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 174 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 175 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 176 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 177 { 178 "message": "A String", # [Output Only] A human-readable description of the warning code. 179 "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. 180 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 181 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 182 { 183 "value": "A String", # [Output Only] A warning data value corresponding to the key. 184 "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). 185 }, 186 ], 187 }, 188 ], 189 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 190 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 191 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 192 "name": "A String", # [Output Only] Name of the resource. 193 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 194 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 195 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 196 { 197 "message": "A String", # [Output Only] An optional, human-readable error message. 198 "code": "A String", # [Output Only] The error type identifier for this error. 199 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 200 }, 201 ], 202 }, 203 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 204 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 205 "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. 206 }</pre> 207</div> 208 209<div class="method"> 210 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 211 <pre>Retrieves the list of managed instance groups and groups them by zone. 212 213Args: 214 project: string, Project ID for this request. (required) 215 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 216 217You 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. 218 219Currently, only sorting by name or creationTimestamp desc is supported. 220 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) 221 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. 222 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. 223 224For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. 225 226You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. 227 228To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true). 229 230Returns: 231 An object of the form: 232 233 { 234 "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. 235 "kind": "compute#instanceGroupManagerAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups. 236 "items": { # A list of InstanceGroupManagersScopedList resources. 237 "a_key": { # [Output Only] The name of the scope that contains this set of managed instance groups. 238 "warning": { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty. 239 "message": "A String", # [Output Only] A human-readable description of the warning code. 240 "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. 241 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 242 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 243 { 244 "value": "A String", # [Output Only] A warning data value corresponding to the key. 245 "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). 246 }, 247 ], 248 }, 249 "instanceGroupManagers": [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone. 250 { # Represents a Managed Instance Group resource. 251 # 252 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups. 253 # 254 # For zonal Managed Instance Group, use the instanceGroupManagers resource. 255 # 256 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==) 257 "status": { # [Output Only] The status of this managed instance group. 258 "isStable": True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified. 259 }, 260 "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. 261 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 262 "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. 263 "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. 264 # 265 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. 266 "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation. 267 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 268 "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. 269 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 270 "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. 271 "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. 272 }, 273 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 274 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). 275 "versions": [ # Specifies the instance templates used by this managed instance group to create instances. 276 # 277 # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates. 278 { 279 "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to: 280 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used. 281 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information. 282 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 283 # 284 # 285 # - If the value is fixed, then the calculated value is equal to the fixed value. 286 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 287 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 288 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 289 }, 290 "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. 291 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group. 292 }, 293 ], 294 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 295 { 296 "healthCheck": "A String", # The URL for the health check that signals autohealing. 297 "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]. 298 }, 299 ], 300 "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. 301 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 302 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 303 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 304 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group. 305 "zones": [ # Zones where the regional managed instance group will create and manage instances. 306 { 307 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located. 308 }, 309 ], 310 }, 311 "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. 312 "A String", 313 ], 314 "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. 315 "updatePolicy": { # The update policy for this managed instance group. 316 "type": "A String", # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls). 317 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary. 318 # 319 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge. 320 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 321 # 322 # 323 # - If the value is fixed, then the calculated value is equal to the fixed value. 324 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 325 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 326 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 327 }, 328 "minimalAction": "A String", # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action. 329 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied: 330 # 331 # 332 # - The instance's status is RUNNING. 333 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary. 334 # 335 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable. 336 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 337 # 338 # 339 # - If the value is fixed, then the calculated value is equal to the fixed value. 340 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 341 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 342 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 343 }, 344 }, 345 "fingerprint": "A String", # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet. 346 # 347 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager. 348 "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. 349 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 350 { # The named port. For example: . 351 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 352 "port": 42, # The port number, which can be a value between 1 and 65535. 353 }, 354 ], 355 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 356 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 357 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 358 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 359 }, 360 ], 361 }, 362 }, 363 "warning": { # [Output Only] Informational warning message. 364 "message": "A String", # [Output Only] A human-readable description of the warning code. 365 "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. 366 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 367 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 368 { 369 "value": "A String", # [Output Only] A warning data value corresponding to the key. 370 "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). 371 }, 372 ], 373 }, 374 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 375 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 376 }</pre> 377</div> 378 379<div class="method"> 380 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code> 381 <pre>Retrieves the next page of results. 382 383Args: 384 previous_request: The request for the previous page. (required) 385 previous_response: The response from the request for the previous page. (required) 386 387Returns: 388 A request object that you can call 'execute()' on to request the next 389 page. Returns None if there are no more items in the collection. 390 </pre> 391</div> 392 393<div class="method"> 394 <code class="details" id="delete">delete(project, zone, instanceGroupManager, requestId=None)</code> 395 <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. 396 397Args: 398 project: string, Project ID for this request. (required) 399 zone: string, The name of the zone where the managed instance group is located. (required) 400 instanceGroupManager: string, The name of the managed instance group to delete. (required) 401 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 402 403For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. 404 405The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 406 407Returns: 408 An object of the form: 409 410 { # Represents an Operation resource. 411 # 412 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 413 # 414 # Operations can be global, regional or zonal. 415 # - For global operations, use the globalOperations resource. 416 # - For regional operations, use the regionOperations resource. 417 # - For zonal operations, use the zonalOperations resource. 418 # 419 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 420 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 421 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 422 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 423 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 424 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 425 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 426 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 427 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 428 "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. 429 "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. 430 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 431 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 432 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 433 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 434 { 435 "message": "A String", # [Output Only] A human-readable description of the warning code. 436 "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. 437 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 438 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 439 { 440 "value": "A String", # [Output Only] A warning data value corresponding to the key. 441 "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). 442 }, 443 ], 444 }, 445 ], 446 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 447 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 448 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 449 "name": "A String", # [Output Only] Name of the resource. 450 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 451 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 452 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 453 { 454 "message": "A String", # [Output Only] An optional, human-readable error message. 455 "code": "A String", # [Output Only] The error type identifier for this error. 456 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 457 }, 458 ], 459 }, 460 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 461 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 462 "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. 463 }</pre> 464</div> 465 466<div class="method"> 467 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body, requestId=None)</code> 468 <pre>Flags the specified instances in the managed instance group for immediate deletion. 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. 469 470If 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. 471 472You can specify a maximum of 1000 instances with this method per request. 473 474Args: 475 project: string, Project ID for this request. (required) 476 zone: string, The name of the zone where the managed instance group is located. (required) 477 instanceGroupManager: string, The name of the managed instance group. (required) 478 body: object, The request body. (required) 479 The object takes the form of: 480 481{ 482 "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]. 483 "A String", 484 ], 485 } 486 487 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 488 489For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. 490 491The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 492 493Returns: 494 An object of the form: 495 496 { # Represents an Operation resource. 497 # 498 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 499 # 500 # Operations can be global, regional or zonal. 501 # - For global operations, use the globalOperations resource. 502 # - For regional operations, use the regionOperations resource. 503 # - For zonal operations, use the zonalOperations resource. 504 # 505 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 506 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 507 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 508 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 509 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 510 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 511 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 512 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 513 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 514 "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. 515 "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. 516 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 517 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 518 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 519 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 520 { 521 "message": "A String", # [Output Only] A human-readable description of the warning code. 522 "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. 523 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 524 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 525 { 526 "value": "A String", # [Output Only] A warning data value corresponding to the key. 527 "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). 528 }, 529 ], 530 }, 531 ], 532 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 533 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 534 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 535 "name": "A String", # [Output Only] Name of the resource. 536 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 537 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 538 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 539 { 540 "message": "A String", # [Output Only] An optional, human-readable error message. 541 "code": "A String", # [Output Only] The error type identifier for this error. 542 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 543 }, 544 ], 545 }, 546 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 547 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 548 "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. 549 }</pre> 550</div> 551 552<div class="method"> 553 <code class="details" id="get">get(project, zone, instanceGroupManager)</code> 554 <pre>Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request. 555 556Args: 557 project: string, Project ID for this request. (required) 558 zone: string, The name of the zone where the managed instance group is located. (required) 559 instanceGroupManager: string, The name of the managed instance group. (required) 560 561Returns: 562 An object of the form: 563 564 { # Represents a Managed Instance Group resource. 565 # 566 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups. 567 # 568 # For zonal Managed Instance Group, use the instanceGroupManagers resource. 569 # 570 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==) 571 "status": { # [Output Only] The status of this managed instance group. 572 "isStable": True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified. 573 }, 574 "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. 575 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 576 "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. 577 "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. 578 # 579 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. 580 "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation. 581 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 582 "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. 583 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 584 "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. 585 "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. 586 }, 587 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 588 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). 589 "versions": [ # Specifies the instance templates used by this managed instance group to create instances. 590 # 591 # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates. 592 { 593 "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to: 594 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used. 595 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information. 596 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 597 # 598 # 599 # - If the value is fixed, then the calculated value is equal to the fixed value. 600 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 601 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 602 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 603 }, 604 "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. 605 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group. 606 }, 607 ], 608 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 609 { 610 "healthCheck": "A String", # The URL for the health check that signals autohealing. 611 "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]. 612 }, 613 ], 614 "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. 615 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 616 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 617 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 618 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group. 619 "zones": [ # Zones where the regional managed instance group will create and manage instances. 620 { 621 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located. 622 }, 623 ], 624 }, 625 "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. 626 "A String", 627 ], 628 "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. 629 "updatePolicy": { # The update policy for this managed instance group. 630 "type": "A String", # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls). 631 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary. 632 # 633 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge. 634 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 635 # 636 # 637 # - If the value is fixed, then the calculated value is equal to the fixed value. 638 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 639 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 640 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 641 }, 642 "minimalAction": "A String", # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action. 643 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied: 644 # 645 # 646 # - The instance's status is RUNNING. 647 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary. 648 # 649 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable. 650 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 651 # 652 # 653 # - If the value is fixed, then the calculated value is equal to the fixed value. 654 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 655 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 656 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 657 }, 658 }, 659 "fingerprint": "A String", # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet. 660 # 661 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager. 662 "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. 663 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 664 { # The named port. For example: . 665 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 666 "port": 42, # The port number, which can be a value between 1 and 65535. 667 }, 668 ], 669 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 670 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 671 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 672 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 673 }</pre> 674</div> 675 676<div class="method"> 677 <code class="details" id="insert">insert(project, zone, body, requestId=None)</code> 678 <pre>Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created 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. 679 680A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit. 681 682Args: 683 project: string, Project ID for this request. (required) 684 zone: string, The name of the zone where you want to create the managed instance group. (required) 685 body: object, The request body. (required) 686 The object takes the form of: 687 688{ # Represents a Managed Instance Group resource. 689 # 690 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups. 691 # 692 # For zonal Managed Instance Group, use the instanceGroupManagers resource. 693 # 694 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==) 695 "status": { # [Output Only] The status of this managed instance group. 696 "isStable": True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified. 697 }, 698 "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. 699 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 700 "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. 701 "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. 702 # 703 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. 704 "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation. 705 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 706 "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. 707 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 708 "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. 709 "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. 710 }, 711 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 712 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). 713 "versions": [ # Specifies the instance templates used by this managed instance group to create instances. 714 # 715 # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates. 716 { 717 "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to: 718 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used. 719 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information. 720 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 721 # 722 # 723 # - If the value is fixed, then the calculated value is equal to the fixed value. 724 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 725 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 726 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 727 }, 728 "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. 729 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group. 730 }, 731 ], 732 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 733 { 734 "healthCheck": "A String", # The URL for the health check that signals autohealing. 735 "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]. 736 }, 737 ], 738 "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. 739 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 740 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 741 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 742 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group. 743 "zones": [ # Zones where the regional managed instance group will create and manage instances. 744 { 745 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located. 746 }, 747 ], 748 }, 749 "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. 750 "A String", 751 ], 752 "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. 753 "updatePolicy": { # The update policy for this managed instance group. 754 "type": "A String", # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls). 755 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary. 756 # 757 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge. 758 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 759 # 760 # 761 # - If the value is fixed, then the calculated value is equal to the fixed value. 762 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 763 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 764 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 765 }, 766 "minimalAction": "A String", # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action. 767 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied: 768 # 769 # 770 # - The instance's status is RUNNING. 771 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary. 772 # 773 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable. 774 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 775 # 776 # 777 # - If the value is fixed, then the calculated value is equal to the fixed value. 778 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 779 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 780 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 781 }, 782 }, 783 "fingerprint": "A String", # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet. 784 # 785 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager. 786 "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. 787 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 788 { # The named port. For example: . 789 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 790 "port": 42, # The port number, which can be a value between 1 and 65535. 791 }, 792 ], 793 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 794 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 795 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 796 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 797 } 798 799 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 800 801For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. 802 803The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 804 805Returns: 806 An object of the form: 807 808 { # Represents an Operation resource. 809 # 810 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 811 # 812 # Operations can be global, regional or zonal. 813 # - For global operations, use the globalOperations resource. 814 # - For regional operations, use the regionOperations resource. 815 # - For zonal operations, use the zonalOperations resource. 816 # 817 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 818 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 819 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 820 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 821 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 822 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 823 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 824 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 825 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 826 "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. 827 "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. 828 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 829 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 830 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 831 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 832 { 833 "message": "A String", # [Output Only] A human-readable description of the warning code. 834 "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. 835 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 836 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 837 { 838 "value": "A String", # [Output Only] A warning data value corresponding to the key. 839 "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). 840 }, 841 ], 842 }, 843 ], 844 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 845 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 846 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 847 "name": "A String", # [Output Only] Name of the resource. 848 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 849 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 850 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 851 { 852 "message": "A String", # [Output Only] An optional, human-readable error message. 853 "code": "A String", # [Output Only] The error type identifier for this error. 854 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 855 }, 856 ], 857 }, 858 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 859 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 860 "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. 861 }</pre> 862</div> 863 864<div class="method"> 865 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 866 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone. 867 868Args: 869 project: string, Project ID for this request. (required) 870 zone: string, The name of the zone where the managed instance group is located. (required) 871 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 872 873You 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. 874 875Currently, only sorting by name or creationTimestamp desc is supported. 876 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) 877 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. 878 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. 879 880For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. 881 882You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. 883 884To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true). 885 886Returns: 887 An object of the form: 888 889 { # [Output Only] A list of managed instance groups. 890 "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. 891 "kind": "compute#instanceGroupManagerList", # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups. 892 "items": [ # A list of InstanceGroupManager resources. 893 { # Represents a Managed Instance Group resource. 894 # 895 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups. 896 # 897 # For zonal Managed Instance Group, use the instanceGroupManagers resource. 898 # 899 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==) 900 "status": { # [Output Only] The status of this managed instance group. 901 "isStable": True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified. 902 }, 903 "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. 904 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 905 "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. 906 "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. 907 # 908 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. 909 "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation. 910 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 911 "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. 912 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 913 "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. 914 "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. 915 }, 916 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 917 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). 918 "versions": [ # Specifies the instance templates used by this managed instance group to create instances. 919 # 920 # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates. 921 { 922 "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to: 923 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used. 924 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information. 925 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 926 # 927 # 928 # - If the value is fixed, then the calculated value is equal to the fixed value. 929 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 930 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 931 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 932 }, 933 "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. 934 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group. 935 }, 936 ], 937 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 938 { 939 "healthCheck": "A String", # The URL for the health check that signals autohealing. 940 "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]. 941 }, 942 ], 943 "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. 944 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 945 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 946 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 947 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group. 948 "zones": [ # Zones where the regional managed instance group will create and manage instances. 949 { 950 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located. 951 }, 952 ], 953 }, 954 "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. 955 "A String", 956 ], 957 "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. 958 "updatePolicy": { # The update policy for this managed instance group. 959 "type": "A String", # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls). 960 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary. 961 # 962 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge. 963 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 964 # 965 # 966 # - If the value is fixed, then the calculated value is equal to the fixed value. 967 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 968 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 969 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 970 }, 971 "minimalAction": "A String", # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action. 972 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied: 973 # 974 # 975 # - The instance's status is RUNNING. 976 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary. 977 # 978 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable. 979 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 980 # 981 # 982 # - If the value is fixed, then the calculated value is equal to the fixed value. 983 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 984 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 985 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 986 }, 987 }, 988 "fingerprint": "A String", # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet. 989 # 990 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager. 991 "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. 992 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 993 { # The named port. For example: . 994 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 995 "port": 42, # The port number, which can be a value between 1 and 65535. 996 }, 997 ], 998 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 999 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 1000 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 1001 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 1002 }, 1003 ], 1004 "warning": { # [Output Only] Informational warning message. 1005 "message": "A String", # [Output Only] A human-readable description of the warning code. 1006 "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. 1007 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1008 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1009 { 1010 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1011 "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). 1012 }, 1013 ], 1014 }, 1015 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 1016 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 1017 }</pre> 1018</div> 1019 1020<div class="method"> 1021 <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, order_by=None, maxResults=None, pageToken=None, filter=None)</code> 1022 <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. 1023 1024Args: 1025 project: string, Project ID for this request. (required) 1026 zone: string, The name of the zone where the managed instance group is located. (required) 1027 instanceGroupManager: string, The name of the managed instance group. (required) 1028 order_by: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 1029 1030You 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. 1031 1032Currently, only sorting by name or creationTimestamp desc is supported. 1033 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) 1034 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. 1035 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. 1036 1037For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. 1038 1039You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. 1040 1041To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true). 1042 1043Returns: 1044 An object of the form: 1045 1046 { 1047 "managedInstances": [ # [Output Only] The list of instances in the managed instance group. 1048 { # A Managed Instance resource. 1049 "instanceStatus": "A String", # [Output Only] The status of the instance. This field is empty when the instance does not exist. 1050 "lastAttempt": { # [Output Only] Information about the last attempt to create or delete the instance. 1051 "errors": { # [Output Only] Encountered errors during the last attempt to create or delete the instance. 1052 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1053 { 1054 "message": "A String", # [Output Only] An optional, human-readable error message. 1055 "code": "A String", # [Output Only] The error type identifier for this error. 1056 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1057 }, 1058 ], 1059 }, 1060 }, 1061 "instance": "A String", # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created. 1062 "version": { # [Output Only] Intended version of this instance. 1063 "instanceTemplate": "A String", # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }. 1064 "name": "A String", # [Output Only] Name of the version. 1065 }, 1066 "currentAction": "A String", # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values: 1067 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance. 1068 # - 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. 1069 # - 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. 1070 # - RECREATING The managed instance group is recreating this instance. 1071 # - DELETING The managed instance group is permanently deleting this instance. 1072 # - 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. 1073 # - RESTARTING The managed instance group is restarting the instance. 1074 # - 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. 1075 # - VERIFYING The managed instance group has created the instance and it is in the process of being verified. 1076 "id": "A String", # [Output only] The unique identifier for this resource. This field is empty when instance does not exist. 1077 }, 1078 ], 1079 }</pre> 1080</div> 1081 1082<div class="method"> 1083 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 1084 <pre>Retrieves the next page of results. 1085 1086Args: 1087 previous_request: The request for the previous page. (required) 1088 previous_response: The response from the request for the previous page. (required) 1089 1090Returns: 1091 A request object that you can call 'execute()' on to request the next 1092 page. Returns None if there are no more items in the collection. 1093 </pre> 1094</div> 1095 1096<div class="method"> 1097 <code class="details" id="patch">patch(project, zone, instanceGroupManager, body, requestId=None)</code> 1098 <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 and uses the JSON merge patch format and processing rules. 1099 1100Args: 1101 project: string, Project ID for this request. (required) 1102 zone: string, The name of the zone where you want to create the managed instance group. (required) 1103 instanceGroupManager: string, The name of the instance group manager. (required) 1104 body: object, The request body. (required) 1105 The object takes the form of: 1106 1107{ # Represents a Managed Instance Group resource. 1108 # 1109 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups. 1110 # 1111 # For zonal Managed Instance Group, use the instanceGroupManagers resource. 1112 # 1113 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==) 1114 "status": { # [Output Only] The status of this managed instance group. 1115 "isStable": True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified. 1116 }, 1117 "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. 1118 "none": 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. 1119 "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. 1120 "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. 1121 # 1122 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. 1123 "verifying": 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation. 1124 "restarting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. 1125 "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. 1126 "deleting": 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. 1127 "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. 1128 "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. 1129 }, 1130 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 1131 "zone": "A String", # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). 1132 "versions": [ # Specifies the instance templates used by this managed instance group to create instances. 1133 # 1134 # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates. 1135 { 1136 "targetSize": { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to: 1137 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used. 1138 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information. 1139 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 1140 # 1141 # 1142 # - If the value is fixed, then the calculated value is equal to the fixed value. 1143 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 1144 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 1145 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 1146 }, 1147 "instanceTemplate": "A String", # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. 1148 "name": "A String", # Name of the version. Unique among all versions in the scope of this managed instance group. 1149 }, 1150 ], 1151 "autoHealingPolicies": [ # The autohealing policy for this managed instance group. You can specify only one value. 1152 { 1153 "healthCheck": "A String", # The URL for the health check that signals autohealing. 1154 "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]. 1155 }, 1156 ], 1157 "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. 1158 "region": "A String", # [Output Only] The URL of the region where the managed instance group resides (for regional resources). 1159 "instanceGroup": "A String", # [Output Only] The URL of the Instance Group resource. 1160 "kind": "compute#instanceGroupManager", # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. 1161 "distributionPolicy": { # Policy specifying intended distribution of instances in regional managed instance group. 1162 "zones": [ # Zones where the regional managed instance group will create and manage instances. 1163 { 1164 "zone": "A String", # The URL of the zone. The zone must exist in the region where the managed instance group is located. 1165 }, 1166 ], 1167 }, 1168 "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. 1169 "A String", 1170 ], 1171 "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. 1172 "updatePolicy": { # The update policy for this managed instance group. 1173 "type": "A String", # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls). 1174 "maxSurge": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary. 1175 # 1176 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge. 1177 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 1178 # 1179 # 1180 # - If the value is fixed, then the calculated value is equal to the fixed value. 1181 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 1182 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 1183 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 1184 }, 1185 "minimalAction": "A String", # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action. 1186 "maxUnavailable": { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied: 1187 # 1188 # 1189 # - The instance's status is RUNNING. 1190 # - If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary. 1191 # 1192 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable. 1193 "calculated": 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode. 1194 # 1195 # 1196 # - If the value is fixed, then the calculated value is equal to the fixed value. 1197 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up. 1198 "fixed": 42, # Specifies a fixed number of VM instances. This must be a positive integer. 1199 "percent": 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. 1200 }, 1201 }, 1202 "fingerprint": "A String", # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet. 1203 # 1204 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager. 1205 "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. 1206 "namedPorts": [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager. 1207 { # The named port. For example: . 1208 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 1209 "port": 42, # The port number, which can be a value between 1 and 65535. 1210 }, 1211 ], 1212 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. 1213 "id": "A String", # [Output Only] A unique identifier for this resource type. The server generates this identifier. 1214 "selfLink": "A String", # [Output Only] The URL for this managed instance group. The server defines this URL. 1215 "name": "A String", # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. 1216 } 1217 1218 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 1219 1220For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. 1221 1222The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 1223 1224Returns: 1225 An object of the form: 1226 1227 { # Represents an Operation resource. 1228 # 1229 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 1230 # 1231 # Operations can be global, regional or zonal. 1232 # - For global operations, use the globalOperations resource. 1233 # - For regional operations, use the regionOperations resource. 1234 # - For zonal operations, use the zonalOperations resource. 1235 # 1236 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 1237 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1238 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1239 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1240 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1241 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1242 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1243 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1244 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1245 "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. 1246 "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. 1247 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1248 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1249 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1250 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1251 { 1252 "message": "A String", # [Output Only] A human-readable description of the warning code. 1253 "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. 1254 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1255 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1256 { 1257 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1258 "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). 1259 }, 1260 ], 1261 }, 1262 ], 1263 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 1264 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1265 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1266 "name": "A String", # [Output Only] Name of the resource. 1267 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1268 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1269 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1270 { 1271 "message": "A String", # [Output Only] An optional, human-readable error message. 1272 "code": "A String", # [Output Only] The error type identifier for this error. 1273 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1274 }, 1275 ], 1276 }, 1277 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1278 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1279 "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. 1280 }</pre> 1281</div> 1282 1283<div class="method"> 1284 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body, requestId=None)</code> 1285 <pre>Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. 1286 1287If 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. 1288 1289You can specify a maximum of 1000 instances with this method per request. 1290 1291Args: 1292 project: string, Project ID for this request. (required) 1293 zone: string, The name of the zone where the managed instance group is located. (required) 1294 instanceGroupManager: string, The name of the managed instance group. (required) 1295 body: object, The request body. (required) 1296 The object takes the form of: 1297 1298{ 1299 "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]. 1300 "A String", 1301 ], 1302 } 1303 1304 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 1305 1306For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. 1307 1308The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 1309 1310Returns: 1311 An object of the form: 1312 1313 { # Represents an Operation resource. 1314 # 1315 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 1316 # 1317 # Operations can be global, regional or zonal. 1318 # - For global operations, use the globalOperations resource. 1319 # - For regional operations, use the regionOperations resource. 1320 # - For zonal operations, use the zonalOperations resource. 1321 # 1322 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 1323 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1324 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1325 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1326 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1327 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1328 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1329 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1330 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1331 "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. 1332 "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. 1333 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1334 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1335 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1336 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1337 { 1338 "message": "A String", # [Output Only] A human-readable description of the warning code. 1339 "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. 1340 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1341 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1342 { 1343 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1344 "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). 1345 }, 1346 ], 1347 }, 1348 ], 1349 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 1350 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1351 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1352 "name": "A String", # [Output Only] Name of the resource. 1353 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1354 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1355 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1356 { 1357 "message": "A String", # [Output Only] An optional, human-readable error message. 1358 "code": "A String", # [Output Only] The error type identifier for this error. 1359 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1360 }, 1361 ], 1362 }, 1363 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1364 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1365 "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. 1366 }</pre> 1367</div> 1368 1369<div class="method"> 1370 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size, requestId=None)</code> 1371 <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. 1372 1373When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including: 1374 1375+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance. 1376 1377This list is subject to change. 1378 1379If 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. 1380 1381Args: 1382 project: string, Project ID for this request. (required) 1383 zone: string, The name of the zone where the managed instance group is located. (required) 1384 instanceGroupManager: string, The name of the managed instance group. (required) 1385 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) 1386 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 1387 1388For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. 1389 1390The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 1391 1392Returns: 1393 An object of the form: 1394 1395 { # Represents an Operation resource. 1396 # 1397 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 1398 # 1399 # Operations can be global, regional or zonal. 1400 # - For global operations, use the globalOperations resource. 1401 # - For regional operations, use the regionOperations resource. 1402 # - For zonal operations, use the zonalOperations resource. 1403 # 1404 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 1405 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1406 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1407 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1408 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1409 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1410 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1411 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1412 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1413 "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. 1414 "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. 1415 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1416 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1417 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1418 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1419 { 1420 "message": "A String", # [Output Only] A human-readable description of the warning code. 1421 "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. 1422 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1423 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1424 { 1425 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1426 "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). 1427 }, 1428 ], 1429 }, 1430 ], 1431 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 1432 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1433 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1434 "name": "A String", # [Output Only] Name of the resource. 1435 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1436 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1437 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1438 { 1439 "message": "A String", # [Output Only] An optional, human-readable error message. 1440 "code": "A String", # [Output Only] The error type identifier for this error. 1441 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1442 }, 1443 ], 1444 }, 1445 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1446 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1447 "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. 1448 }</pre> 1449</div> 1450 1451<div class="method"> 1452 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body, requestId=None)</code> 1453 <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. 1454 1455Args: 1456 project: string, Project ID for this request. (required) 1457 zone: string, The name of the zone where the managed instance group is located. (required) 1458 instanceGroupManager: string, The name of the managed instance group. (required) 1459 body: object, The request body. (required) 1460 The object takes the form of: 1461 1462{ 1463 "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. 1464 } 1465 1466 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 1467 1468For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. 1469 1470The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 1471 1472Returns: 1473 An object of the form: 1474 1475 { # Represents an Operation resource. 1476 # 1477 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 1478 # 1479 # Operations can be global, regional or zonal. 1480 # - For global operations, use the globalOperations resource. 1481 # - For regional operations, use the regionOperations resource. 1482 # - For zonal operations, use the zonalOperations resource. 1483 # 1484 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 1485 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1486 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1487 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1488 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1489 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1490 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1491 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1492 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1493 "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. 1494 "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. 1495 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1496 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1497 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1498 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1499 { 1500 "message": "A String", # [Output Only] A human-readable description of the warning code. 1501 "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. 1502 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1503 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1504 { 1505 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1506 "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). 1507 }, 1508 ], 1509 }, 1510 ], 1511 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 1512 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1513 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1514 "name": "A String", # [Output Only] Name of the resource. 1515 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1516 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1517 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1518 { 1519 "message": "A String", # [Output Only] An optional, human-readable error message. 1520 "code": "A String", # [Output Only] The error type identifier for this error. 1521 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1522 }, 1523 ], 1524 }, 1525 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1526 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1527 "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. 1528 }</pre> 1529</div> 1530 1531<div class="method"> 1532 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body, requestId=None)</code> 1533 <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. 1534 1535Args: 1536 project: string, Project ID for this request. (required) 1537 zone: string, The name of the zone where the managed instance group is located. (required) 1538 instanceGroupManager: string, The name of the managed instance group. (required) 1539 body: object, The request body. (required) 1540 The object takes the form of: 1541 1542{ 1543 "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. 1544 "A String", 1545 ], 1546 "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. 1547 } 1548 1549 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 1550 1551For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. 1552 1553The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 1554 1555Returns: 1556 An object of the form: 1557 1558 { # Represents an Operation resource. 1559 # 1560 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 1561 # 1562 # Operations can be global, regional or zonal. 1563 # - For global operations, use the globalOperations resource. 1564 # - For regional operations, use the regionOperations resource. 1565 # - For zonal operations, use the zonalOperations resource. 1566 # 1567 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 1568 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1569 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1570 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1571 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1572 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1573 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1574 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1575 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1576 "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. 1577 "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. 1578 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1579 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1580 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1581 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1582 { 1583 "message": "A String", # [Output Only] A human-readable description of the warning code. 1584 "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. 1585 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1586 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1587 { 1588 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1589 "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). 1590 }, 1591 ], 1592 }, 1593 ], 1594 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 1595 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1596 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1597 "name": "A String", # [Output Only] Name of the resource. 1598 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1599 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1600 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1601 { 1602 "message": "A String", # [Output Only] An optional, human-readable error message. 1603 "code": "A String", # [Output Only] The error type identifier for this error. 1604 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1605 }, 1606 ], 1607 }, 1608 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1609 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1610 "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. 1611 }</pre> 1612</div> 1613 1614</body></html>