1 <html><body> 2 <style> 3 4 body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13 } 14 15 body { 16 font-size: 13px; 17 padding: 1em; 18 } 19 20 h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23 } 24 25 h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28 } 29 30 h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34 } 35 36 pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39 } 40 41 pre { 42 margin-top: 0.5em; 43 } 44 45 h1, h2, h3, p { 46 font-family: Arial, sans serif; 47 } 48 49 h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51 } 52 53 .toc_element { 54 margin-top: 0.5em; 55 } 56 57 .firstline { 58 margin-left: 2 em; 59 } 60 61 .method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66 } 67 68 .details { 69 font-weight: bold; 70 font-size: 14px; 71 } 72 73 </style> 74 75 <h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.instanceGroups.html">instanceGroups</a></h1> 76 <h2>Instance Methods</h2> 77 <p class="toc_element"> 78 <code><a href="#addInstances">addInstances(project, zone, instanceGroup, body, requestId=None)</a></code></p> 79 <p class="firstline">Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.</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 instance groups and sorts 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, instanceGroup, requestId=None)</a></code></p> 88 <p class="firstline">Deletes the specified instance group. The instances in the group are not deleted. Note that 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="#get">get(project, zone, instanceGroup)</a></code></p> 91 <p class="firstline">Returns the specified instance group. Get a list of available instance groups by making a list() request.</p> 92 <p class="toc_element"> 93 <code><a href="#insert">insert(project, zone, body, requestId=None)</a></code></p> 94 <p class="firstline">Creates an instance group in the specified project using the parameters that are included in the request.</p> 95 <p class="toc_element"> 96 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 97 <p class="firstline">Retrieves the list of instance groups that are located in the specified project and zone.</p> 98 <p class="toc_element"> 99 <code><a href="#listInstances">listInstances(project, zone, instanceGroup, body, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 100 <p class="firstline">Lists the instances in the specified instance group.</p> 101 <p class="toc_element"> 102 <code><a href="#listInstances_next">listInstances_next(previous_request, previous_response)</a></code></p> 103 <p class="firstline">Retrieves the next page of results.</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="#removeInstances">removeInstances(project, zone, instanceGroup, body, requestId=None)</a></code></p> 109 <p class="firstline">Removes one or more instances from the specified instance group, but does not delete those instances.</p> 110 <p class="toc_element"> 111 <code><a href="#setNamedPorts">setNamedPorts(project, zone, instanceGroup, body, requestId=None)</a></code></p> 112 <p class="firstline">Sets the named ports for the specified instance group.</p> 113 <p class="toc_element"> 114 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p> 115 <p class="firstline">Returns permissions that a caller has on the specified resource.</p> 116 <h3>Method Details</h3> 117 <div class="method"> 118 <code class="details" id="addInstances">addInstances(project, zone, instanceGroup, body, requestId=None)</code> 119 <pre>Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information. 120 121 Args: 122 project: string, Project ID for this request. (required) 123 zone: string, The name of the zone where the instance group is located. (required) 124 instanceGroup: string, The name of the instance group where you are adding instances. (required) 125 body: object, The request body. (required) 126 The object takes the form of: 127 128 { 129 "instances": [ # The list of instances to add to the instance group. 130 { 131 "instance": "A String", # The URL for a specific instance. 132 }, 133 ], 134 } 135 136 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. 137 138 Returns: 139 An object of the form: 140 141 { # An Operation resource, used to manage asynchronous API requests. 142 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 143 "clientOperationId": "A String", # [Output Only] Reserved for future use. 144 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 145 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 146 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 147 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 148 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 149 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 150 "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. 151 "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. 152 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 153 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 154 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 155 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 156 { 157 "message": "A String", # [Output Only] A human-readable description of the warning code. 158 "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. 159 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 160 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 161 { 162 "value": "A String", # [Output Only] A warning data value corresponding to the key. 163 "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). 164 }, 165 ], 166 }, 167 ], 168 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 169 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 170 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 171 "name": "A String", # [Output Only] Name of the resource. 172 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 173 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 174 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 175 { 176 "message": "A String", # [Output Only] An optional, human-readable error message. 177 "code": "A String", # [Output Only] The error type identifier for this error. 178 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 179 }, 180 ], 181 }, 182 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 183 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 184 "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. 185 }</pre> 186 </div> 187 188 <div class="method"> 189 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 190 <pre>Retrieves the list of instance groups and sorts them by zone. 191 192 Args: 193 project: string, Project ID for this request. (required) 194 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 195 196 You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. 197 198 Currently, only sorting by name or creationTimestamp desc is supported. 199 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) 200 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. 201 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string. 202 203 The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. 204 205 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. 206 207 You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values. 208 209 To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. 210 211 Returns: 212 An object of the form: 213 214 { 215 "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. 216 "items": { # A map of scoped instance group lists. 217 "a_key": { # The name of the scope that contains this set of instance groups. 218 "warning": { # [Output Only] An informational warning that replaces the list of instance groups when the list is empty. 219 "message": "A String", # [Output Only] A human-readable description of the warning code. 220 "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. 221 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 222 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 223 { 224 "value": "A String", # [Output Only] A warning data value corresponding to the key. 225 "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). 226 }, 227 ], 228 }, 229 "instanceGroups": [ # [Output Only] The list of instance groups that are contained in this scope. 230 { 231 "size": 42, # [Output Only] The total number of instances in the instance group. 232 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups. 233 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 234 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources). 235 "region": "A String", # The URL of the region where the instance group is located (for regional resources). 236 "network": "A String", # The URL of the network to which all instances in the instance group belong. 237 "fingerprint": "A String", # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently. 238 "subnetwork": "A String", # The URL of the subnetwork to which all instances in the instance group belong. 239 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80} 240 # 241 # This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "http", port: 80},{name: "http", port: 8080}] 242 # 243 # Named ports apply to all instances in this instance group. 244 { # The named port. For example: . 245 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 246 "port": 42, # The port number, which can be a value between 1 and 65535. 247 }, 248 ], 249 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format. 250 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server. 251 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL. 252 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. 253 }, 254 ], 255 }, 256 }, 257 "kind": "compute#instanceGroupAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupAggregatedList for aggregated lists of instance groups. 258 "id": "A String", # [Output Only] A unique identifier for this aggregated list of instance groups. The server generates this identifier. 259 "selfLink": "A String", # [Output Only] The URL for this resource type. The server generates this URL. 260 }</pre> 261 </div> 262 263 <div class="method"> 264 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code> 265 <pre>Retrieves the next page of results. 266 267 Args: 268 previous_request: The request for the previous page. (required) 269 previous_response: The response from the request for the previous page. (required) 270 271 Returns: 272 A request object that you can call 'execute()' on to request the next 273 page. Returns None if there are no more items in the collection. 274 </pre> 275 </div> 276 277 <div class="method"> 278 <code class="details" id="delete">delete(project, zone, instanceGroup, requestId=None)</code> 279 <pre>Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information. 280 281 Args: 282 project: string, Project ID for this request. (required) 283 zone: string, The name of the zone where the instance group is located. (required) 284 instanceGroup: string, The name of the instance group to delete. (required) 285 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. 286 287 Returns: 288 An object of the form: 289 290 { # An Operation resource, used to manage asynchronous API requests. 291 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 292 "clientOperationId": "A String", # [Output Only] Reserved for future use. 293 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 294 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 295 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 296 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 297 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 298 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 299 "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. 300 "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. 301 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 302 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 303 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 304 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 305 { 306 "message": "A String", # [Output Only] A human-readable description of the warning code. 307 "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. 308 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 309 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 310 { 311 "value": "A String", # [Output Only] A warning data value corresponding to the key. 312 "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). 313 }, 314 ], 315 }, 316 ], 317 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 318 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 319 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 320 "name": "A String", # [Output Only] Name of the resource. 321 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 322 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 323 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 324 { 325 "message": "A String", # [Output Only] An optional, human-readable error message. 326 "code": "A String", # [Output Only] The error type identifier for this error. 327 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 328 }, 329 ], 330 }, 331 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 332 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 333 "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. 334 }</pre> 335 </div> 336 337 <div class="method"> 338 <code class="details" id="get">get(project, zone, instanceGroup)</code> 339 <pre>Returns the specified instance group. Get a list of available instance groups by making a list() request. 340 341 Args: 342 project: string, Project ID for this request. (required) 343 zone: string, The name of the zone where the instance group is located. (required) 344 instanceGroup: string, The name of the instance group. (required) 345 346 Returns: 347 An object of the form: 348 349 { 350 "size": 42, # [Output Only] The total number of instances in the instance group. 351 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups. 352 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 353 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources). 354 "region": "A String", # The URL of the region where the instance group is located (for regional resources). 355 "network": "A String", # The URL of the network to which all instances in the instance group belong. 356 "fingerprint": "A String", # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently. 357 "subnetwork": "A String", # The URL of the subnetwork to which all instances in the instance group belong. 358 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80} 359 # 360 # This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "http", port: 80},{name: "http", port: 8080}] 361 # 362 # Named ports apply to all instances in this instance group. 363 { # The named port. For example: . 364 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 365 "port": 42, # The port number, which can be a value between 1 and 65535. 366 }, 367 ], 368 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format. 369 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server. 370 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL. 371 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. 372 }</pre> 373 </div> 374 375 <div class="method"> 376 <code class="details" id="insert">insert(project, zone, body, requestId=None)</code> 377 <pre>Creates an instance group in the specified project using the parameters that are included in the request. 378 379 Args: 380 project: string, Project ID for this request. (required) 381 zone: string, The name of the zone where you want to create the instance group. (required) 382 body: object, The request body. (required) 383 The object takes the form of: 384 385 { 386 "size": 42, # [Output Only] The total number of instances in the instance group. 387 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups. 388 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 389 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources). 390 "region": "A String", # The URL of the region where the instance group is located (for regional resources). 391 "network": "A String", # The URL of the network to which all instances in the instance group belong. 392 "fingerprint": "A String", # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently. 393 "subnetwork": "A String", # The URL of the subnetwork to which all instances in the instance group belong. 394 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80} 395 # 396 # This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "http", port: 80},{name: "http", port: 8080}] 397 # 398 # Named ports apply to all instances in this instance group. 399 { # The named port. For example: . 400 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 401 "port": 42, # The port number, which can be a value between 1 and 65535. 402 }, 403 ], 404 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format. 405 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server. 406 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL. 407 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. 408 } 409 410 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. 411 412 Returns: 413 An object of the form: 414 415 { # An Operation resource, used to manage asynchronous API requests. 416 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 417 "clientOperationId": "A String", # [Output Only] Reserved for future use. 418 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 419 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 420 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 421 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 422 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 423 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 424 "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. 425 "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. 426 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 427 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 428 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 429 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 430 { 431 "message": "A String", # [Output Only] A human-readable description of the warning code. 432 "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. 433 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 434 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 435 { 436 "value": "A String", # [Output Only] A warning data value corresponding to the key. 437 "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). 438 }, 439 ], 440 }, 441 ], 442 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 443 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 444 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 445 "name": "A String", # [Output Only] Name of the resource. 446 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 447 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 448 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 449 { 450 "message": "A String", # [Output Only] An optional, human-readable error message. 451 "code": "A String", # [Output Only] The error type identifier for this error. 452 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 453 }, 454 ], 455 }, 456 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 457 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 458 "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. 459 }</pre> 460 </div> 461 462 <div class="method"> 463 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 464 <pre>Retrieves the list of instance groups that are located in the specified project and zone. 465 466 Args: 467 project: string, Project ID for this request. (required) 468 zone: string, The name of the zone where the instance group is located. (required) 469 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 470 471 You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. 472 473 Currently, only sorting by name or creationTimestamp desc is supported. 474 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) 475 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. 476 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string. 477 478 The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. 479 480 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. 481 482 You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values. 483 484 To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. 485 486 Returns: 487 An object of the form: 488 489 { # A list of InstanceGroup resources. 490 "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. 491 "items": [ # A list of instance groups. 492 { 493 "size": 42, # [Output Only] The total number of instances in the instance group. 494 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups. 495 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 496 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources). 497 "region": "A String", # The URL of the region where the instance group is located (for regional resources). 498 "network": "A String", # The URL of the network to which all instances in the instance group belong. 499 "fingerprint": "A String", # [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently. 500 "subnetwork": "A String", # The URL of the subnetwork to which all instances in the instance group belong. 501 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80} 502 # 503 # This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "http", port: 80},{name: "http", port: 8080}] 504 # 505 # Named ports apply to all instances in this instance group. 506 { # The named port. For example: . 507 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 508 "port": 42, # The port number, which can be a value between 1 and 65535. 509 }, 510 ], 511 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format. 512 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server. 513 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL. 514 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. 515 }, 516 ], 517 "kind": "compute#instanceGroupList", # [Output Only] The resource type, which is always compute#instanceGroupList for instance group lists. 518 "id": "A String", # [Output Only] A unique identifier for this list of instance groups. The server generates this identifier. 519 "selfLink": "A String", # [Output Only] The URL for this resource type. The server generates this URL. 520 }</pre> 521 </div> 522 523 <div class="method"> 524 <code class="details" id="listInstances">listInstances(project, zone, instanceGroup, body, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 525 <pre>Lists the instances in the specified instance group. 526 527 Args: 528 project: string, Project ID for this request. (required) 529 zone: string, The name of the zone where the instance group is located. (required) 530 instanceGroup: string, The name of the instance group from which you want to generate a list of included instances. (required) 531 body: object, The request body. (required) 532 The object takes the form of: 533 534 { 535 "instanceState": "A String", # A filter for the state of the instances in the instance group. Valid options are ALL or RUNNING. If you do not specify this parameter the list includes all instances regardless of their state. 536 } 537 538 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 539 540 You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. 541 542 Currently, only sorting by name or creationTimestamp desc is supported. 543 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) 544 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. 545 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string. 546 547 The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. 548 549 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. 550 551 You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values. 552 553 To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. 554 555 Returns: 556 An object of the form: 557 558 { 559 "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. 560 "items": [ # [Output Only] A list of instances and any named ports that are assigned to those instances. 561 { 562 "status": "A String", # [Output Only] The status of the instance. 563 "instance": "A String", # [Output Only] The URL of the instance. 564 "namedPorts": [ # [Output Only] The named ports that belong to this instance group. 565 { # The named port. For example: . 566 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 567 "port": 42, # The port number, which can be a value between 1 and 65535. 568 }, 569 ], 570 }, 571 ], 572 "kind": "compute#instanceGroupsListInstances", # [Output Only] The resource type, which is always compute#instanceGroupsListInstances for the list of instances in the specified instance group. 573 "id": "A String", # [Output Only] A unique identifier for this list of instances in the specified instance group. The server generates this identifier. 574 "selfLink": "A String", # [Output Only] The URL for this list of instances in the specified instance groups. The server generates this URL. 575 }</pre> 576 </div> 577 578 <div class="method"> 579 <code class="details" id="listInstances_next">listInstances_next(previous_request, previous_response)</code> 580 <pre>Retrieves the next page of results. 581 582 Args: 583 previous_request: The request for the previous page. (required) 584 previous_response: The response from the request for the previous page. (required) 585 586 Returns: 587 A request object that you can call 'execute()' on to request the next 588 page. Returns None if there are no more items in the collection. 589 </pre> 590 </div> 591 592 <div class="method"> 593 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 594 <pre>Retrieves the next page of results. 595 596 Args: 597 previous_request: The request for the previous page. (required) 598 previous_response: The response from the request for the previous page. (required) 599 600 Returns: 601 A request object that you can call 'execute()' on to request the next 602 page. Returns None if there are no more items in the collection. 603 </pre> 604 </div> 605 606 <div class="method"> 607 <code class="details" id="removeInstances">removeInstances(project, zone, instanceGroup, body, requestId=None)</code> 608 <pre>Removes one or more instances from the specified instance group, but does not delete those instances. 609 610 If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. 611 612 Args: 613 project: string, Project ID for this request. (required) 614 zone: string, The name of the zone where the instance group is located. (required) 615 instanceGroup: string, The name of the instance group where the specified instances will be removed. (required) 616 body: object, The request body. (required) 617 The object takes the form of: 618 619 { 620 "instances": [ # The list of instances to remove from the instance group. 621 { 622 "instance": "A String", # The URL for a specific instance. 623 }, 624 ], 625 } 626 627 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. 628 629 Returns: 630 An object of the form: 631 632 { # An Operation resource, used to manage asynchronous API requests. 633 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 634 "clientOperationId": "A String", # [Output Only] Reserved for future use. 635 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 636 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 637 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 638 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 639 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 640 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 641 "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. 642 "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. 643 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 644 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 645 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 646 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 647 { 648 "message": "A String", # [Output Only] A human-readable description of the warning code. 649 "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. 650 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 651 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 652 { 653 "value": "A String", # [Output Only] A warning data value corresponding to the key. 654 "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). 655 }, 656 ], 657 }, 658 ], 659 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 660 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 661 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 662 "name": "A String", # [Output Only] Name of the resource. 663 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 664 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 665 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 666 { 667 "message": "A String", # [Output Only] An optional, human-readable error message. 668 "code": "A String", # [Output Only] The error type identifier for this error. 669 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 670 }, 671 ], 672 }, 673 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 674 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 675 "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. 676 }</pre> 677 </div> 678 679 <div class="method"> 680 <code class="details" id="setNamedPorts">setNamedPorts(project, zone, instanceGroup, body, requestId=None)</code> 681 <pre>Sets the named ports for the specified instance group. 682 683 Args: 684 project: string, Project ID for this request. (required) 685 zone: string, The name of the zone where the instance group is located. (required) 686 instanceGroup: string, The name of the instance group where the named ports are updated. (required) 687 body: object, The request body. (required) 688 The object takes the form of: 689 690 { 691 "namedPorts": [ # The list of named ports to set for this instance group. 692 { # The named port. For example: . 693 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 694 "port": 42, # The port number, which can be a value between 1 and 65535. 695 }, 696 ], 697 "fingerprint": "A String", # The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request. 698 } 699 700 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. 701 702 Returns: 703 An object of the form: 704 705 { # An Operation resource, used to manage asynchronous API requests. 706 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 707 "clientOperationId": "A String", # [Output Only] Reserved for future use. 708 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 709 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 710 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 711 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 712 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 713 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 714 "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. 715 "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. 716 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 717 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 718 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 719 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 720 { 721 "message": "A String", # [Output Only] A human-readable description of the warning code. 722 "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. 723 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 724 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 725 { 726 "value": "A String", # [Output Only] A warning data value corresponding to the key. 727 "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). 728 }, 729 ], 730 }, 731 ], 732 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 733 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 734 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 735 "name": "A String", # [Output Only] Name of the resource. 736 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 737 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 738 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 739 { 740 "message": "A String", # [Output Only] An optional, human-readable error message. 741 "code": "A String", # [Output Only] The error type identifier for this error. 742 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 743 }, 744 ], 745 }, 746 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 747 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 748 "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. 749 }</pre> 750 </div> 751 752 <div class="method"> 753 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code> 754 <pre>Returns permissions that a caller has on the specified resource. 755 756 Args: 757 project: string, Project ID for this request. (required) 758 zone: string, The name of the zone for this request. (required) 759 resource: string, Name of the resource for this request. (required) 760 body: object, The request body. (required) 761 The object takes the form of: 762 763 { 764 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. 765 "A String", 766 ], 767 } 768 769 770 Returns: 771 An object of the form: 772 773 { 774 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. 775 "A String", 776 ], 777 }</pre> 778 </div> 779 780 </body></html>