blob: 8a9639dc94d48c07abbe19440d82ed4d1b0e95bc [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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.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, returnPartialSuccess=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">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#list">list(project, zone, orderBy=None, pageToken=None, maxResults=None, returnPartialSuccess=None, filter=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<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">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#listNodes">listNodes(project, zone, nodeGroup, orderBy=None, pageToken=None, maxResults=None, returnPartialSuccess=None, filter=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <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 ],
190 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700191 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700192 "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 -0700193 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
194 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700195 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
196 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
197 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
198 {
199 "message": "A String", # [Output Only] An optional, human-readable error message.
200 "code": "A String", # [Output Only] The error type identifier for this error.
201 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
202 },
203 ],
204 },
205 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
206 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
207 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
208 }</pre>
209</div>
210
211<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700212 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None, includeAllScopes=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700213 <pre>Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.
214
215Args:
216 project: string, Project ID for this request. (required)
217 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
218
Dan O'Mearadd494642020-05-01 07:42:23 -0700219You 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 -0700220
Dan O'Mearadd494642020-05-01 07:42:23 -0700221Currently, only sorting by `name` or `creationTimestamp desc` is supported.
222 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
223 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
224 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
225 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 -0700226
Dan O'Mearadd494642020-05-01 07:42:23 -0700227For 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 -0700228
Dan O'Mearadd494642020-05-01 07:42:23 -0700229You 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 -0700230
Dan O'Mearadd494642020-05-01 07:42:23 -0700231To 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) ```
232 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 -0700233
234Returns:
235 An object of the form:
236
237 {
238 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
239 "kind": "compute#nodeGroupAggregatedList", # [Output Only] Type of resource.Always compute#nodeGroupAggregatedList for aggregated lists of node groups.
240 "items": { # A list of NodeGroupsScopedList resources.
241 "a_key": { # [Output Only] Name of the scope containing this set of node groups.
242 "warning": { # [Output Only] An informational warning that appears when the nodeGroup list is empty.
243 "message": "A String", # [Output Only] A human-readable description of the warning code.
244 "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.
245 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
246 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
247 {
248 "value": "A String", # [Output Only] A warning data value corresponding to the key.
249 "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).
250 },
251 ],
252 },
253 "nodeGroups": [ # [Output Only] A list of node groups contained in this scope.
254 { # Represent a sole-tenant Node Group resource.
255 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700256 # 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 -0700257 "size": 42, # [Output Only] The total number of nodes in the node group.
258 "status": "A String",
259 "kind": "compute#nodeGroup", # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
260 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
261 "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 -0700262 "maintenanceWindow": { # Time window specified for daily maintenance operations. GCE's internal maintenance will be performed within this window.
263 "duration": "A String", # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
264 "startTime": "A String", # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700265 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700266 "maintenancePolicy": "A String", # Specifies how to handle instances when a node in the group undergoes maintenance.
267 "locationHint": "A String", # An opaque location hint used to place the Node close to other resources. This field is for use by internal tools that use the public API. The location hint here on the NodeGroup overrides any location_hint present in the NodeTemplate.
268 "autoscalingPolicy": { # Specifies how autoscaling should behave.
269 "maxNodes": 42, # The maximum number of nodes that the group should have.
270 "minNodes": 42, # The minimum number of nodes that the group should have.
271 "mode": "A String", # The autoscaling mode.
272 },
273 "nodeTemplate": "A String", # The URL of the node template to which this node group belongs.
274 "fingerprint": "A String",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700275 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
276 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
277 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
278 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
279 "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.
280 },
281 ],
282 },
283 },
284 "warning": { # [Output Only] Informational warning message.
285 "message": "A String", # [Output Only] A human-readable description of the warning code.
286 "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.
287 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
288 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
289 {
290 "value": "A String", # [Output Only] A warning data value corresponding to the key.
291 "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).
292 },
293 ],
294 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700295 "unreachables": [ # [Output Only] Unreachable resources.
296 "A String",
297 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700298 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
299 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
300 }</pre>
301</div>
302
303<div class="method">
304 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
305 <pre>Retrieves the next page of results.
306
307Args:
308 previous_request: The request for the previous page. (required)
309 previous_response: The response from the request for the previous page. (required)
310
311Returns:
312 A request object that you can call 'execute()' on to request the next
313 page. Returns None if there are no more items in the collection.
314 </pre>
315</div>
316
317<div class="method">
318 <code class="details" id="delete">delete(project, zone, nodeGroup, requestId=None)</code>
319 <pre>Deletes the specified NodeGroup resource.
320
321Args:
322 project: string, Project ID for this request. (required)
323 zone: string, The name of the zone for this request. (required)
324 nodeGroup: string, Name of the NodeGroup resource to delete. (required)
325 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.
326
327For 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.
328
329The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
330
331Returns:
332 An object of the form:
333
334 { # Represents an Operation resource.
335 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700336 # Google Compute Engine has three Operation resources:
337 #
338 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
339 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700340 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
341 #
342 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700343 # - For global operations, use the `globalOperations` resource.
344 # - For regional operations, use the `regionOperations` resource.
345 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700346 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700347 # 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 -0700348 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
349 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
350 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700351 "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 -0700352 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
353 "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 -0700354 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
355 "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 -0700356 "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 -0700357 "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 -0700358 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700359 "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 -0700360 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
361 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
362 {
363 "message": "A String", # [Output Only] A human-readable description of the warning code.
364 "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.
365 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
366 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
367 {
368 "value": "A String", # [Output Only] A warning data value corresponding to the key.
369 "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).
370 },
371 ],
372 },
373 ],
374 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700375 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700376 "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 -0700377 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
378 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700379 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
380 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
381 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
382 {
383 "message": "A String", # [Output Only] An optional, human-readable error message.
384 "code": "A String", # [Output Only] The error type identifier for this error.
385 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
386 },
387 ],
388 },
389 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
390 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
391 "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.
392 }</pre>
393</div>
394
395<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700396 <code class="details" id="deleteNodes">deleteNodes(project, zone, nodeGroup, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700397 <pre>Deletes specified nodes from the node group.
398
399Args:
400 project: string, Project ID for this request. (required)
401 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700402 nodeGroup: string, Name of the NodeGroup resource whose nodes will be deleted. (required)
403 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700404 The object takes the form of:
405
406{
Dan O'Mearadd494642020-05-01 07:42:23 -0700407 "nodes": [ # Names of the nodes to delete.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700408 "A String",
409 ],
410 }
411
412 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.
413
414For 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.
415
416The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
417
418Returns:
419 An object of the form:
420
421 { # Represents an Operation resource.
422 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700423 # Google Compute Engine has three Operation resources:
424 #
425 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
426 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
428 #
429 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700430 # - For global operations, use the `globalOperations` resource.
431 # - For regional operations, use the `regionOperations` resource.
432 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700433 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700434 # 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 -0700435 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
436 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
437 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700438 "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 -0700439 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
440 "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 -0700441 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
442 "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 -0700443 "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 -0700444 "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 -0700445 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700446 "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 -0700447 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
448 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
449 {
450 "message": "A String", # [Output Only] A human-readable description of the warning code.
451 "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.
452 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
453 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
454 {
455 "value": "A String", # [Output Only] A warning data value corresponding to the key.
456 "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).
457 },
458 ],
459 },
460 ],
461 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700462 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700463 "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 -0700464 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
465 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700466 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
467 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
468 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
469 {
470 "message": "A String", # [Output Only] An optional, human-readable error message.
471 "code": "A String", # [Output Only] The error type identifier for this error.
472 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
473 },
474 ],
475 },
476 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
477 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
478 "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.
479 }</pre>
480</div>
481
482<div class="method">
483 <code class="details" id="get">get(project, zone, nodeGroup)</code>
484 <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.
485
486Args:
487 project: string, Project ID for this request. (required)
488 zone: string, The name of the zone for this request. (required)
489 nodeGroup: string, Name of the node group to return. (required)
490
491Returns:
492 An object of the form:
493
494 { # Represent a sole-tenant Node Group resource.
495 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700496 # 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 -0700497 "size": 42, # [Output Only] The total number of nodes in the node group.
498 "status": "A String",
499 "kind": "compute#nodeGroup", # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
500 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
501 "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 -0700502 "maintenanceWindow": { # Time window specified for daily maintenance operations. GCE's internal maintenance will be performed within this window.
503 "duration": "A String", # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
504 "startTime": "A String", # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700505 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700506 "maintenancePolicy": "A String", # Specifies how to handle instances when a node in the group undergoes maintenance.
507 "locationHint": "A String", # An opaque location hint used to place the Node close to other resources. This field is for use by internal tools that use the public API. The location hint here on the NodeGroup overrides any location_hint present in the NodeTemplate.
508 "autoscalingPolicy": { # Specifies how autoscaling should behave.
509 "maxNodes": 42, # The maximum number of nodes that the group should have.
510 "minNodes": 42, # The minimum number of nodes that the group should have.
511 "mode": "A String", # The autoscaling mode.
512 },
513 "nodeTemplate": "A String", # The URL of the node template to which this node group belongs.
514 "fingerprint": "A String",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700515 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
516 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
517 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
518 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
519 "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.
520 }</pre>
521</div>
522
523<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700524 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700525 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
526
527Args:
528 project: string, Project ID for this request. (required)
529 zone: string, The name of the zone for this request. (required)
530 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700531 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700532
533Returns:
534 An object of the form:
535
Dan O'Mearadd494642020-05-01 07:42:23 -0700536 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700537 #
538 #
539 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700540 # 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 -0700541 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700542 # 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 -0700543 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700544 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700545 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700546 # { "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 -0700547 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700548 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700549 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700550 # 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 -0700551 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700552 # 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 -0700553 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
554 { # 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.
555 #
556 # 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.
557 #
558 # Example Policy with multiple AuditConfigs:
559 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700560 # { "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 -0700561 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700562 # 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 -0700563 "exemptedMembers": [
564 "A String",
565 ],
566 "auditLogConfigs": [ # The configuration for logging of each type of permission.
567 { # Provides the configuration for logging a type of permissions. Example:
568 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700569 # { "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 -0700570 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700571 # 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 -0700572 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
573 "A String",
574 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700575 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700576 "logType": "A String", # The log type that this config enables.
577 },
578 ],
579 "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.
580 },
581 ],
582 "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.
583 { # A rule to be applied in a Policy.
584 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
585 { # Specifies what kind of log the caller must write
586 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
587 #
588 # 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.
589 #
590 # Field names correspond to IAM request parameters and field values are their respective values.
591 #
592 # 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.
593 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700594 # 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 -0700595 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -0700596 "customFields": [ # Custom fields.
597 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
598 "name": "A String", # Name is the field name.
599 "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.
600 },
601 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700602 "metric": "A String", # The metric to update.
603 },
604 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -0700605 "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 -0700606 },
607 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
608 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
609 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
610 "permissionType": "A String", # The type of the permission that was checked.
611 },
612 },
613 },
614 ],
615 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
616 "A String",
617 ],
618 "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.
619 "A String",
620 ],
621 "action": "A String", # Required
622 "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.
623 "A String",
624 ],
625 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
626 { # A condition to be met.
627 "iam": "A String", # Trusted attributes supplied by the IAM system.
628 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
629 "values": [ # The objects of the condition.
630 "A String",
631 ],
632 "svc": "A String", # Trusted attributes discharged by the service.
633 "op": "A String", # An operator to apply the subject with.
634 },
635 ],
636 "description": "A String", # Human-readable description of the rule.
637 },
638 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700639 "version": 42, # Specifies the format of the policy.
640 #
641 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
642 #
643 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
644 #
645 # * 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
646 #
647 # **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.
648 #
649 # 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 -0700650 "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.
651 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700652 # **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.
653 "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 -0700654 { # Associates `members` with a `role`.
655 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
656 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
657 #
658 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
659 #
660 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
661 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700662 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700663 #
664 #
665 #
666 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
667 #
668 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
669 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700670 # * `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.
671 #
672 # * `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.
673 #
674 # * `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.
675 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700676 #
677 #
678 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
679 "A String",
680 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700681 "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 -0700682 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700683 # Example (Comparison):
684 #
685 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
686 #
687 # Example (Equality):
688 #
689 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
690 #
691 # Example (Logic):
692 #
693 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
694 #
695 # Example (Data Manipulation):
696 #
697 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
698 #
699 # 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.
700 "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 -0700701 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -0700702 "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.
703 "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 -0700704 },
705 },
706 ],
707 "iamOwned": True or False,
708 }</pre>
709</div>
710
711<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700712 <code class="details" id="insert">insert(project, zone, initialNodeCount, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 <pre>Creates a NodeGroup resource in the specified project using the data included in the request.
714
715Args:
716 project: string, Project ID for this request. (required)
717 zone: string, The name of the zone for this request. (required)
718 initialNodeCount: integer, Initial count of nodes in the node group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700719 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700720 The object takes the form of:
721
722{ # Represent a sole-tenant Node Group resource.
723 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700724 # 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 -0700725 "size": 42, # [Output Only] The total number of nodes in the node group.
726 "status": "A String",
727 "kind": "compute#nodeGroup", # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
728 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
729 "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 -0700730 "maintenanceWindow": { # Time window specified for daily maintenance operations. GCE's internal maintenance will be performed within this window.
731 "duration": "A String", # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
732 "startTime": "A String", # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700733 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700734 "maintenancePolicy": "A String", # Specifies how to handle instances when a node in the group undergoes maintenance.
735 "locationHint": "A String", # An opaque location hint used to place the Node close to other resources. This field is for use by internal tools that use the public API. The location hint here on the NodeGroup overrides any location_hint present in the NodeTemplate.
736 "autoscalingPolicy": { # Specifies how autoscaling should behave.
737 "maxNodes": 42, # The maximum number of nodes that the group should have.
738 "minNodes": 42, # The minimum number of nodes that the group should have.
739 "mode": "A String", # The autoscaling mode.
740 },
741 "nodeTemplate": "A String", # The URL of the node template to which this node group belongs.
742 "fingerprint": "A String",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700743 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
744 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
745 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
746 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
747 "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.
748 }
749
750 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.
751
752For 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.
753
754The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
755
756Returns:
757 An object of the form:
758
759 { # Represents an Operation resource.
760 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700761 # Google Compute Engine has three Operation resources:
762 #
763 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
764 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700765 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
766 #
767 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700768 # - For global operations, use the `globalOperations` resource.
769 # - For regional operations, use the `regionOperations` resource.
770 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700771 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700772 # 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 -0700773 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
774 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
775 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700776 "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 -0700777 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
778 "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 -0700779 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
780 "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 -0700781 "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 -0700782 "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 -0700783 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700784 "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 -0700785 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
786 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
787 {
788 "message": "A String", # [Output Only] A human-readable description of the warning code.
789 "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.
790 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
791 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
792 {
793 "value": "A String", # [Output Only] A warning data value corresponding to the key.
794 "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).
795 },
796 ],
797 },
798 ],
799 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700800 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700801 "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 -0700802 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
803 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700804 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
805 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
806 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
807 {
808 "message": "A String", # [Output Only] An optional, human-readable error message.
809 "code": "A String", # [Output Only] The error type identifier for this error.
810 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
811 },
812 ],
813 },
814 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
815 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
816 "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.
817 }</pre>
818</div>
819
820<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700821 <code class="details" id="list">list(project, zone, orderBy=None, pageToken=None, maxResults=None, returnPartialSuccess=None, filter=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700822 <pre>Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.
823
824Args:
825 project: string, Project ID for this request. (required)
826 zone: string, The name of the zone for this request. (required)
827 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
828
Dan O'Mearadd494642020-05-01 07:42:23 -0700829You 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 -0700830
Dan O'Mearadd494642020-05-01 07:42:23 -0700831Currently, only sorting by `name` or `creationTimestamp desc` is supported.
832 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.
833 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`)
834 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
835 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 -0700836
Dan O'Mearadd494642020-05-01 07:42:23 -0700837For 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 -0700838
Dan O'Mearadd494642020-05-01 07:42:23 -0700839You 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 -0700840
Dan O'Mearadd494642020-05-01 07:42:23 -0700841To 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 -0700842
843Returns:
844 An object of the form:
845
846 { # Contains a list of nodeGroups.
847 "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.
848 "kind": "compute#nodeGroupList", # [Output Only] Type of resource.Always compute#nodeGroupList for lists of node groups.
849 "items": [ # A list of NodeGroup resources.
850 { # Represent a sole-tenant Node Group resource.
851 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700852 # 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 -0700853 "size": 42, # [Output Only] The total number of nodes in the node group.
854 "status": "A String",
855 "kind": "compute#nodeGroup", # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
856 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
857 "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 -0700858 "maintenanceWindow": { # Time window specified for daily maintenance operations. GCE's internal maintenance will be performed within this window.
859 "duration": "A String", # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
860 "startTime": "A String", # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700861 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700862 "maintenancePolicy": "A String", # Specifies how to handle instances when a node in the group undergoes maintenance.
863 "locationHint": "A String", # An opaque location hint used to place the Node close to other resources. This field is for use by internal tools that use the public API. The location hint here on the NodeGroup overrides any location_hint present in the NodeTemplate.
864 "autoscalingPolicy": { # Specifies how autoscaling should behave.
865 "maxNodes": 42, # The maximum number of nodes that the group should have.
866 "minNodes": 42, # The minimum number of nodes that the group should have.
867 "mode": "A String", # The autoscaling mode.
868 },
869 "nodeTemplate": "A String", # The URL of the node template to which this node group belongs.
870 "fingerprint": "A String",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700871 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
872 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
873 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
874 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
875 "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.
876 },
877 ],
878 "warning": { # [Output Only] Informational warning message.
879 "message": "A String", # [Output Only] A human-readable description of the warning code.
880 "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.
881 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
882 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
883 {
884 "value": "A String", # [Output Only] A warning data value corresponding to the key.
885 "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).
886 },
887 ],
888 },
889 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
890 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
891 }</pre>
892</div>
893
894<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700895 <code class="details" id="listNodes">listNodes(project, zone, nodeGroup, orderBy=None, pageToken=None, maxResults=None, returnPartialSuccess=None, filter=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700896 <pre>Lists nodes in the node group.
897
898Args:
899 project: string, Project ID for this request. (required)
900 zone: string, The name of the zone for this request. (required)
901 nodeGroup: string, Name of the NodeGroup resource whose nodes you want to list. (required)
902 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
903
Dan O'Mearadd494642020-05-01 07:42:23 -0700904You 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 -0700905
Dan O'Mearadd494642020-05-01 07:42:23 -0700906Currently, only sorting by `name` or `creationTimestamp desc` is supported.
907 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.
908 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`)
909 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
910 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 -0700911
Dan O'Mearadd494642020-05-01 07:42:23 -0700912For 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 -0700913
Dan O'Mearadd494642020-05-01 07:42:23 -0700914You 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 -0700915
Dan O'Mearadd494642020-05-01 07:42:23 -0700916To 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 -0700917
918Returns:
919 An object of the form:
920
921 {
922 "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.
923 "kind": "compute#nodeGroupsListNodes", # [Output Only] The resource type, which is always compute.nodeGroupsListNodes for the list of nodes in the specified node group.
924 "items": [ # A list of Node resources.
925 {
926 "status": "A String",
927 "serverBinding": { # Binding properties for the physical server.
928 "type": "A String",
929 },
930 "nodeType": "A String", # The type of this node.
931 "name": "A String", # The name of the node.
932 "disks": [ # Local disk configurations.
933 {
Dan O'Mearadd494642020-05-01 07:42:23 -0700934 "diskSizeGb": 42, # Specifies the size of the disk in base-2 GB.
935 "diskCount": 42, # Specifies the number of such disks.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700936 "diskType": "A String", # Specifies the desired disk type on the node. This disk type must be a local storage type (e.g.: local-ssd). Note that for nodeTemplates, this should be the name of the disk type and not its URL.
937 },
938 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700939 "cpuOvercommitType": "A String", # CPU overcommit.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700940 "instances": [ # Instances scheduled on this node.
941 "A String",
942 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700943 "accelerators": [ # Accelerators for this node.
944 { # A specification of the type and number of accelerator cards attached to the instance.
945 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
946 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
947 },
948 ],
949 "serverId": "A String", # Server ID associated with this node.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700950 },
951 ],
952 "warning": { # [Output Only] Informational warning message.
953 "message": "A String", # [Output Only] A human-readable description of the warning code.
954 "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.
955 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
956 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
957 {
958 "value": "A String", # [Output Only] A warning data value corresponding to the key.
959 "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).
960 },
961 ],
962 },
963 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
964 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
965 }</pre>
966</div>
967
968<div class="method">
969 <code class="details" id="listNodes_next">listNodes_next(previous_request, previous_response)</code>
970 <pre>Retrieves the next page of results.
971
972Args:
973 previous_request: The request for the previous page. (required)
974 previous_response: The response from the request for the previous page. (required)
975
976Returns:
977 A request object that you can call 'execute()' on to request the next
978 page. Returns None if there are no more items in the collection.
979 </pre>
980</div>
981
982<div class="method">
983 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
984 <pre>Retrieves the next page of results.
985
986Args:
987 previous_request: The request for the previous page. (required)
988 previous_response: The response from the request for the previous page. (required)
989
990Returns:
991 A request object that you can call 'execute()' on to request the next
992 page. Returns None if there are no more items in the collection.
993 </pre>
994</div>
995
996<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700997 <code class="details" id="patch">patch(project, zone, nodeGroup, body=None, requestId=None)</code>
998 <pre>Updates the specified node group.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700999
1000Args:
1001 project: string, Project ID for this request. (required)
1002 zone: string, The name of the zone for this request. (required)
1003 nodeGroup: string, Name of the NodeGroup resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001004 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001005 The object takes the form of:
1006
Dan O'Mearadd494642020-05-01 07:42:23 -07001007{ # Represent a sole-tenant Node Group resource.
1008 #
1009 # 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 ==)
1010 "size": 42, # [Output Only] The total number of nodes in the node group.
1011 "status": "A String",
1012 "kind": "compute#nodeGroup", # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
1013 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1014 "zone": "A String", # [Output Only] The name of the zone where the node group resides, such as us-central1-a.
1015 "maintenanceWindow": { # Time window specified for daily maintenance operations. GCE's internal maintenance will be performed within this window.
1016 "duration": "A String", # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
1017 "startTime": "A String", # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001018 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001019 "maintenancePolicy": "A String", # Specifies how to handle instances when a node in the group undergoes maintenance.
1020 "locationHint": "A String", # An opaque location hint used to place the Node close to other resources. This field is for use by internal tools that use the public API. The location hint here on the NodeGroup overrides any location_hint present in the NodeTemplate.
1021 "autoscalingPolicy": { # Specifies how autoscaling should behave.
1022 "maxNodes": 42, # The maximum number of nodes that the group should have.
1023 "minNodes": 42, # The minimum number of nodes that the group should have.
1024 "mode": "A String", # The autoscaling mode.
1025 },
1026 "nodeTemplate": "A String", # The URL of the node template to which this node group belongs.
1027 "fingerprint": "A String",
1028 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
1029 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1030 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1031 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1032 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001033 }
1034
1035 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.
1036
1037For 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.
1038
1039The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1040
1041Returns:
1042 An object of the form:
1043
1044 { # Represents an Operation resource.
1045 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001046 # Google Compute Engine has three Operation resources:
1047 #
1048 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1049 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001050 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1051 #
1052 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001053 # - For global operations, use the `globalOperations` resource.
1054 # - For regional operations, use the `regionOperations` resource.
1055 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001056 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001057 # 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 -07001058 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1059 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1060 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001061 "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 -07001062 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1063 "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 -07001064 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1065 "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 -07001066 "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 -07001067 "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 -07001068 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001069 "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 -07001070 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1071 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1072 {
1073 "message": "A String", # [Output Only] A human-readable description of the warning code.
1074 "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.
1075 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1076 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1077 {
1078 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1079 "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).
1080 },
1081 ],
1082 },
1083 ],
1084 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001085 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001086 "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 -07001087 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1088 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001089 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1090 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1091 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1092 {
1093 "message": "A String", # [Output Only] An optional, human-readable error message.
1094 "code": "A String", # [Output Only] The error type identifier for this error.
1095 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1096 },
1097 ],
1098 },
1099 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1100 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1101 "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.
1102 }</pre>
1103</div>
1104
1105<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001106 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001107 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
1108
1109Args:
1110 project: string, Project ID for this request. (required)
1111 zone: string, The name of the zone for this request. (required)
1112 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001113 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001114 The object takes the form of:
1115
1116{
Dan O'Mearadd494642020-05-01 07:42:23 -07001117 "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 -07001118 #
1119 #
1120 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001121 # 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 -07001122 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001123 # 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 -07001124 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001125 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001126 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001127 # { "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 -07001128 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001129 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001130 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001131 # 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 -07001132 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001133 # 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 -07001134 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1135 { # 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.
1136 #
1137 # 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.
1138 #
1139 # Example Policy with multiple AuditConfigs:
1140 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001141 # { "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 -07001142 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001143 # 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 -07001144 "exemptedMembers": [
1145 "A String",
1146 ],
1147 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1148 { # Provides the configuration for logging a type of permissions. Example:
1149 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001150 # { "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 -07001151 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001152 # 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 -07001153 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1154 "A String",
1155 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001156 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001157 "logType": "A String", # The log type that this config enables.
1158 },
1159 ],
1160 "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.
1161 },
1162 ],
1163 "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.
1164 { # A rule to be applied in a Policy.
1165 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1166 { # Specifies what kind of log the caller must write
1167 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
1168 #
1169 # 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.
1170 #
1171 # Field names correspond to IAM request parameters and field values are their respective values.
1172 #
1173 # 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.
1174 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001175 # 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 -07001176 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07001177 "customFields": [ # Custom fields.
1178 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1179 "name": "A String", # Name is the field name.
1180 "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.
1181 },
1182 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001183 "metric": "A String", # The metric to update.
1184 },
1185 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07001186 "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 -07001187 },
1188 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
1189 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
1190 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1191 "permissionType": "A String", # The type of the permission that was checked.
1192 },
1193 },
1194 },
1195 ],
1196 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1197 "A String",
1198 ],
1199 "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.
1200 "A String",
1201 ],
1202 "action": "A String", # Required
1203 "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.
1204 "A String",
1205 ],
1206 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1207 { # A condition to be met.
1208 "iam": "A String", # Trusted attributes supplied by the IAM system.
1209 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1210 "values": [ # The objects of the condition.
1211 "A String",
1212 ],
1213 "svc": "A String", # Trusted attributes discharged by the service.
1214 "op": "A String", # An operator to apply the subject with.
1215 },
1216 ],
1217 "description": "A String", # Human-readable description of the rule.
1218 },
1219 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001220 "version": 42, # Specifies the format of the policy.
1221 #
1222 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1223 #
1224 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1225 #
1226 # * 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
1227 #
1228 # **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.
1229 #
1230 # 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 -07001231 "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.
1232 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001233 # **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.
1234 "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 -07001235 { # Associates `members` with a `role`.
1236 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1237 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1238 #
1239 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1240 #
1241 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1242 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001243 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001244 #
1245 #
1246 #
1247 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1248 #
1249 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1250 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001251 # * `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.
1252 #
1253 # * `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.
1254 #
1255 # * `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.
1256 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001257 #
1258 #
1259 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1260 "A String",
1261 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001262 "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 -07001263 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001264 # Example (Comparison):
1265 #
1266 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1267 #
1268 # Example (Equality):
1269 #
1270 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1271 #
1272 # Example (Logic):
1273 #
1274 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1275 #
1276 # Example (Data Manipulation):
1277 #
1278 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1279 #
1280 # 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.
1281 "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 -07001282 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07001283 "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.
1284 "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 -07001285 },
1286 },
1287 ],
1288 "iamOwned": True or False,
1289 },
1290 "bindings": [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.
1291 { # Associates `members` with a `role`.
1292 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1293 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1294 #
1295 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1296 #
1297 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1298 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001299 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001300 #
1301 #
1302 #
1303 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1304 #
1305 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1306 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001307 # * `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.
1308 #
1309 # * `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.
1310 #
1311 # * `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.
1312 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001313 #
1314 #
1315 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1316 "A String",
1317 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001318 "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 -07001319 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001320 # Example (Comparison):
1321 #
1322 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1323 #
1324 # Example (Equality):
1325 #
1326 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1327 #
1328 # Example (Logic):
1329 #
1330 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1331 #
1332 # Example (Data Manipulation):
1333 #
1334 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1335 #
1336 # 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.
1337 "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 -07001338 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07001339 "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.
1340 "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 -07001341 },
1342 },
1343 ],
1344 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag.
1345 }
1346
1347
1348Returns:
1349 An object of the form:
1350
Dan O'Mearadd494642020-05-01 07:42:23 -07001351 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001352 #
1353 #
1354 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001355 # 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 -07001356 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001357 # 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 -07001358 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001359 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001360 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001361 # { "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 -07001362 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001363 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001364 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001365 # 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 -07001366 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001367 # 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 -07001368 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1369 { # 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.
1370 #
1371 # 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.
1372 #
1373 # Example Policy with multiple AuditConfigs:
1374 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001375 # { "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 -07001376 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001377 # 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 -07001378 "exemptedMembers": [
1379 "A String",
1380 ],
1381 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1382 { # Provides the configuration for logging a type of permissions. Example:
1383 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001384 # { "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 -07001385 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001386 # 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 -07001387 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1388 "A String",
1389 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001390 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001391 "logType": "A String", # The log type that this config enables.
1392 },
1393 ],
1394 "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.
1395 },
1396 ],
1397 "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.
1398 { # A rule to be applied in a Policy.
1399 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1400 { # Specifies what kind of log the caller must write
1401 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
1402 #
1403 # 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.
1404 #
1405 # Field names correspond to IAM request parameters and field values are their respective values.
1406 #
1407 # 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.
1408 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001409 # 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 -07001410 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07001411 "customFields": [ # Custom fields.
1412 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1413 "name": "A String", # Name is the field name.
1414 "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.
1415 },
1416 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001417 "metric": "A String", # The metric to update.
1418 },
1419 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07001420 "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 -07001421 },
1422 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
1423 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
1424 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1425 "permissionType": "A String", # The type of the permission that was checked.
1426 },
1427 },
1428 },
1429 ],
1430 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1431 "A String",
1432 ],
1433 "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.
1434 "A String",
1435 ],
1436 "action": "A String", # Required
1437 "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.
1438 "A String",
1439 ],
1440 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1441 { # A condition to be met.
1442 "iam": "A String", # Trusted attributes supplied by the IAM system.
1443 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1444 "values": [ # The objects of the condition.
1445 "A String",
1446 ],
1447 "svc": "A String", # Trusted attributes discharged by the service.
1448 "op": "A String", # An operator to apply the subject with.
1449 },
1450 ],
1451 "description": "A String", # Human-readable description of the rule.
1452 },
1453 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001454 "version": 42, # Specifies the format of the policy.
1455 #
1456 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1457 #
1458 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1459 #
1460 # * 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
1461 #
1462 # **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.
1463 #
1464 # 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 -07001465 "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.
1466 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001467 # **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.
1468 "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 -07001469 { # Associates `members` with a `role`.
1470 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1471 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1472 #
1473 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1474 #
1475 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1476 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001477 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001478 #
1479 #
1480 #
1481 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1482 #
1483 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1484 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001485 # * `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.
1486 #
1487 # * `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.
1488 #
1489 # * `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.
1490 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001491 #
1492 #
1493 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1494 "A String",
1495 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001496 "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 -07001497 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001498 # Example (Comparison):
1499 #
1500 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1501 #
1502 # Example (Equality):
1503 #
1504 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1505 #
1506 # Example (Logic):
1507 #
1508 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1509 #
1510 # Example (Data Manipulation):
1511 #
1512 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1513 #
1514 # 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.
1515 "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 -07001516 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07001517 "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.
1518 "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 -07001519 },
1520 },
1521 ],
1522 "iamOwned": True or False,
1523 }</pre>
1524</div>
1525
1526<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001527 <code class="details" id="setNodeTemplate">setNodeTemplate(project, zone, nodeGroup, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001528 <pre>Updates the node template of the node group.
1529
1530Args:
1531 project: string, Project ID for this request. (required)
1532 zone: string, The name of the zone for this request. (required)
1533 nodeGroup: string, Name of the NodeGroup resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001534 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001535 The object takes the form of:
1536
1537{
1538 "nodeTemplate": "A String", # Full or partial URL of the node template resource to be updated for this node group.
1539 }
1540
1541 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.
1542
1543For 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.
1544
1545The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1546
1547Returns:
1548 An object of the form:
1549
1550 { # Represents an Operation resource.
1551 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001552 # Google Compute Engine has three Operation resources:
1553 #
1554 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1555 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001556 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1557 #
1558 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001559 # - For global operations, use the `globalOperations` resource.
1560 # - For regional operations, use the `regionOperations` resource.
1561 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001562 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001563 # 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 -07001564 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1565 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1566 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001567 "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 -07001568 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1569 "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 -07001570 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1571 "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 -07001572 "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 -07001573 "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 -07001574 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001575 "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 -07001576 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1577 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1578 {
1579 "message": "A String", # [Output Only] A human-readable description of the warning code.
1580 "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.
1581 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1582 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1583 {
1584 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1585 "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).
1586 },
1587 ],
1588 },
1589 ],
1590 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001591 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001592 "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 -07001593 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1594 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001595 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1596 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1597 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1598 {
1599 "message": "A String", # [Output Only] An optional, human-readable error message.
1600 "code": "A String", # [Output Only] The error type identifier for this error.
1601 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1602 },
1603 ],
1604 },
1605 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1606 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1607 "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.
1608 }</pre>
1609</div>
1610
1611<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001612 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001613 <pre>Returns permissions that a caller has on the specified resource.
1614
1615Args:
1616 project: string, Project ID for this request. (required)
1617 zone: string, The name of the zone for this request. (required)
1618 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001619 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001620 The object takes the form of:
1621
1622{
1623 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1624 "A String",
1625 ],
1626 }
1627
1628
1629Returns:
1630 An object of the form:
1631
1632 {
1633 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1634 "A String",
1635 ],
1636 }</pre>
1637</div>
1638
1639</body></html>