blob: ef3fcd48680bfe268e2312cd582df01f24ad944d [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_v1.html">Compute Engine API</a> . <a href="compute_v1.nodeTemplates.html">nodeTemplates</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Retrieves an aggregated list of node templates.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#delete">delete(project, region, nodeTemplate, requestId=None)</a></code></p>
88<p class="firstline">Deletes the specified NodeTemplate resource.</p>
89<p class="toc_element">
90 <code><a href="#get">get(project, region, nodeTemplate)</a></code></p>
91<p class="firstline">Returns the specified node template. Gets a list of available node templates by making a list() request.</p>
92<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070093 <code><a href="#getIamPolicy">getIamPolicy(project, region, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Creates a NodeTemplate resource in the specified project using the data included in the request.</p>
98<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070099 <code><a href="#list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Retrieves a list of node templates available to the specified project.</p>
101<p class="toc_element">
102 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#setIamPolicy">setIamPolicy(project, region, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
110<h3>Method Details</h3>
111<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700112 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700113 <pre>Retrieves an aggregated list of node templates.
114
115Args:
116 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 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 -0700118
Dan O'Mearadd494642020-05-01 07:42:23 -0700119For 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 -0700120
Dan O'Mearadd494642020-05-01 07:42:23 -0700121You 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 -0700122
Bu Sun Kim65020912020-05-20 12:08:20 -0700123To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700124 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 Kim65020912020-05-20 12:08:20 -0700125 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`)
126 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
127
128You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
129
130Currently, only sorting by `name` or `creationTimestamp desc` is supported.
131 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700132 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133
134Returns:
135 An object of the form:
136
137 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700138 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
139 &quot;items&quot;: { # A list of NodeTemplatesScopedList resources.
140 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of node templates.
141 &quot;nodeTemplates&quot;: [ # [Output Only] A list of node templates contained in this scope.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 { # Represent a sole-tenant Node Template resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700143 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700144 # You can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances. (== resource_for {$api_version}.nodeTemplates ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700145 &quot;cpuOvercommitType&quot;: &quot;A String&quot;, # CPU overcommit.
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
147 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
148 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
149 &quot;kind&quot;: &quot;compute#nodeTemplate&quot;, # [Output Only] The type of the resource. Always compute#nodeTemplate for node templates.
150 &quot;name&quot;: &quot;A String&quot;, # 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.
151 &quot;nodeAffinityLabels&quot;: { # Labels to use for node affinity, which will be used in instance scheduling.
152 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700154 &quot;nodeType&quot;: &quot;A String&quot;, # The node type to use for nodes group that are created from this template.
155 &quot;nodeTypeFlexibility&quot;: { # The flexible properties of the desired node type. Node groups that use this node template will create nodes of a type that matches these properties.
156 #
157 # This field is mutually exclusive with the node_type property; you can only define one or the other, but not both.
158 &quot;cpus&quot;: &quot;A String&quot;,
159 &quot;localSsd&quot;: &quot;A String&quot;,
160 &quot;memory&quot;: &quot;A String&quot;,
161 },
162 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The name of the region where the node template resides, such as us-central1.
163 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
164 &quot;serverBinding&quot;: { # Sets the binding properties for the physical server. Valid values include:
165 # - [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server
166 # - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible
167 #
168 # See Sole-tenant node options for more information.
169 &quot;type&quot;: &quot;A String&quot;,
170 },
171 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING.
172 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
173 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700174 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700175 &quot;warning&quot;: { # [Output Only] An informational warning that appears when the node templates list is empty.
176 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
177 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
178 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700179 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700180 &quot;key&quot;: &quot;A String&quot;, # [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).
181 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700182 },
183 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700184 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700185 },
186 },
187 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700188 &quot;kind&quot;: &quot;compute#nodeTemplateAggregatedList&quot;, # [Output Only] Type of resource.Always compute#nodeTemplateAggregatedList for aggregated lists of node templates.
189 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
190 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700191 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
192 &quot;A String&quot;,
193 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700194 &quot;warning&quot;: { # [Output Only] Informational warning message.
195 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
196 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
197 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700198 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700199 &quot;key&quot;: &quot;A String&quot;, # [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).
200 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700201 },
202 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700203 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700204 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700205 }</pre>
206</div>
207
208<div class="method">
209 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
210 <pre>Retrieves the next page of results.
211
212Args:
213 previous_request: The request for the previous page. (required)
214 previous_response: The response from the request for the previous page. (required)
215
216Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700217 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700218 page. Returns None if there are no more items in the collection.
219 </pre>
220</div>
221
222<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700223 <code class="details" id="close">close()</code>
224 <pre>Close httplib2 connections.</pre>
225</div>
226
227<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700228 <code class="details" id="delete">delete(project, region, nodeTemplate, requestId=None)</code>
229 <pre>Deletes the specified NodeTemplate resource.
230
231Args:
232 project: string, Project ID for this request. (required)
233 region: string, The name of the region for this request. (required)
234 nodeTemplate: string, Name of the NodeTemplate resource to delete. (required)
235 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.
236
237For 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.
238
239The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
240
241Returns:
242 An object of the form:
243
244 { # Represents an Operation resource.
245 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700246 # Google Compute Engine has three Operation resources:
247 #
248 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
249 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700250 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
251 #
252 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700253 # - For global operations, use the `globalOperations` resource.
254 # - For regional operations, use the `regionOperations` resource.
255 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700256 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700257 # 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 Kim65020912020-05-20 12:08:20 -0700258 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
259 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
260 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
261 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
262 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
263 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700265 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
266 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
267 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700268 },
269 ],
270 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700271 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
272 &quot;httpErrorStatusCode&quot;: 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.
273 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
274 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
275 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
276 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
277 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
278 &quot;progress&quot;: 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.
279 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
280 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
281 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
282 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
283 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
284 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
285 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
286 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
287 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
288 {
289 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
290 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
291 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
292 {
293 &quot;key&quot;: &quot;A String&quot;, # [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).
294 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
295 },
296 ],
297 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
298 },
299 ],
300 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700301 }</pre>
302</div>
303
304<div class="method">
305 <code class="details" id="get">get(project, region, nodeTemplate)</code>
306 <pre>Returns the specified node template. Gets a list of available node templates by making a list() request.
307
308Args:
309 project: string, Project ID for this request. (required)
310 region: string, The name of the region for this request. (required)
311 nodeTemplate: string, Name of the node template to return. (required)
312
313Returns:
314 An object of the form:
315
316 { # Represent a sole-tenant Node Template resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700317 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700318 # You can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances. (== resource_for {$api_version}.nodeTemplates ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700319 &quot;cpuOvercommitType&quot;: &quot;A String&quot;, # CPU overcommit.
Bu Sun Kim65020912020-05-20 12:08:20 -0700320 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
321 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
322 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
323 &quot;kind&quot;: &quot;compute#nodeTemplate&quot;, # [Output Only] The type of the resource. Always compute#nodeTemplate for node templates.
324 &quot;name&quot;: &quot;A String&quot;, # 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.
325 &quot;nodeAffinityLabels&quot;: { # Labels to use for node affinity, which will be used in instance scheduling.
326 &quot;a_key&quot;: &quot;A String&quot;,
327 },
328 &quot;nodeType&quot;: &quot;A String&quot;, # The node type to use for nodes group that are created from this template.
329 &quot;nodeTypeFlexibility&quot;: { # The flexible properties of the desired node type. Node groups that use this node template will create nodes of a type that matches these properties.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700330 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700331 # This field is mutually exclusive with the node_type property; you can only define one or the other, but not both.
332 &quot;cpus&quot;: &quot;A String&quot;,
333 &quot;localSsd&quot;: &quot;A String&quot;,
334 &quot;memory&quot;: &quot;A String&quot;,
335 },
336 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The name of the region where the node template resides, such as us-central1.
337 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
338 &quot;serverBinding&quot;: { # Sets the binding properties for the physical server. Valid values include:
339 # - [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server
340 # - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible
341 #
342 # See Sole-tenant node options for more information.
343 &quot;type&quot;: &quot;A String&quot;,
344 },
345 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING.
346 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
347 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700348</div>
349
350<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700351 <code class="details" id="getIamPolicy">getIamPolicy(project, region, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700352 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
353
354Args:
355 project: string, Project ID for this request. (required)
356 region: string, The name of the region for this request. (required)
357 resource: string, Name or id of the resource for this request. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700358 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700359
360Returns:
361 An object of the form:
362
Dan O'Mearadd494642020-05-01 07:42:23 -0700363 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700364 #
365 #
366 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700367 # 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 -0700368 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700369 # For some types of Google Cloud resources, a `binding` can also 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. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700370 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700371 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700372 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700373 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700375 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700376 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700377 # 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(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700378 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700379 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700381 { # 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.
382 #
383 # 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.
384 #
385 # Example Policy with multiple AuditConfigs:
386 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700387 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700389 # 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 Kim65020912020-05-20 12:08:20 -0700390 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700391 { # Provides the configuration for logging a type of permissions. Example:
392 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700393 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700394 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700395 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
396 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
397 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700398 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700399 &quot;ignoreChildExemptions&quot;: True or False,
400 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 },
402 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700403 &quot;exemptedMembers&quot;: [
404 &quot;A String&quot;,
405 ],
406 &quot;service&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700407 },
408 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700409 &quot;bindings&quot;: [ # 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 -0700410 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700411 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700412 &quot;condition&quot;: { # 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.
413 #
414 # If the condition evaluates to `true`, then this binding applies to the current request.
415 #
416 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
417 #
418 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
419 #
420 # Example (Comparison):
421 #
422 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
423 #
424 # Example (Equality):
425 #
426 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
427 #
428 # Example (Logic):
429 #
430 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
431 #
432 # Example (Data Manipulation):
433 #
434 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
435 #
436 # 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.
437 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
438 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
439 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
440 &quot;title&quot;: &quot;A String&quot;, # 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.
441 },
442 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 #
444 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
445 #
446 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
447 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700448 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449 #
450 #
451 #
452 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
453 #
454 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
455 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700456 # * `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.
457 #
458 # * `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.
459 #
460 # * `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.
461 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700462 #
463 #
464 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700465 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700466 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700467 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700468 },
469 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700470 &quot;etag&quot;: &quot;A String&quot;, # `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.
471 #
472 # **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.
473 &quot;iamOwned&quot;: True or False,
474 &quot;rules&quot;: [ # 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.
475 { # A rule to be applied in a Policy.
476 &quot;action&quot;: &quot;A String&quot;, # Required
477 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
478 { # A condition to be met.
479 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
480 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
481 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
482 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
483 &quot;values&quot;: [ # The objects of the condition.
484 &quot;A String&quot;,
485 ],
486 },
487 ],
488 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
489 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
490 &quot;A String&quot;,
491 ],
492 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
493 { # Specifies what kind of log the caller must write
494 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
495 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
496 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
497 },
498 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
499 },
500 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
501 #
502 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
503 #
504 # Field names correspond to IAM request parameters and field values are their respective values.
505 #
506 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
507 #
508 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
509 &quot;customFields&quot;: [ # Custom fields.
510 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
511 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
512 &quot;value&quot;: &quot;A String&quot;, # 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.
513 },
514 ],
515 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
516 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
517 },
518 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
519 &quot;logMode&quot;: &quot;A String&quot;,
520 },
521 },
522 ],
523 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
524 &quot;A String&quot;,
525 ],
526 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
527 &quot;A String&quot;,
528 ],
529 },
530 ],
531 &quot;version&quot;: 42, # Specifies the format of the policy.
532 #
533 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
534 #
535 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
536 #
537 # * 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
538 #
539 # **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.
540 #
541 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
542 #
543 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700544 }</pre>
545</div>
546
547<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700548 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700549 <pre>Creates a NodeTemplate resource in the specified project using the data included in the request.
550
551Args:
552 project: string, Project ID for this request. (required)
553 region: string, The name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700554 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700555 The object takes the form of:
556
557{ # Represent a sole-tenant Node Template resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700558 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700559 # You can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances. (== resource_for {$api_version}.nodeTemplates ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700560 &quot;cpuOvercommitType&quot;: &quot;A String&quot;, # CPU overcommit.
Bu Sun Kim65020912020-05-20 12:08:20 -0700561 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
562 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
563 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
564 &quot;kind&quot;: &quot;compute#nodeTemplate&quot;, # [Output Only] The type of the resource. Always compute#nodeTemplate for node templates.
565 &quot;name&quot;: &quot;A String&quot;, # 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.
566 &quot;nodeAffinityLabels&quot;: { # Labels to use for node affinity, which will be used in instance scheduling.
567 &quot;a_key&quot;: &quot;A String&quot;,
568 },
569 &quot;nodeType&quot;: &quot;A String&quot;, # The node type to use for nodes group that are created from this template.
570 &quot;nodeTypeFlexibility&quot;: { # The flexible properties of the desired node type. Node groups that use this node template will create nodes of a type that matches these properties.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700571 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700572 # This field is mutually exclusive with the node_type property; you can only define one or the other, but not both.
573 &quot;cpus&quot;: &quot;A String&quot;,
574 &quot;localSsd&quot;: &quot;A String&quot;,
575 &quot;memory&quot;: &quot;A String&quot;,
576 },
577 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The name of the region where the node template resides, such as us-central1.
578 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
579 &quot;serverBinding&quot;: { # Sets the binding properties for the physical server. Valid values include:
580 # - [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server
581 # - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible
582 #
583 # See Sole-tenant node options for more information.
584 &quot;type&quot;: &quot;A String&quot;,
585 },
586 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING.
587 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
588}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700589
590 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.
591
592For 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.
593
594The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
595
596Returns:
597 An object of the form:
598
599 { # Represents an Operation resource.
600 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700601 # Google Compute Engine has three Operation resources:
602 #
603 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
604 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700605 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
606 #
607 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700608 # - For global operations, use the `globalOperations` resource.
609 # - For regional operations, use the `regionOperations` resource.
610 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700611 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700612 # 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 Kim65020912020-05-20 12:08:20 -0700613 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
614 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
615 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
616 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
617 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
618 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700619 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700620 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
621 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
622 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700623 },
624 ],
625 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700626 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
627 &quot;httpErrorStatusCode&quot;: 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.
628 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
629 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
630 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
631 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
632 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
633 &quot;progress&quot;: 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.
634 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
635 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
636 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
637 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
638 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
639 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
640 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
641 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
642 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
643 {
644 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
645 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
646 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
647 {
648 &quot;key&quot;: &quot;A String&quot;, # [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).
649 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
650 },
651 ],
652 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
653 },
654 ],
655 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700656 }</pre>
657</div>
658
659<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700660 <code class="details" id="list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700661 <pre>Retrieves a list of node templates available to the specified project.
662
663Args:
664 project: string, Project ID for this request. (required)
665 region: string, The name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700666 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 -0700667
Dan O'Mearadd494642020-05-01 07:42:23 -0700668For 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 -0700669
Dan O'Mearadd494642020-05-01 07:42:23 -0700670You 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 -0700671
Bu Sun Kim65020912020-05-20 12:08:20 -0700672To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
673 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`)
674 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
675
676You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
677
678Currently, only sorting by `name` or `creationTimestamp desc` is supported.
679 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700680 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700681
682Returns:
683 An object of the form:
684
685 { # Contains a list of node templates.
Bu Sun Kim65020912020-05-20 12:08:20 -0700686 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
687 &quot;items&quot;: [ # A list of NodeTemplate resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700688 { # Represent a sole-tenant Node Template resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700689 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700690 # You can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances. (== resource_for {$api_version}.nodeTemplates ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700691 &quot;cpuOvercommitType&quot;: &quot;A String&quot;, # CPU overcommit.
Bu Sun Kim65020912020-05-20 12:08:20 -0700692 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
693 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
694 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
695 &quot;kind&quot;: &quot;compute#nodeTemplate&quot;, # [Output Only] The type of the resource. Always compute#nodeTemplate for node templates.
696 &quot;name&quot;: &quot;A String&quot;, # 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.
697 &quot;nodeAffinityLabels&quot;: { # Labels to use for node affinity, which will be used in instance scheduling.
698 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700699 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700700 &quot;nodeType&quot;: &quot;A String&quot;, # The node type to use for nodes group that are created from this template.
701 &quot;nodeTypeFlexibility&quot;: { # The flexible properties of the desired node type. Node groups that use this node template will create nodes of a type that matches these properties.
702 #
703 # This field is mutually exclusive with the node_type property; you can only define one or the other, but not both.
704 &quot;cpus&quot;: &quot;A String&quot;,
705 &quot;localSsd&quot;: &quot;A String&quot;,
706 &quot;memory&quot;: &quot;A String&quot;,
707 },
708 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The name of the region where the node template resides, such as us-central1.
709 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
710 &quot;serverBinding&quot;: { # Sets the binding properties for the physical server. Valid values include:
711 # - [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server
712 # - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible
713 #
714 # See Sole-tenant node options for more information.
715 &quot;type&quot;: &quot;A String&quot;,
716 },
717 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING.
718 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
719 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700720 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700721 &quot;kind&quot;: &quot;compute#nodeTemplateList&quot;, # [Output Only] Type of resource.Always compute#nodeTemplateList for lists of node templates.
722 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
723 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
724 &quot;warning&quot;: { # [Output Only] Informational warning message.
725 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
726 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
727 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700728 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700729 &quot;key&quot;: &quot;A String&quot;, # [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).
730 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700731 },
732 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700733 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700734 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700735 }</pre>
736</div>
737
738<div class="method">
739 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
740 <pre>Retrieves the next page of results.
741
742Args:
743 previous_request: The request for the previous page. (required)
744 previous_response: The response from the request for the previous page. (required)
745
746Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700747 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700748 page. Returns None if there are no more items in the collection.
749 </pre>
750</div>
751
752<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700753 <code class="details" id="setIamPolicy">setIamPolicy(project, region, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700754 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
755
756Args:
757 project: string, Project ID for this request. (required)
758 region: string, The name of the region for this request. (required)
759 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700760 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700761 The object takes the form of:
762
763{
Bu Sun Kim65020912020-05-20 12:08:20 -0700764 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
765 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700766 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700767 &quot;condition&quot;: { # 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.
768 #
769 # If the condition evaluates to `true`, then this binding applies to the current request.
770 #
771 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
772 #
773 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
774 #
775 # Example (Comparison):
776 #
777 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
778 #
779 # Example (Equality):
780 #
781 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
782 #
783 # Example (Logic):
784 #
785 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
786 #
787 # Example (Data Manipulation):
788 #
789 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
790 #
791 # 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.
792 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
793 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
794 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
795 &quot;title&quot;: &quot;A String&quot;, # 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.
796 },
797 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
798 #
799 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
800 #
801 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
802 #
803 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
804 #
805 #
806 #
807 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
808 #
809 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
810 #
811 # * `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.
812 #
813 # * `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.
814 #
815 # * `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.
816 #
817 #
818 #
819 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
820 &quot;A String&quot;,
821 ],
822 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
823 },
824 ],
825 &quot;etag&quot;: &quot;A String&quot;, # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify the etag.
826 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the &#x27;resource&#x27;. 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 -0700827 #
828 #
829 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700830 # 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 -0700831 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700832 # For some types of Google Cloud resources, a `binding` can also 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. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700833 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700834 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700835 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700836 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700837 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700838 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700839 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700840 # 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(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700841 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700842 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700843 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700844 { # 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.
845 #
846 # 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.
847 #
848 # Example Policy with multiple AuditConfigs:
849 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700850 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700851 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700852 # 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 Kim65020912020-05-20 12:08:20 -0700853 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700854 { # Provides the configuration for logging a type of permissions. Example:
855 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700856 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700857 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700858 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
859 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
860 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700861 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700862 &quot;ignoreChildExemptions&quot;: True or False,
863 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700864 },
865 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700866 &quot;exemptedMembers&quot;: [
867 &quot;A String&quot;,
868 ],
869 &quot;service&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700870 },
871 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700872 &quot;bindings&quot;: [ # 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 -0700873 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700874 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700875 &quot;condition&quot;: { # 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.
876 #
877 # If the condition evaluates to `true`, then this binding applies to the current request.
878 #
879 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
880 #
881 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
882 #
883 # Example (Comparison):
884 #
885 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
886 #
887 # Example (Equality):
888 #
889 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
890 #
891 # Example (Logic):
892 #
893 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
894 #
895 # Example (Data Manipulation):
896 #
897 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
898 #
899 # 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.
900 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
901 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
902 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
903 &quot;title&quot;: &quot;A String&quot;, # 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.
904 },
905 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700906 #
907 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
908 #
909 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
910 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700911 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700912 #
913 #
914 #
915 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
916 #
917 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
918 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700919 # * `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.
920 #
921 # * `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.
922 #
923 # * `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.
924 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700925 #
926 #
927 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700928 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700929 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700930 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700931 },
932 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700933 &quot;etag&quot;: &quot;A String&quot;, # `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.
934 #
935 # **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.
936 &quot;iamOwned&quot;: True or False,
937 &quot;rules&quot;: [ # 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.
938 { # A rule to be applied in a Policy.
939 &quot;action&quot;: &quot;A String&quot;, # Required
940 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
941 { # A condition to be met.
942 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
943 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
944 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
945 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
946 &quot;values&quot;: [ # The objects of the condition.
947 &quot;A String&quot;,
948 ],
949 },
950 ],
951 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
952 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
953 &quot;A String&quot;,
954 ],
955 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
956 { # Specifies what kind of log the caller must write
957 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
958 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
959 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
960 },
961 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
962 },
963 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
964 #
965 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
966 #
967 # Field names correspond to IAM request parameters and field values are their respective values.
968 #
969 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
970 #
971 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
972 &quot;customFields&quot;: [ # Custom fields.
973 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
974 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
975 &quot;value&quot;: &quot;A String&quot;, # 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.
976 },
977 ],
978 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
979 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
980 },
981 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
982 &quot;logMode&quot;: &quot;A String&quot;,
983 },
984 },
985 ],
986 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
987 &quot;A String&quot;,
988 ],
989 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
990 &quot;A String&quot;,
991 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700992 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700993 ],
994 &quot;version&quot;: 42, # Specifies the format of the policy.
995 #
996 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
997 #
998 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
999 #
1000 # * 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
1001 #
1002 # **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.
1003 #
1004 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1005 #
1006 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1007 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001008 }
1009
1010
1011Returns:
1012 An object of the form:
1013
Dan O'Mearadd494642020-05-01 07:42:23 -07001014 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001015 #
1016 #
1017 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001018 # 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 -07001019 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001020 # For some types of Google Cloud resources, a `binding` can also 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. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001021 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001022 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001023 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001024 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001025 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001026 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001027 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001028 # 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(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001029 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001030 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001031 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001032 { # 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.
1033 #
1034 # 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.
1035 #
1036 # Example Policy with multiple AuditConfigs:
1037 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001038 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001039 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001040 # 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 Kim65020912020-05-20 12:08:20 -07001041 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001042 { # Provides the configuration for logging a type of permissions. Example:
1043 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001044 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001045 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001046 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1047 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1048 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001049 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001050 &quot;ignoreChildExemptions&quot;: True or False,
1051 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001052 },
1053 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001054 &quot;exemptedMembers&quot;: [
1055 &quot;A String&quot;,
1056 ],
1057 &quot;service&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001058 },
1059 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001060 &quot;bindings&quot;: [ # 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 -07001061 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001062 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -07001063 &quot;condition&quot;: { # 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.
1064 #
1065 # If the condition evaluates to `true`, then this binding applies to the current request.
1066 #
1067 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1068 #
1069 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1070 #
1071 # Example (Comparison):
1072 #
1073 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1074 #
1075 # Example (Equality):
1076 #
1077 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1078 #
1079 # Example (Logic):
1080 #
1081 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1082 #
1083 # Example (Data Manipulation):
1084 #
1085 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1086 #
1087 # 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.
1088 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1089 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1090 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1091 &quot;title&quot;: &quot;A String&quot;, # 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.
1092 },
1093 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001094 #
1095 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1096 #
1097 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1098 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001099 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001100 #
1101 #
1102 #
1103 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1104 #
1105 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1106 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001107 # * `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.
1108 #
1109 # * `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.
1110 #
1111 # * `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.
1112 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001113 #
1114 #
1115 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001116 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001117 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001118 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001119 },
1120 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001121 &quot;etag&quot;: &quot;A String&quot;, # `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.
1122 #
1123 # **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.
1124 &quot;iamOwned&quot;: True or False,
1125 &quot;rules&quot;: [ # 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.
1126 { # A rule to be applied in a Policy.
1127 &quot;action&quot;: &quot;A String&quot;, # Required
1128 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1129 { # A condition to be met.
1130 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1131 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1132 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1133 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1134 &quot;values&quot;: [ # The objects of the condition.
1135 &quot;A String&quot;,
1136 ],
1137 },
1138 ],
1139 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1140 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1141 &quot;A String&quot;,
1142 ],
1143 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1144 { # Specifies what kind of log the caller must write
1145 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1146 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1147 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1148 },
1149 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1150 },
1151 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1152 #
1153 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1154 #
1155 # Field names correspond to IAM request parameters and field values are their respective values.
1156 #
1157 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1158 #
1159 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
1160 &quot;customFields&quot;: [ # Custom fields.
1161 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1162 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1163 &quot;value&quot;: &quot;A String&quot;, # 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.
1164 },
1165 ],
1166 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1167 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1168 },
1169 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1170 &quot;logMode&quot;: &quot;A String&quot;,
1171 },
1172 },
1173 ],
1174 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1175 &quot;A String&quot;,
1176 ],
1177 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
1178 &quot;A String&quot;,
1179 ],
1180 },
1181 ],
1182 &quot;version&quot;: 42, # Specifies the format of the policy.
1183 #
1184 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1185 #
1186 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1187 #
1188 # * 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
1189 #
1190 # **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.
1191 #
1192 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1193 #
1194 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001195 }</pre>
1196</div>
1197
1198<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001199 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001200 <pre>Returns permissions that a caller has on the specified resource.
1201
1202Args:
1203 project: string, Project ID for this request. (required)
1204 region: string, The name of the region for this request. (required)
1205 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001206 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001207 The object takes the form of:
1208
1209{
Bu Sun Kim65020912020-05-20 12:08:20 -07001210 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
1211 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001212 ],
1213 }
1214
1215
1216Returns:
1217 An object of the form:
1218
1219 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001220 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1221 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001222 ],
1223 }</pre>
1224</div>
1225
1226</body></html>