blob: 1c7ff53974e5048a6439ef5341606e58a6296888 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<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_beta.html">Compute Engine API</a> . <a href="compute_beta.nodeGroups.html">nodeGroups</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addNodes">addNodes(project, zone, nodeGroup, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Adds specified number of nodes to the node group.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.</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, nodeGroup, requestId=None)</a></code></p>
88<p class="firstline">Deletes the specified NodeGroup resource.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#deleteNodes">deleteNodes(project, zone, nodeGroup, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Deletes specified nodes from the node group.</p>
92<p class="toc_element">
93 <code><a href="#get">get(project, zone, nodeGroup)</a></code></p>
94<p class="firstline">Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the "nodes" field should not be used. Use nodeGroups.listNodes instead.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#insert">insert(project, zone, initialNodeCount, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Creates a NodeGroup resource in the specified project using the data included in the request.</p>
101<p class="toc_element">
102 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
103<p class="firstline">Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.</p>
104<p class="toc_element">
105 <code><a href="#listNodes">listNodes(project, zone, nodeGroup, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
106<p class="firstline">Lists nodes in the node group.</p>
107<p class="toc_element">
108 <code><a href="#listNodes_next">listNodes_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
111 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
112<p class="firstline">Retrieves the next page of results.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#patch">patch(project, zone, nodeGroup, body=None, requestId=None)</a></code></p>
115<p class="firstline">Updates the specified node group.</p>
116<p class="toc_element">
117 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#setNodeTemplate">setNodeTemplate(project, zone, nodeGroup, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121<p class="firstline">Updates the node template of the node group.</p>
122<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
125<h3>Method Details</h3>
126<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700127 <code class="details" id="addNodes">addNodes(project, zone, nodeGroup, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700128 <pre>Adds specified number of nodes to the node group.
129
130Args:
131 project: string, Project ID for this request. (required)
132 zone: string, The name of the zone for this request. (required)
133 nodeGroup: string, Name of the NodeGroup resource. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700134 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135 The object takes the form of:
136
137{
138 "additionalNodeCount": 42, # Count of additional nodes to be added to the node group.
139 }
140
141 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.
142
143For 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.
144
145The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
146
147Returns:
148 An object of the form:
149
150 { # Represents an Operation resource.
151 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700152 # Google Compute Engine has three Operation resources:
153 #
154 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
155 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700156 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
157 #
158 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 # - For global operations, use the `globalOperations` resource.
160 # - For regional operations, use the `regionOperations` resource.
161 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700162 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700163 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700164 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
165 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
166 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700167 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700168 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
169 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700170 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
171 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700172 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700173 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700174 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700175 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700176 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
177 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
178 {
179 "message": "A String", # [Output Only] A human-readable description of the warning code.
180 "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.
181 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
182 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
183 {
184 "value": "A String", # [Output Only] A warning data value corresponding to the key.
185 "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).
186 },
187 ],
188 },
189 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700190 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700191 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700192 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
193 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700194 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
195 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
196 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
197 {
198 "message": "A String", # [Output Only] An optional, human-readable error message.
199 "code": "A String", # [Output Only] The error type identifier for this error.
200 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
201 },
202 ],
203 },
204 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
205 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
206 "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.
207 }</pre>
208</div>
209
210<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700211 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700212 <pre>Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.
213
214Args:
215 project: string, Project ID for this request. (required)
216 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
217
Dan O'Mearadd494642020-05-01 07:42:23 -0700218You 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700219
Dan O'Mearadd494642020-05-01 07:42:23 -0700220Currently, only sorting by `name` or `creationTimestamp desc` is supported.
221 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`)
222 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.
223 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 `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700224
Dan O'Mearadd494642020-05-01 07:42:23 -0700225For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700226
Dan O'Mearadd494642020-05-01 07:42:23 -0700227You 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700228
Dan O'Mearadd494642020-05-01 07:42:23 -0700229To 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) ```
230 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231
232Returns:
233 An object of the form:
234
235 {
236 "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.
237 "kind": "compute#nodeGroupAggregatedList", # [Output Only] Type of resource.Always compute#nodeGroupAggregatedList for aggregated lists of node groups.
238 "items": { # A list of NodeGroupsScopedList resources.
239 "a_key": { # [Output Only] Name of the scope containing this set of node groups.
240 "warning": { # [Output Only] An informational warning that appears when the nodeGroup list is empty.
241 "message": "A String", # [Output Only] A human-readable description of the warning code.
242 "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.
243 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
244 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
245 {
246 "value": "A String", # [Output Only] A warning data value corresponding to the key.
247 "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).
248 },
249 ],
250 },
251 "nodeGroups": [ # [Output Only] A list of node groups contained in this scope.
252 { # Represent a sole-tenant Node Group resource.
253 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700254 # A sole-tenant node is a physical server that is dedicated to hosting VM instances only for your specific project. Use sole-tenant nodes to keep your instances physically separated from instances in other projects, or to group your instances together on the same host hardware. For more information, read Sole-tenant nodes. (== resource_for {$api_version}.nodeGroups ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700255 "status": "A String",
256 "kind": "compute#nodeGroup", # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
257 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
258 "zone": "A String", # [Output Only] The name of the zone where the node group resides, such as us-central1-a.
Dan O'Mearadd494642020-05-01 07:42:23 -0700259 "maintenancePolicy": "A String", # Specifies how to handle instances when a node in the group undergoes maintenance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700260 "nodeTemplate": "A String", # The URL of the node template to which this node group belongs.
Dan O'Mearadd494642020-05-01 07:42:23 -0700261 "autoscalingPolicy": { # Specifies how autoscaling should behave.
262 "maxNodes": 42, # The maximum number of nodes that the group should have.
263 "minNodes": 42, # The minimum number of nodes that the group should have.
264 "mode": "A String", # The autoscaling mode.
265 },
266 "fingerprint": "A String",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700267 "size": 42, # [Output Only] The total number of nodes in the node group.
268 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
269 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
270 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
271 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
272 },
273 ],
274 },
275 },
276 "warning": { # [Output Only] Informational warning message.
277 "message": "A String", # [Output Only] A human-readable description of the warning code.
278 "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.
279 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
280 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
281 {
282 "value": "A String", # [Output Only] A warning data value corresponding to the key.
283 "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).
284 },
285 ],
286 },
287 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
288 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
289 }</pre>
290</div>
291
292<div class="method">
293 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
294 <pre>Retrieves the next page of results.
295
296Args:
297 previous_request: The request for the previous page. (required)
298 previous_response: The response from the request for the previous page. (required)
299
300Returns:
301 A request object that you can call 'execute()' on to request the next
302 page. Returns None if there are no more items in the collection.
303 </pre>
304</div>
305
306<div class="method">
307 <code class="details" id="delete">delete(project, zone, nodeGroup, requestId=None)</code>
308 <pre>Deletes the specified NodeGroup resource.
309
310Args:
311 project: string, Project ID for this request. (required)
312 zone: string, The name of the zone for this request. (required)
313 nodeGroup: string, Name of the NodeGroup resource to delete. (required)
314 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.
315
316For 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.
317
318The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
319
320Returns:
321 An object of the form:
322
323 { # Represents an Operation resource.
324 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700325 # Google Compute Engine has three Operation resources:
326 #
327 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
328 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700329 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
330 #
331 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700332 # - For global operations, use the `globalOperations` resource.
333 # - For regional operations, use the `regionOperations` resource.
334 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700335 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700336 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700337 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
338 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
339 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700340 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700341 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
342 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700343 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
344 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700345 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700346 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700347 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700348 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
350 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
351 {
352 "message": "A String", # [Output Only] A human-readable description of the warning code.
353 "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.
354 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
355 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
356 {
357 "value": "A String", # [Output Only] A warning data value corresponding to the key.
358 "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).
359 },
360 ],
361 },
362 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700363 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700364 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700365 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
366 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700367 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
368 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
369 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
370 {
371 "message": "A String", # [Output Only] An optional, human-readable error message.
372 "code": "A String", # [Output Only] The error type identifier for this error.
373 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
374 },
375 ],
376 },
377 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
378 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
379 "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.
380 }</pre>
381</div>
382
383<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700384 <code class="details" id="deleteNodes">deleteNodes(project, zone, nodeGroup, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 <pre>Deletes specified nodes from the node group.
386
387Args:
388 project: string, Project ID for this request. (required)
389 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700390 nodeGroup: string, Name of the NodeGroup resource whose nodes will be deleted. (required)
391 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700392 The object takes the form of:
393
394{
Dan O'Mearadd494642020-05-01 07:42:23 -0700395 "nodes": [ # Names of the nodes to delete.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700396 "A String",
397 ],
398 }
399
400 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.
401
402For 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.
403
404The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
405
406Returns:
407 An object of the form:
408
409 { # Represents an Operation resource.
410 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700411 # Google Compute Engine has three Operation resources:
412 #
413 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
414 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700415 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
416 #
417 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700418 # - For global operations, use the `globalOperations` resource.
419 # - For regional operations, use the `regionOperations` resource.
420 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700421 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700422 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700423 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
424 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
425 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700426 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
428 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700429 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
430 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700431 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700432 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700433 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700434 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700435 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
436 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
437 {
438 "message": "A String", # [Output Only] A human-readable description of the warning code.
439 "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.
440 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
441 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
442 {
443 "value": "A String", # [Output Only] A warning data value corresponding to the key.
444 "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).
445 },
446 ],
447 },
448 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700449 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700450 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700451 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
452 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700453 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
454 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
455 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
456 {
457 "message": "A String", # [Output Only] An optional, human-readable error message.
458 "code": "A String", # [Output Only] The error type identifier for this error.
459 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
460 },
461 ],
462 },
463 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
464 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
465 "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.
466 }</pre>
467</div>
468
469<div class="method">
470 <code class="details" id="get">get(project, zone, nodeGroup)</code>
471 <pre>Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the "nodes" field should not be used. Use nodeGroups.listNodes instead.
472
473Args:
474 project: string, Project ID for this request. (required)
475 zone: string, The name of the zone for this request. (required)
476 nodeGroup: string, Name of the node group to return. (required)
477
478Returns:
479 An object of the form:
480
481 { # Represent a sole-tenant Node Group resource.
482 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700483 # A sole-tenant node is a physical server that is dedicated to hosting VM instances only for your specific project. Use sole-tenant nodes to keep your instances physically separated from instances in other projects, or to group your instances together on the same host hardware. For more information, read Sole-tenant nodes. (== resource_for {$api_version}.nodeGroups ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700484 "status": "A String",
485 "kind": "compute#nodeGroup", # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
486 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
487 "zone": "A String", # [Output Only] The name of the zone where the node group resides, such as us-central1-a.
Dan O'Mearadd494642020-05-01 07:42:23 -0700488 "maintenancePolicy": "A String", # Specifies how to handle instances when a node in the group undergoes maintenance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700489 "nodeTemplate": "A String", # The URL of the node template to which this node group belongs.
Dan O'Mearadd494642020-05-01 07:42:23 -0700490 "autoscalingPolicy": { # Specifies how autoscaling should behave.
491 "maxNodes": 42, # The maximum number of nodes that the group should have.
492 "minNodes": 42, # The minimum number of nodes that the group should have.
493 "mode": "A String", # The autoscaling mode.
494 },
495 "fingerprint": "A String",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700496 "size": 42, # [Output Only] The total number of nodes in the node group.
497 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
498 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
499 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
500 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
501 }</pre>
502</div>
503
504<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700505 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700506 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
507
508Args:
509 project: string, Project ID for this request. (required)
510 zone: string, The name of the zone for this request. (required)
511 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700512 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700513
514Returns:
515 An object of the form:
516
Dan O'Mearadd494642020-05-01 07:42:23 -0700517 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700518 #
519 #
520 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700521 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700522 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700523 # Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700524 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700525 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700526 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700527 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700528 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700529 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700530 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700531 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700532 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700533 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700534 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
535 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
536 #
537 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
538 #
539 # Example Policy with multiple AuditConfigs:
540 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700541 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700543 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700544 "exemptedMembers": [
545 "A String",
546 ],
547 "auditLogConfigs": [ # The configuration for logging of each type of permission.
548 { # Provides the configuration for logging a type of permissions. Example:
549 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700550 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700552 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700553 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
554 "A String",
555 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700556 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700557 "logType": "A String", # The log type that this config enables.
558 },
559 ],
560 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
561 },
562 ],
563 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
564 { # A rule to be applied in a Policy.
565 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
566 { # Specifies what kind of log the caller must write
567 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
568 #
569 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
570 #
571 # Field names correspond to IAM request parameters and field values are their respective values.
572 #
573 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
574 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700575 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700576 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -0700577 "customFields": [ # Custom fields.
578 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
579 "name": "A String", # Name is the field name.
580 "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
581 },
582 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 "metric": "A String", # The metric to update.
584 },
585 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -0700586 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700587 },
588 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
589 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
590 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
591 "permissionType": "A String", # The type of the permission that was checked.
592 },
593 },
594 },
595 ],
596 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
597 "A String",
598 ],
599 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
600 "A String",
601 ],
602 "action": "A String", # Required
603 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
604 "A String",
605 ],
606 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
607 { # A condition to be met.
608 "iam": "A String", # Trusted attributes supplied by the IAM system.
609 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
610 "values": [ # The objects of the condition.
611 "A String",
612 ],
613 "svc": "A String", # Trusted attributes discharged by the service.
614 "op": "A String", # An operator to apply the subject with.
615 },
616 ],
617 "description": "A String", # Human-readable description of the rule.
618 },
619 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700620 "version": 42, # Specifies the format of the policy.
621 #
622 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
623 #
624 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
625 #
626 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
627 #
628 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
629 #
630 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700631 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
632 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700633 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
634 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700635 { # Associates `members` with a `role`.
636 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
637 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
638 #
639 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
640 #
641 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
642 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700643 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700644 #
645 #
646 #
647 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
648 #
649 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
650 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700651 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
652 #
653 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
654 #
655 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
656 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700657 #
658 #
659 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
660 "A String",
661 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700662 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700663 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700664 # Example (Comparison):
665 #
666 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
667 #
668 # Example (Equality):
669 #
670 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
671 #
672 # Example (Logic):
673 #
674 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
675 #
676 # Example (Data Manipulation):
677 #
678 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
679 #
680 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
681 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700682 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -0700683 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
684 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700685 },
686 },
687 ],
688 "iamOwned": True or False,
689 }</pre>
690</div>
691
692<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700693 <code class="details" id="insert">insert(project, zone, initialNodeCount, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700694 <pre>Creates a NodeGroup resource in the specified project using the data included in the request.
695
696Args:
697 project: string, Project ID for this request. (required)
698 zone: string, The name of the zone for this request. (required)
699 initialNodeCount: integer, Initial count of nodes in the node group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700700 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700701 The object takes the form of:
702
703{ # Represent a sole-tenant Node Group resource.
704 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700705 # A sole-tenant node is a physical server that is dedicated to hosting VM instances only for your specific project. Use sole-tenant nodes to keep your instances physically separated from instances in other projects, or to group your instances together on the same host hardware. For more information, read Sole-tenant nodes. (== resource_for {$api_version}.nodeGroups ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700706 "status": "A String",
707 "kind": "compute#nodeGroup", # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
708 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
709 "zone": "A String", # [Output Only] The name of the zone where the node group resides, such as us-central1-a.
Dan O'Mearadd494642020-05-01 07:42:23 -0700710 "maintenancePolicy": "A String", # Specifies how to handle instances when a node in the group undergoes maintenance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700711 "nodeTemplate": "A String", # The URL of the node template to which this node group belongs.
Dan O'Mearadd494642020-05-01 07:42:23 -0700712 "autoscalingPolicy": { # Specifies how autoscaling should behave.
713 "maxNodes": 42, # The maximum number of nodes that the group should have.
714 "minNodes": 42, # The minimum number of nodes that the group should have.
715 "mode": "A String", # The autoscaling mode.
716 },
717 "fingerprint": "A String",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700718 "size": 42, # [Output Only] The total number of nodes in the node group.
719 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
720 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
721 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
722 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
723 }
724
725 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.
726
727For 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.
728
729The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
730
731Returns:
732 An object of the form:
733
734 { # Represents an Operation resource.
735 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700736 # Google Compute Engine has three Operation resources:
737 #
738 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
739 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700740 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
741 #
742 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700743 # - For global operations, use the `globalOperations` resource.
744 # - For regional operations, use the `regionOperations` resource.
745 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700746 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700747 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700748 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
749 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
750 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700751 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700752 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
753 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700754 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
755 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700756 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700757 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700758 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700759 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700760 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
761 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
762 {
763 "message": "A String", # [Output Only] A human-readable description of the warning code.
764 "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.
765 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
766 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
767 {
768 "value": "A String", # [Output Only] A warning data value corresponding to the key.
769 "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).
770 },
771 ],
772 },
773 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700774 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700775 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700776 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
777 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700778 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
779 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
780 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
781 {
782 "message": "A String", # [Output Only] An optional, human-readable error message.
783 "code": "A String", # [Output Only] The error type identifier for this error.
784 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
785 },
786 ],
787 },
788 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
789 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
790 "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.
791 }</pre>
792</div>
793
794<div class="method">
795 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
796 <pre>Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.
797
798Args:
799 project: string, Project ID for this request. (required)
800 zone: string, The name of the zone for this request. (required)
801 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
802
Dan O'Mearadd494642020-05-01 07:42:23 -0700803You 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700804
Dan O'Mearadd494642020-05-01 07:42:23 -0700805Currently, only sorting by `name` or `creationTimestamp desc` is supported.
806 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`)
807 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.
808 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 `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700809
Dan O'Mearadd494642020-05-01 07:42:23 -0700810For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700811
Dan O'Mearadd494642020-05-01 07:42:23 -0700812You 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700813
Dan O'Mearadd494642020-05-01 07:42:23 -0700814To 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) ```
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700815
816Returns:
817 An object of the form:
818
819 { # Contains a list of nodeGroups.
820 "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.
821 "kind": "compute#nodeGroupList", # [Output Only] Type of resource.Always compute#nodeGroupList for lists of node groups.
822 "items": [ # A list of NodeGroup resources.
823 { # Represent a sole-tenant Node Group resource.
824 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700825 # A sole-tenant node is a physical server that is dedicated to hosting VM instances only for your specific project. Use sole-tenant nodes to keep your instances physically separated from instances in other projects, or to group your instances together on the same host hardware. For more information, read Sole-tenant nodes. (== resource_for {$api_version}.nodeGroups ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700826 "status": "A String",
827 "kind": "compute#nodeGroup", # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
828 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
829 "zone": "A String", # [Output Only] The name of the zone where the node group resides, such as us-central1-a.
Dan O'Mearadd494642020-05-01 07:42:23 -0700830 "maintenancePolicy": "A String", # Specifies how to handle instances when a node in the group undergoes maintenance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700831 "nodeTemplate": "A String", # The URL of the node template to which this node group belongs.
Dan O'Mearadd494642020-05-01 07:42:23 -0700832 "autoscalingPolicy": { # Specifies how autoscaling should behave.
833 "maxNodes": 42, # The maximum number of nodes that the group should have.
834 "minNodes": 42, # The minimum number of nodes that the group should have.
835 "mode": "A String", # The autoscaling mode.
836 },
837 "fingerprint": "A String",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700838 "size": 42, # [Output Only] The total number of nodes in the node group.
839 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
840 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
841 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
842 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
843 },
844 ],
845 "warning": { # [Output Only] Informational warning message.
846 "message": "A String", # [Output Only] A human-readable description of the warning code.
847 "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.
848 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
849 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
850 {
851 "value": "A String", # [Output Only] A warning data value corresponding to the key.
852 "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).
853 },
854 ],
855 },
856 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
857 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
858 }</pre>
859</div>
860
861<div class="method">
862 <code class="details" id="listNodes">listNodes(project, zone, nodeGroup, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
863 <pre>Lists nodes in the node group.
864
865Args:
866 project: string, Project ID for this request. (required)
867 zone: string, The name of the zone for this request. (required)
868 nodeGroup: string, Name of the NodeGroup resource whose nodes you want to list. (required)
869 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
870
Dan O'Mearadd494642020-05-01 07:42:23 -0700871You 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700872
Dan O'Mearadd494642020-05-01 07:42:23 -0700873Currently, only sorting by `name` or `creationTimestamp desc` is supported.
874 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`)
875 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.
876 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 `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700877
Dan O'Mearadd494642020-05-01 07:42:23 -0700878For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700879
Dan O'Mearadd494642020-05-01 07:42:23 -0700880You 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700881
Dan O'Mearadd494642020-05-01 07:42:23 -0700882To 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) ```
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700883
884Returns:
885 An object of the form:
886
887 {
888 "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.
889 "kind": "compute#nodeGroupsListNodes", # [Output Only] The resource type, which is always compute.nodeGroupsListNodes for the list of nodes in the specified node group.
890 "items": [ # A list of Node resources.
891 {
892 "status": "A String",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700893 "serverBinding": { # Binding properties for the physical server.
894 "type": "A String",
895 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700896 "nodeType": "A String", # The type of this node.
897 "name": "A String", # The name of the node.
898 "cpuOvercommitType": "A String", # CPU overcommit.
899 "instances": [ # Instances scheduled on this node.
900 "A String",
901 ],
902 "serverId": "A String", # Server ID associated with this node.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700903 },
904 ],
905 "warning": { # [Output Only] Informational warning message.
906 "message": "A String", # [Output Only] A human-readable description of the warning code.
907 "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.
908 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
909 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
910 {
911 "value": "A String", # [Output Only] A warning data value corresponding to the key.
912 "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).
913 },
914 ],
915 },
916 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
917 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
918 }</pre>
919</div>
920
921<div class="method">
922 <code class="details" id="listNodes_next">listNodes_next(previous_request, previous_response)</code>
923 <pre>Retrieves the next page of results.
924
925Args:
926 previous_request: The request for the previous page. (required)
927 previous_response: The response from the request for the previous page. (required)
928
929Returns:
930 A request object that you can call 'execute()' on to request the next
931 page. Returns None if there are no more items in the collection.
932 </pre>
933</div>
934
935<div class="method">
936 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
937 <pre>Retrieves the next page of results.
938
939Args:
940 previous_request: The request for the previous page. (required)
941 previous_response: The response from the request for the previous page. (required)
942
943Returns:
944 A request object that you can call 'execute()' on to request the next
945 page. Returns None if there are no more items in the collection.
946 </pre>
947</div>
948
949<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700950 <code class="details" id="patch">patch(project, zone, nodeGroup, body=None, requestId=None)</code>
951 <pre>Updates the specified node group.
952
953Args:
954 project: string, Project ID for this request. (required)
955 zone: string, The name of the zone for this request. (required)
956 nodeGroup: string, Name of the NodeGroup resource to update. (required)
957 body: object, The request body.
958 The object takes the form of:
959
960{ # Represent a sole-tenant Node Group resource.
961 #
962 # A sole-tenant node is a physical server that is dedicated to hosting VM instances only for your specific project. Use sole-tenant nodes to keep your instances physically separated from instances in other projects, or to group your instances together on the same host hardware. For more information, read Sole-tenant nodes. (== resource_for {$api_version}.nodeGroups ==)
963 "status": "A String",
964 "kind": "compute#nodeGroup", # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
965 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
966 "zone": "A String", # [Output Only] The name of the zone where the node group resides, such as us-central1-a.
967 "maintenancePolicy": "A String", # Specifies how to handle instances when a node in the group undergoes maintenance.
968 "nodeTemplate": "A String", # The URL of the node template to which this node group belongs.
969 "autoscalingPolicy": { # Specifies how autoscaling should behave.
970 "maxNodes": 42, # The maximum number of nodes that the group should have.
971 "minNodes": 42, # The minimum number of nodes that the group should have.
972 "mode": "A String", # The autoscaling mode.
973 },
974 "fingerprint": "A String",
975 "size": 42, # [Output Only] The total number of nodes in the node group.
976 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
977 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
978 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
979 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
980 }
981
982 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.
983
984For 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.
985
986The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
987
988Returns:
989 An object of the form:
990
991 { # Represents an Operation resource.
992 #
993 # Google Compute Engine has three Operation resources:
994 #
995 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
996 #
997 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
998 #
999 # Operations can be global, regional or zonal.
1000 # - For global operations, use the `globalOperations` resource.
1001 # - For regional operations, use the `regionOperations` resource.
1002 # - For zonal operations, use the `zonalOperations` resource.
1003 #
1004 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1005 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1006 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1007 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1008 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1009 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1010 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1011 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1012 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1013 "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.
1014 "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.
1015 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1016 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1017 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1018 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1019 {
1020 "message": "A String", # [Output Only] A human-readable description of the warning code.
1021 "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.
1022 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1023 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1024 {
1025 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1026 "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).
1027 },
1028 ],
1029 },
1030 ],
1031 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
1032 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1033 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1034 "name": "A String", # [Output Only] Name of the operation.
1035 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1036 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1037 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1038 {
1039 "message": "A String", # [Output Only] An optional, human-readable error message.
1040 "code": "A String", # [Output Only] The error type identifier for this error.
1041 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1042 },
1043 ],
1044 },
1045 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1046 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1047 "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.
1048 }</pre>
1049</div>
1050
1051<div class="method">
1052 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001053 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
1054
1055Args:
1056 project: string, Project ID for this request. (required)
1057 zone: string, The name of the zone for this request. (required)
1058 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001059 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001060 The object takes the form of:
1061
1062{
Dan O'Mearadd494642020-05-01 07:42:23 -07001063 "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001064 #
1065 #
1066 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001067 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001068 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001069 # Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001070 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001071 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001072 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001073 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001074 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001075 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001076 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001077 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001078 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001079 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001080 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1081 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
1082 #
1083 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
1084 #
1085 # Example Policy with multiple AuditConfigs:
1086 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001087 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001088 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001089 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001090 "exemptedMembers": [
1091 "A String",
1092 ],
1093 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1094 { # Provides the configuration for logging a type of permissions. Example:
1095 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001096 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001097 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001098 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001099 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1100 "A String",
1101 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001102 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001103 "logType": "A String", # The log type that this config enables.
1104 },
1105 ],
1106 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
1107 },
1108 ],
1109 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1110 { # A rule to be applied in a Policy.
1111 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1112 { # Specifies what kind of log the caller must write
1113 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
1114 #
1115 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
1116 #
1117 # Field names correspond to IAM request parameters and field values are their respective values.
1118 #
1119 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
1120 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001121 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001122 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07001123 "customFields": [ # Custom fields.
1124 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1125 "name": "A String", # Name is the field name.
1126 "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
1127 },
1128 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001129 "metric": "A String", # The metric to update.
1130 },
1131 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07001132 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001133 },
1134 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
1135 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
1136 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1137 "permissionType": "A String", # The type of the permission that was checked.
1138 },
1139 },
1140 },
1141 ],
1142 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1143 "A String",
1144 ],
1145 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1146 "A String",
1147 ],
1148 "action": "A String", # Required
1149 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
1150 "A String",
1151 ],
1152 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1153 { # A condition to be met.
1154 "iam": "A String", # Trusted attributes supplied by the IAM system.
1155 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1156 "values": [ # The objects of the condition.
1157 "A String",
1158 ],
1159 "svc": "A String", # Trusted attributes discharged by the service.
1160 "op": "A String", # An operator to apply the subject with.
1161 },
1162 ],
1163 "description": "A String", # Human-readable description of the rule.
1164 },
1165 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001166 "version": 42, # Specifies the format of the policy.
1167 #
1168 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1169 #
1170 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1171 #
1172 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
1173 #
1174 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1175 #
1176 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001177 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
1178 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001179 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1180 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001181 { # Associates `members` with a `role`.
1182 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1183 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1184 #
1185 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1186 #
1187 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1188 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001189 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001190 #
1191 #
1192 #
1193 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1194 #
1195 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1196 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001197 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1198 #
1199 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1200 #
1201 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
1202 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001203 #
1204 #
1205 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1206 "A String",
1207 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001208 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001209 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001210 # Example (Comparison):
1211 #
1212 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1213 #
1214 # Example (Equality):
1215 #
1216 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1217 #
1218 # Example (Logic):
1219 #
1220 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1221 #
1222 # Example (Data Manipulation):
1223 #
1224 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1225 #
1226 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1227 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001228 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07001229 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1230 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001231 },
1232 },
1233 ],
1234 "iamOwned": True or False,
1235 },
1236 "bindings": [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.
1237 { # Associates `members` with a `role`.
1238 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1239 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1240 #
1241 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1242 #
1243 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1244 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001245 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001246 #
1247 #
1248 #
1249 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1250 #
1251 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1252 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001253 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1254 #
1255 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1256 #
1257 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
1258 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001259 #
1260 #
1261 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1262 "A String",
1263 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001264 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001265 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001266 # Example (Comparison):
1267 #
1268 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1269 #
1270 # Example (Equality):
1271 #
1272 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1273 #
1274 # Example (Logic):
1275 #
1276 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1277 #
1278 # Example (Data Manipulation):
1279 #
1280 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1281 #
1282 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1283 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001284 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07001285 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1286 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001287 },
1288 },
1289 ],
1290 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag.
1291 }
1292
1293
1294Returns:
1295 An object of the form:
1296
Dan O'Mearadd494642020-05-01 07:42:23 -07001297 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001298 #
1299 #
1300 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001301 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001302 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001303 # Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001304 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001305 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001306 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001307 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001308 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001309 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001310 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001311 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001312 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001313 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001314 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1315 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
1316 #
1317 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
1318 #
1319 # Example Policy with multiple AuditConfigs:
1320 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001321 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001322 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001323 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001324 "exemptedMembers": [
1325 "A String",
1326 ],
1327 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1328 { # Provides the configuration for logging a type of permissions. Example:
1329 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001330 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001331 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001332 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001333 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1334 "A String",
1335 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001336 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001337 "logType": "A String", # The log type that this config enables.
1338 },
1339 ],
1340 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
1341 },
1342 ],
1343 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1344 { # A rule to be applied in a Policy.
1345 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1346 { # Specifies what kind of log the caller must write
1347 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
1348 #
1349 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
1350 #
1351 # Field names correspond to IAM request parameters and field values are their respective values.
1352 #
1353 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
1354 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001355 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001356 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07001357 "customFields": [ # Custom fields.
1358 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1359 "name": "A String", # Name is the field name.
1360 "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
1361 },
1362 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001363 "metric": "A String", # The metric to update.
1364 },
1365 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07001366 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001367 },
1368 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
1369 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
1370 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1371 "permissionType": "A String", # The type of the permission that was checked.
1372 },
1373 },
1374 },
1375 ],
1376 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1377 "A String",
1378 ],
1379 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1380 "A String",
1381 ],
1382 "action": "A String", # Required
1383 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
1384 "A String",
1385 ],
1386 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1387 { # A condition to be met.
1388 "iam": "A String", # Trusted attributes supplied by the IAM system.
1389 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1390 "values": [ # The objects of the condition.
1391 "A String",
1392 ],
1393 "svc": "A String", # Trusted attributes discharged by the service.
1394 "op": "A String", # An operator to apply the subject with.
1395 },
1396 ],
1397 "description": "A String", # Human-readable description of the rule.
1398 },
1399 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001400 "version": 42, # Specifies the format of the policy.
1401 #
1402 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1403 #
1404 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1405 #
1406 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
1407 #
1408 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1409 #
1410 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001411 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
1412 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001413 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1414 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001415 { # Associates `members` with a `role`.
1416 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1417 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1418 #
1419 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1420 #
1421 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1422 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001423 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001424 #
1425 #
1426 #
1427 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1428 #
1429 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1430 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001431 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1432 #
1433 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1434 #
1435 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
1436 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001437 #
1438 #
1439 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1440 "A String",
1441 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001442 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001443 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001444 # Example (Comparison):
1445 #
1446 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1447 #
1448 # Example (Equality):
1449 #
1450 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1451 #
1452 # Example (Logic):
1453 #
1454 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1455 #
1456 # Example (Data Manipulation):
1457 #
1458 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1459 #
1460 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1461 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001462 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07001463 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1464 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001465 },
1466 },
1467 ],
1468 "iamOwned": True or False,
1469 }</pre>
1470</div>
1471
1472<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001473 <code class="details" id="setNodeTemplate">setNodeTemplate(project, zone, nodeGroup, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001474 <pre>Updates the node template of the node group.
1475
1476Args:
1477 project: string, Project ID for this request. (required)
1478 zone: string, The name of the zone for this request. (required)
1479 nodeGroup: string, Name of the NodeGroup resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001480 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001481 The object takes the form of:
1482
1483{
1484 "nodeTemplate": "A String", # Full or partial URL of the node template resource to be updated for this node group.
1485 }
1486
1487 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.
1488
1489For 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.
1490
1491The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1492
1493Returns:
1494 An object of the form:
1495
1496 { # Represents an Operation resource.
1497 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001498 # Google Compute Engine has three Operation resources:
1499 #
1500 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1501 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001502 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1503 #
1504 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001505 # - For global operations, use the `globalOperations` resource.
1506 # - For regional operations, use the `regionOperations` resource.
1507 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001508 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001509 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001510 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1511 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1512 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001513 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001514 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1515 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001516 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1517 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001518 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001519 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001520 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001521 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001522 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1523 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1524 {
1525 "message": "A String", # [Output Only] A human-readable description of the warning code.
1526 "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.
1527 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1528 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1529 {
1530 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1531 "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).
1532 },
1533 ],
1534 },
1535 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001536 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001537 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001538 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1539 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001540 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1541 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1542 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1543 {
1544 "message": "A String", # [Output Only] An optional, human-readable error message.
1545 "code": "A String", # [Output Only] The error type identifier for this error.
1546 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1547 },
1548 ],
1549 },
1550 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1551 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1552 "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.
1553 }</pre>
1554</div>
1555
1556<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001557 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001558 <pre>Returns permissions that a caller has on the specified resource.
1559
1560Args:
1561 project: string, Project ID for this request. (required)
1562 zone: string, The name of the zone for this request. (required)
1563 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001564 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001565 The object takes the form of:
1566
1567{
1568 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1569 "A String",
1570 ],
1571 }
1572
1573
1574Returns:
1575 An object of the form:
1576
1577 {
1578 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1579 "A String",
1580 ],
1581 }</pre>
1582</div>
1583
1584</body></html>