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_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. Gets 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 121Args: 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, 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. 137 138For 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. 139 140The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 141 142Returns: 143 An object of the form: 144 145 { # Represents an Operation resource. 146 # 147 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 148 # 149 # Operations can be global, regional or zonal. 150 # - For global operations, use the globalOperations resource. 151 # - For regional operations, use the regionOperations resource. 152 # - For zonal operations, use the zonalOperations resource. 153 # 154 # 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 ==) 155 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 156 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 157 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 158 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 159 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 160 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 161 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 162 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 163 "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. 164 "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. 165 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 166 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 167 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 168 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 169 { 170 "message": "A String", # [Output Only] A human-readable description of the warning code. 171 "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. 172 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 173 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 174 { 175 "value": "A String", # [Output Only] A warning data value corresponding to the key. 176 "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). 177 }, 178 ], 179 }, 180 ], 181 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 182 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 183 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 184 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 185 "name": "A String", # [Output Only] Name of the resource. 186 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 187 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 188 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 189 { 190 "message": "A String", # [Output Only] An optional, human-readable error message. 191 "code": "A String", # [Output Only] The error type identifier for this error. 192 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 193 }, 194 ], 195 }, 196 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 197 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 198 "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. 199 }</pre> 200</div> 201 202<div class="method"> 203 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 204 <pre>Retrieves the list of instance groups and sorts them by zone. 205 206Args: 207 project: string, Project ID for this request. (required) 208 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 209 210You 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. 211 212Currently, only sorting by name or creationTimestamp desc is supported. 213 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) 214 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. 215 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 <. 216 217For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. 218 219You 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. 220 221To 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). 222 223Returns: 224 An object of the form: 225 226 { 227 "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. 228 "kind": "compute#instanceGroupAggregatedList", # [Output Only] The resource type, which is always compute#instanceGroupAggregatedList for aggregated lists of instance groups. 229 "items": { # A list of InstanceGroupsScopedList resources. 230 "a_key": { # The name of the scope that contains this set of instance groups. 231 "warning": { # [Output Only] An informational warning that replaces the list of instance groups when the list is empty. 232 "message": "A String", # [Output Only] A human-readable description of the warning code. 233 "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. 234 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 235 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 236 { 237 "value": "A String", # [Output Only] A warning data value corresponding to the key. 238 "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). 239 }, 240 ], 241 }, 242 "instanceGroups": [ # [Output Only] The list of instance groups that are contained in this scope. 243 { # Represents an unmanaged Instance Group resource. 244 # 245 # Use unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. For more information, read Instance groups. 246 # 247 # For zonal unmanaged Instance Group, use instanceGroups resource. 248 # 249 # For regional unmanaged Instance Group, use regionInstanceGroups resource. (== resource_for beta.instanceGroups ==) (== resource_for v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== resource_for v1.regionInstanceGroups ==) 250 "size": 42, # [Output Only] The total number of instances in the instance group. 251 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups. 252 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 253 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources). 254 "region": "A String", # [Output Only] The URL of the region where the instance group is located (for regional resources). 255 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 256 "network": "A String", # The URL of the network to which all instances in the instance group belong. 257 "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. 258 "subnetwork": "A String", # [Output Only] The URL of the subnetwork to which all instances in the instance group belong. 259 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80} 260 # 261 # 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}] 262 # 263 # Named ports apply to all instances in this instance group. 264 { # The named port. For example: . 265 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 266 "port": 42, # The port number, which can be a value between 1 and 65535. 267 }, 268 ], 269 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format. 270 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server. 271 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL. 272 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. 273 }, 274 ], 275 }, 276 }, 277 "warning": { # [Output Only] Informational warning message. 278 "message": "A String", # [Output Only] A human-readable description of the warning code. 279 "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. 280 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 281 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 282 { 283 "value": "A String", # [Output Only] A warning data value corresponding to the key. 284 "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). 285 }, 286 ], 287 }, 288 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 289 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 290 }</pre> 291</div> 292 293<div class="method"> 294 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code> 295 <pre>Retrieves the next page of results. 296 297Args: 298 previous_request: The request for the previous page. (required) 299 previous_response: The response from the request for the previous page. (required) 300 301Returns: 302 A request object that you can call 'execute()' on to request the next 303 page. Returns None if there are no more items in the collection. 304 </pre> 305</div> 306 307<div class="method"> 308 <code class="details" id="delete">delete(project, zone, instanceGroup, requestId=None)</code> 309 <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. 310 311Args: 312 project: string, Project ID for this request. (required) 313 zone: string, The name of the zone where the instance group is located. (required) 314 instanceGroup: string, The name of the instance group to delete. (required) 315 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. 316 317For 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. 318 319The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 320 321Returns: 322 An object of the form: 323 324 { # Represents an Operation resource. 325 # 326 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 327 # 328 # Operations can be global, regional or zonal. 329 # - For global operations, use the globalOperations resource. 330 # - For regional operations, use the regionOperations resource. 331 # - For zonal operations, use the zonalOperations resource. 332 # 333 # 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 ==) 334 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 335 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 336 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 337 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 338 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 339 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 340 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 341 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 342 "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. 343 "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. 344 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 345 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 346 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 347 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 348 { 349 "message": "A String", # [Output Only] A human-readable description of the warning code. 350 "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. 351 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 352 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 353 { 354 "value": "A String", # [Output Only] A warning data value corresponding to the key. 355 "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). 356 }, 357 ], 358 }, 359 ], 360 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 361 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 362 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 363 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 364 "name": "A String", # [Output Only] Name of the resource. 365 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 366 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 367 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 368 { 369 "message": "A String", # [Output Only] An optional, human-readable error message. 370 "code": "A String", # [Output Only] The error type identifier for this error. 371 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 372 }, 373 ], 374 }, 375 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 376 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 377 "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. 378 }</pre> 379</div> 380 381<div class="method"> 382 <code class="details" id="get">get(project, zone, instanceGroup)</code> 383 <pre>Returns the specified instance group. Gets a list of available instance groups by making a list() request. 384 385Args: 386 project: string, Project ID for this request. (required) 387 zone: string, The name of the zone where the instance group is located. (required) 388 instanceGroup: string, The name of the instance group. (required) 389 390Returns: 391 An object of the form: 392 393 { # Represents an unmanaged Instance Group resource. 394 # 395 # Use unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. For more information, read Instance groups. 396 # 397 # For zonal unmanaged Instance Group, use instanceGroups resource. 398 # 399 # For regional unmanaged Instance Group, use regionInstanceGroups resource. (== resource_for beta.instanceGroups ==) (== resource_for v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== resource_for v1.regionInstanceGroups ==) 400 "size": 42, # [Output Only] The total number of instances in the instance group. 401 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups. 402 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 403 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources). 404 "region": "A String", # [Output Only] The URL of the region where the instance group is located (for regional resources). 405 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 406 "network": "A String", # The URL of the network to which all instances in the instance group belong. 407 "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. 408 "subnetwork": "A String", # [Output Only] The URL of the subnetwork to which all instances in the instance group belong. 409 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80} 410 # 411 # 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}] 412 # 413 # Named ports apply to all instances in this instance group. 414 { # The named port. For example: . 415 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 416 "port": 42, # The port number, which can be a value between 1 and 65535. 417 }, 418 ], 419 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format. 420 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server. 421 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL. 422 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. 423 }</pre> 424</div> 425 426<div class="method"> 427 <code class="details" id="insert">insert(project, zone, body, requestId=None)</code> 428 <pre>Creates an instance group in the specified project using the parameters that are included in the request. 429 430Args: 431 project: string, Project ID for this request. (required) 432 zone: string, The name of the zone where you want to create the instance group. (required) 433 body: object, The request body. (required) 434 The object takes the form of: 435 436{ # Represents an unmanaged Instance Group resource. 437 # 438 # Use unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. For more information, read Instance groups. 439 # 440 # For zonal unmanaged Instance Group, use instanceGroups resource. 441 # 442 # For regional unmanaged Instance Group, use regionInstanceGroups resource. (== resource_for beta.instanceGroups ==) (== resource_for v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== resource_for v1.regionInstanceGroups ==) 443 "size": 42, # [Output Only] The total number of instances in the instance group. 444 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups. 445 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 446 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources). 447 "region": "A String", # [Output Only] The URL of the region where the instance group is located (for regional resources). 448 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 449 "network": "A String", # The URL of the network to which all instances in the instance group belong. 450 "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. 451 "subnetwork": "A String", # [Output Only] The URL of the subnetwork to which all instances in the instance group belong. 452 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80} 453 # 454 # 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}] 455 # 456 # Named ports apply to all instances in this instance group. 457 { # The named port. For example: . 458 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 459 "port": 42, # The port number, which can be a value between 1 and 65535. 460 }, 461 ], 462 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format. 463 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server. 464 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL. 465 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. 466 } 467 468 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. 469 470For 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. 471 472The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 473 474Returns: 475 An object of the form: 476 477 { # Represents an Operation resource. 478 # 479 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 480 # 481 # Operations can be global, regional or zonal. 482 # - For global operations, use the globalOperations resource. 483 # - For regional operations, use the regionOperations resource. 484 # - For zonal operations, use the zonalOperations resource. 485 # 486 # 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 ==) 487 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 488 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 489 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 490 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 491 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 492 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 493 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 494 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 495 "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. 496 "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. 497 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 498 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 499 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 500 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 501 { 502 "message": "A String", # [Output Only] A human-readable description of the warning code. 503 "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. 504 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 505 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 506 { 507 "value": "A String", # [Output Only] A warning data value corresponding to the key. 508 "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). 509 }, 510 ], 511 }, 512 ], 513 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 514 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 515 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 516 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 517 "name": "A String", # [Output Only] Name of the resource. 518 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 519 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 520 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 521 { 522 "message": "A String", # [Output Only] An optional, human-readable error message. 523 "code": "A String", # [Output Only] The error type identifier for this error. 524 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 525 }, 526 ], 527 }, 528 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 529 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 530 "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. 531 }</pre> 532</div> 533 534<div class="method"> 535 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 536 <pre>Retrieves the list of instance groups that are located in the specified project and zone. 537 538Args: 539 project: string, Project ID for this request. (required) 540 zone: string, The name of the zone where the instance group is located. (required) 541 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 542 543You 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. 544 545Currently, only sorting by name or creationTimestamp desc is supported. 546 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) 547 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. 548 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 <. 549 550For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. 551 552You 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. 553 554To 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). 555 556Returns: 557 An object of the form: 558 559 { # A list of InstanceGroup resources. 560 "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. 561 "kind": "compute#instanceGroupList", # [Output Only] The resource type, which is always compute#instanceGroupList for instance group lists. 562 "items": [ # A list of InstanceGroup resources. 563 { # Represents an unmanaged Instance Group resource. 564 # 565 # Use unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. For more information, read Instance groups. 566 # 567 # For zonal unmanaged Instance Group, use instanceGroups resource. 568 # 569 # For regional unmanaged Instance Group, use regionInstanceGroups resource. (== resource_for beta.instanceGroups ==) (== resource_for v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== resource_for v1.regionInstanceGroups ==) 570 "size": 42, # [Output Only] The total number of instances in the instance group. 571 "kind": "compute#instanceGroup", # [Output Only] The resource type, which is always compute#instanceGroup for instance groups. 572 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 573 "zone": "A String", # [Output Only] The URL of the zone where the instance group is located (for zonal resources). 574 "region": "A String", # [Output Only] The URL of the region where the instance group is located (for regional resources). 575 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 576 "network": "A String", # The URL of the network to which all instances in the instance group belong. 577 "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. 578 "subnetwork": "A String", # [Output Only] The URL of the subnetwork to which all instances in the instance group belong. 579 "namedPorts": [ # Assigns a name to a port number. For example: {name: "http", port: 80} 580 # 581 # 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}] 582 # 583 # Named ports apply to all instances in this instance group. 584 { # The named port. For example: . 585 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 586 "port": 42, # The port number, which can be a value between 1 and 65535. 587 }, 588 ], 589 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance group in RFC3339 text format. 590 "id": "A String", # [Output Only] A unique identifier for this instance group, generated by the server. 591 "selfLink": "A String", # [Output Only] The URL for this instance group. The server generates this URL. 592 "name": "A String", # The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. 593 }, 594 ], 595 "warning": { # [Output Only] Informational warning message. 596 "message": "A String", # [Output Only] A human-readable description of the warning code. 597 "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. 598 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 599 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 600 { 601 "value": "A String", # [Output Only] A warning data value corresponding to the key. 602 "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). 603 }, 604 ], 605 }, 606 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 607 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 608 }</pre> 609</div> 610 611<div class="method"> 612 <code class="details" id="listInstances">listInstances(project, zone, instanceGroup, body, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 613 <pre>Lists the instances in the specified instance group. 614 615Args: 616 project: string, Project ID for this request. (required) 617 zone: string, The name of the zone where the instance group is located. (required) 618 instanceGroup: string, The name of the instance group from which you want to generate a list of included instances. (required) 619 body: object, The request body. (required) 620 The object takes the form of: 621 622{ 623 "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. 624 } 625 626 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 627 628You 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. 629 630Currently, only sorting by name or creationTimestamp desc is supported. 631 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) 632 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. 633 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 <. 634 635For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. 636 637You 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. 638 639To 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). 640 641Returns: 642 An object of the form: 643 644 { 645 "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. 646 "kind": "compute#instanceGroupsListInstances", # [Output Only] The resource type, which is always compute#instanceGroupsListInstances for the list of instances in the specified instance group. 647 "items": [ # A list of InstanceWithNamedPorts resources. 648 { 649 "status": "A String", # [Output Only] The status of the instance. 650 "instance": "A String", # [Output Only] The URL of the instance. 651 "namedPorts": [ # [Output Only] The named ports that belong to this instance group. 652 { # The named port. For example: . 653 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 654 "port": 42, # The port number, which can be a value between 1 and 65535. 655 }, 656 ], 657 }, 658 ], 659 "warning": { # [Output Only] Informational warning message. 660 "message": "A String", # [Output Only] A human-readable description of the warning code. 661 "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. 662 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 663 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 664 { 665 "value": "A String", # [Output Only] A warning data value corresponding to the key. 666 "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). 667 }, 668 ], 669 }, 670 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 671 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 672 }</pre> 673</div> 674 675<div class="method"> 676 <code class="details" id="listInstances_next">listInstances_next(previous_request, previous_response)</code> 677 <pre>Retrieves the next page of results. 678 679Args: 680 previous_request: The request for the previous page. (required) 681 previous_response: The response from the request for the previous page. (required) 682 683Returns: 684 A request object that you can call 'execute()' on to request the next 685 page. Returns None if there are no more items in the collection. 686 </pre> 687</div> 688 689<div class="method"> 690 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 691 <pre>Retrieves the next page of results. 692 693Args: 694 previous_request: The request for the previous page. (required) 695 previous_response: The response from the request for the previous page. (required) 696 697Returns: 698 A request object that you can call 'execute()' on to request the next 699 page. Returns None if there are no more items in the collection. 700 </pre> 701</div> 702 703<div class="method"> 704 <code class="details" id="removeInstances">removeInstances(project, zone, instanceGroup, body, requestId=None)</code> 705 <pre>Removes one or more instances from the specified instance group, but does not delete those instances. 706 707If 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. 708 709Args: 710 project: string, Project ID for this request. (required) 711 zone: string, The name of the zone where the instance group is located. (required) 712 instanceGroup: string, The name of the instance group where the specified instances will be removed. (required) 713 body: object, The request body. (required) 714 The object takes the form of: 715 716{ 717 "instances": [ # The list of instances to remove from the instance group. 718 { 719 "instance": "A String", # The URL for a specific instance. 720 }, 721 ], 722 } 723 724 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. 725 726For 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. 727 728The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 729 730Returns: 731 An object of the form: 732 733 { # Represents an Operation resource. 734 # 735 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 736 # 737 # Operations can be global, regional or zonal. 738 # - For global operations, use the globalOperations resource. 739 # - For regional operations, use the regionOperations resource. 740 # - For zonal operations, use the zonalOperations resource. 741 # 742 # 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 ==) 743 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 744 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 745 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 746 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 747 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 748 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 749 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 750 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 751 "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. 752 "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. 753 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 754 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 755 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 756 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 757 { 758 "message": "A String", # [Output Only] A human-readable description of the warning code. 759 "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. 760 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 761 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 762 { 763 "value": "A String", # [Output Only] A warning data value corresponding to the key. 764 "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). 765 }, 766 ], 767 }, 768 ], 769 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 770 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 771 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 772 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 773 "name": "A String", # [Output Only] Name of the resource. 774 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 775 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 776 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 777 { 778 "message": "A String", # [Output Only] An optional, human-readable error message. 779 "code": "A String", # [Output Only] The error type identifier for this error. 780 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 781 }, 782 ], 783 }, 784 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 785 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 786 "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. 787 }</pre> 788</div> 789 790<div class="method"> 791 <code class="details" id="setNamedPorts">setNamedPorts(project, zone, instanceGroup, body, requestId=None)</code> 792 <pre>Sets the named ports for the specified instance group. 793 794Args: 795 project: string, Project ID for this request. (required) 796 zone: string, The name of the zone where the instance group is located. (required) 797 instanceGroup: string, The name of the instance group where the named ports are updated. (required) 798 body: object, The request body. (required) 799 The object takes the form of: 800 801{ 802 "namedPorts": [ # The list of named ports to set for this instance group. 803 { # The named port. For example: . 804 "name": "A String", # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. 805 "port": 42, # The port number, which can be a value between 1 and 65535. 806 }, 807 ], 808 "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. A request with an incorrect fingerprint will fail with error 412 conditionNotMet. 809 } 810 811 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. 812 813For 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. 814 815The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 816 817Returns: 818 An object of the form: 819 820 { # Represents an Operation resource. 821 # 822 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 823 # 824 # Operations can be global, regional or zonal. 825 # - For global operations, use the globalOperations resource. 826 # - For regional operations, use the regionOperations resource. 827 # - For zonal operations, use the zonalOperations resource. 828 # 829 # 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 ==) 830 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 831 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 832 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 833 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 834 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 835 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 836 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 837 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 838 "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. 839 "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. 840 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 841 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 842 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 843 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 844 { 845 "message": "A String", # [Output Only] A human-readable description of the warning code. 846 "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. 847 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 848 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 849 { 850 "value": "A String", # [Output Only] A warning data value corresponding to the key. 851 "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). 852 }, 853 ], 854 }, 855 ], 856 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 857 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 858 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 859 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 860 "name": "A String", # [Output Only] Name of the resource. 861 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 862 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 863 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 864 { 865 "message": "A String", # [Output Only] An optional, human-readable error message. 866 "code": "A String", # [Output Only] The error type identifier for this error. 867 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 868 }, 869 ], 870 }, 871 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 872 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 873 "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. 874 }</pre> 875</div> 876 877<div class="method"> 878 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code> 879 <pre>Returns permissions that a caller has on the specified resource. 880 881Args: 882 project: string, Project ID for this request. (required) 883 zone: string, The name of the zone for this request. (required) 884 resource: string, Name or id of the resource for this request. (required) 885 body: object, The request body. (required) 886 The object takes the form of: 887 888{ 889 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. 890 "A String", 891 ], 892 } 893 894 895Returns: 896 An object of the form: 897 898 { 899 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. 900 "A String", 901 ], 902 }</pre> 903</div> 904 905</body></html>