blob: 8fa152725f00dcd95494a2374890bd1d3ea535f5 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.nodeTemplates.html">nodeTemplates</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070078 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=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">
84 <code><a href="#delete">delete(project, region, nodeTemplate, requestId=None)</a></code></p>
85<p class="firstline">Deletes the specified NodeTemplate resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, region, nodeTemplate)</a></code></p>
88<p class="firstline">Returns the specified node template. Gets a list of available node templates by making a list() request.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#getIamPolicy">getIamPolicy(project, region, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Creates a NodeTemplate resource in the specified project using the data included in the request.</p>
95<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code><a href="#list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Retrieves a list of node templates available to the specified project.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#setIamPolicy">setIamPolicy(project, region, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
107<h3>Method Details</h3>
108<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700109 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 <pre>Retrieves an aggregated list of node templates.
111
112Args:
113 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 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 -0700115
Dan O'Mearadd494642020-05-01 07:42:23 -0700116For 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 -0700117
Dan O'Mearadd494642020-05-01 07:42:23 -0700118You 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 -0700119
Bu Sun Kim65020912020-05-20 12:08:20 -0700120To 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 -0700121 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 -0700122 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`)
123 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
124
125You 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.
126
127Currently, only sorting by `name` or `creationTimestamp desc` is supported.
128 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700129
130Returns:
131 An object of the form:
132
133 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700134 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
135 &quot;items&quot;: { # A list of NodeTemplatesScopedList resources.
136 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of node templates.
137 &quot;nodeTemplates&quot;: [ # [Output Only] A list of node templates contained in this scope.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 { # Represent a sole-tenant Node Template resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700139 #
140 # 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 ==) (== NextID: 19 ==)
141 &quot;cpuOvercommitType&quot;: &quot;A String&quot;, # CPU overcommit.
142 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
143 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
144 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
145 &quot;kind&quot;: &quot;compute#nodeTemplate&quot;, # [Output Only] The type of the resource. Always compute#nodeTemplate for node templates.
146 &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.
147 &quot;nodeAffinityLabels&quot;: { # Labels to use for node affinity, which will be used in instance scheduling.
148 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700149 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700150 &quot;nodeType&quot;: &quot;A String&quot;, # The node type to use for nodes group that are created from this template.
151 &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.
152 #
153 # This field is mutually exclusive with the node_type property; you can only define one or the other, but not both.
154 &quot;cpus&quot;: &quot;A String&quot;,
155 &quot;localSsd&quot;: &quot;A String&quot;,
156 &quot;memory&quot;: &quot;A String&quot;,
157 },
158 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The name of the region where the node template resides, such as us-central1.
159 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
160 &quot;serverBinding&quot;: { # Sets the binding properties for the physical server. Valid values include:
161 # - [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server
162 # - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible
163 #
164 # See Sole-tenant node options for more information.
165 &quot;type&quot;: &quot;A String&quot;,
166 },
167 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING.
168 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
169 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700170 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700171 &quot;warning&quot;: { # [Output Only] An informational warning that appears when the node templates list is empty.
172 &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.
173 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
174 # &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 -0700175 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700176 &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).
177 &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 -0700178 },
179 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700180 &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 -0700181 },
182 },
183 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700184 &quot;kind&quot;: &quot;compute#nodeTemplateAggregatedList&quot;, # [Output Only] Type of resource.Always compute#nodeTemplateAggregatedList for aggregated lists of node templates.
185 &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.
186 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
187 &quot;warning&quot;: { # [Output Only] Informational warning message.
188 &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.
189 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
190 # &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 -0700191 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700192 &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).
193 &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 -0700194 },
195 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700196 &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 -0700197 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700198 }</pre>
199</div>
200
201<div class="method">
202 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
203 <pre>Retrieves the next page of results.
204
205Args:
206 previous_request: The request for the previous page. (required)
207 previous_response: The response from the request for the previous page. (required)
208
209Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700210 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700211 page. Returns None if there are no more items in the collection.
212 </pre>
213</div>
214
215<div class="method">
216 <code class="details" id="delete">delete(project, region, nodeTemplate, requestId=None)</code>
217 <pre>Deletes the specified NodeTemplate resource.
218
219Args:
220 project: string, Project ID for this request. (required)
221 region: string, The name of the region for this request. (required)
222 nodeTemplate: string, Name of the NodeTemplate resource to delete. (required)
223 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.
224
225For 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.
226
227The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
228
229Returns:
230 An object of the form:
231
232 { # Represents an Operation resource.
233 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700234 # Google Compute Engine has three Operation resources:
235 #
236 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
237 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700238 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
239 #
240 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700241 # - For global operations, use the `globalOperations` resource.
242 # - For regional operations, use the `regionOperations` resource.
243 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700244 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700245 # 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 -0700246 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
247 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
248 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
249 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
250 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
251 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700252 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700253 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
254 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
255 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700256 },
257 ],
258 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700259 &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`.
260 &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.
261 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
262 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
263 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
264 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
265 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
266 &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.
267 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
268 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
269 &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.
270 &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`.
271 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
272 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
273 &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.
274 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
275 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
276 {
277 &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.
278 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
279 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
280 {
281 &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).
282 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
283 },
284 ],
285 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
286 },
287 ],
288 &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 -0700289 }</pre>
290</div>
291
292<div class="method">
293 <code class="details" id="get">get(project, region, nodeTemplate)</code>
294 <pre>Returns the specified node template. Gets a list of available node templates by making a list() request.
295
296Args:
297 project: string, Project ID for this request. (required)
298 region: string, The name of the region for this request. (required)
299 nodeTemplate: string, Name of the node template to return. (required)
300
301Returns:
302 An object of the form:
303
304 { # Represent a sole-tenant Node Template resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700305 #
306 # 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 ==) (== NextID: 19 ==)
307 &quot;cpuOvercommitType&quot;: &quot;A String&quot;, # CPU overcommit.
308 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
309 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
310 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
311 &quot;kind&quot;: &quot;compute#nodeTemplate&quot;, # [Output Only] The type of the resource. Always compute#nodeTemplate for node templates.
312 &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.
313 &quot;nodeAffinityLabels&quot;: { # Labels to use for node affinity, which will be used in instance scheduling.
314 &quot;a_key&quot;: &quot;A String&quot;,
315 },
316 &quot;nodeType&quot;: &quot;A String&quot;, # The node type to use for nodes group that are created from this template.
317 &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 -0700318 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700319 # This field is mutually exclusive with the node_type property; you can only define one or the other, but not both.
320 &quot;cpus&quot;: &quot;A String&quot;,
321 &quot;localSsd&quot;: &quot;A String&quot;,
322 &quot;memory&quot;: &quot;A String&quot;,
323 },
324 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The name of the region where the node template resides, such as us-central1.
325 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
326 &quot;serverBinding&quot;: { # Sets the binding properties for the physical server. Valid values include:
327 # - [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server
328 # - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible
329 #
330 # See Sole-tenant node options for more information.
331 &quot;type&quot;: &quot;A String&quot;,
332 },
333 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING.
334 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
335 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700336</div>
337
338<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700339 <code class="details" id="getIamPolicy">getIamPolicy(project, region, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700340 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
341
342Args:
343 project: string, Project ID for this request. (required)
344 region: string, The name of the region for this request. (required)
345 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700346 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700347
348Returns:
349 An object of the form:
350
Dan O'Mearadd494642020-05-01 07:42:23 -0700351 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700352 #
353 #
354 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700355 # 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 -0700356 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700357 # 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 -0700358 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700359 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700360 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700361 # { &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 -0700362 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700363 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700364 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700365 # 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 -0700366 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700367 # 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 -0700368 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700369 { # 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.
370 #
371 # 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.
372 #
373 # Example Policy with multiple AuditConfigs:
374 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700375 # { &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 -0700376 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700377 # 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 -0700378 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700379 { # Provides the configuration for logging a type of permissions. Example:
380 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700381 # { &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 -0700382 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700383 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
384 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
385 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700386 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700387 &quot;ignoreChildExemptions&quot;: True or False,
388 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700389 },
390 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700391 &quot;exemptedMembers&quot;: [
392 &quot;A String&quot;,
393 ],
394 &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 -0700395 },
396 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700397 &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 -0700398 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700399 &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.
400 #
401 # If the condition evaluates to `true`, then this binding applies to the current request.
402 #
403 # 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.
404 #
405 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
406 #
407 # Example (Comparison):
408 #
409 # 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;
410 #
411 # Example (Equality):
412 #
413 # 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;
414 #
415 # Example (Logic):
416 #
417 # 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;
418 #
419 # Example (Data Manipulation):
420 #
421 # 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;
422 #
423 # 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.
424 &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.
425 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
426 &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.
427 &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.
428 },
429 &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 -0700430 #
431 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
432 #
433 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
434 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700435 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700436 #
437 #
438 #
439 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
440 #
441 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
442 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700443 # * `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.
444 #
445 # * `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.
446 #
447 # * `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.
448 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449 #
450 #
451 # * `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 -0700452 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700453 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700454 &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 -0700455 },
456 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700457 &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.
458 #
459 # **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.
460 &quot;iamOwned&quot;: True or False,
461 &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.
462 { # A rule to be applied in a Policy.
463 &quot;action&quot;: &quot;A String&quot;, # Required
464 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
465 { # A condition to be met.
466 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
467 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
468 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
469 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
470 &quot;values&quot;: [ # The objects of the condition.
471 &quot;A String&quot;,
472 ],
473 },
474 ],
475 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
476 &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.
477 &quot;A String&quot;,
478 ],
479 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
480 { # Specifies what kind of log the caller must write
481 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
482 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
483 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
484 },
485 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
486 },
487 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
488 #
489 # 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.
490 #
491 # Field names correspond to IAM request parameters and field values are their respective values.
492 #
493 # 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.
494 #
495 # 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]}
496 &quot;customFields&quot;: [ # Custom fields.
497 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
498 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
499 &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.
500 },
501 ],
502 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
503 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
504 },
505 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
506 &quot;logMode&quot;: &quot;A String&quot;,
507 },
508 },
509 ],
510 &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.
511 &quot;A String&quot;,
512 ],
513 &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.
514 &quot;A String&quot;,
515 ],
516 },
517 ],
518 &quot;version&quot;: 42, # Specifies the format of the policy.
519 #
520 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
521 #
522 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
523 #
524 # * 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
525 #
526 # **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.
527 #
528 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
529 #
530 # 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 -0700531 }</pre>
532</div>
533
534<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700535 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700536 <pre>Creates a NodeTemplate resource in the specified project using the data included in the request.
537
538Args:
539 project: string, Project ID for this request. (required)
540 region: string, The name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700541 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 The object takes the form of:
543
544{ # Represent a sole-tenant Node Template resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700545 #
546 # 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 ==) (== NextID: 19 ==)
547 &quot;cpuOvercommitType&quot;: &quot;A String&quot;, # CPU overcommit.
548 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
549 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
550 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
551 &quot;kind&quot;: &quot;compute#nodeTemplate&quot;, # [Output Only] The type of the resource. Always compute#nodeTemplate for node templates.
552 &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.
553 &quot;nodeAffinityLabels&quot;: { # Labels to use for node affinity, which will be used in instance scheduling.
554 &quot;a_key&quot;: &quot;A String&quot;,
555 },
556 &quot;nodeType&quot;: &quot;A String&quot;, # The node type to use for nodes group that are created from this template.
557 &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 -0700558 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700559 # This field is mutually exclusive with the node_type property; you can only define one or the other, but not both.
560 &quot;cpus&quot;: &quot;A String&quot;,
561 &quot;localSsd&quot;: &quot;A String&quot;,
562 &quot;memory&quot;: &quot;A String&quot;,
563 },
564 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The name of the region where the node template resides, such as us-central1.
565 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
566 &quot;serverBinding&quot;: { # Sets the binding properties for the physical server. Valid values include:
567 # - [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server
568 # - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible
569 #
570 # See Sole-tenant node options for more information.
571 &quot;type&quot;: &quot;A String&quot;,
572 },
573 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING.
574 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
575}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700576
577 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.
578
579For 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.
580
581The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
582
583Returns:
584 An object of the form:
585
586 { # Represents an Operation resource.
587 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700588 # Google Compute Engine has three Operation resources:
589 #
590 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
591 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700592 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
593 #
594 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700595 # - For global operations, use the `globalOperations` resource.
596 # - For regional operations, use the `regionOperations` resource.
597 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700598 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700599 # 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 -0700600 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
601 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
602 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
603 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
604 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
605 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700606 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700607 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
608 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
609 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700610 },
611 ],
612 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700613 &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`.
614 &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.
615 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
616 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
617 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
618 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
619 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
620 &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.
621 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
622 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
623 &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.
624 &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`.
625 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
626 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
627 &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.
628 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
629 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
630 {
631 &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.
632 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
633 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
634 {
635 &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).
636 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
637 },
638 ],
639 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
640 },
641 ],
642 &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 -0700643 }</pre>
644</div>
645
646<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700647 <code class="details" id="list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700648 <pre>Retrieves a list of node templates available to the specified project.
649
650Args:
651 project: string, Project ID for this request. (required)
652 region: string, The name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700653 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 -0700654
Dan O'Mearadd494642020-05-01 07:42:23 -0700655For 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 -0700656
Dan O'Mearadd494642020-05-01 07:42:23 -0700657You 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 -0700658
Bu Sun Kim65020912020-05-20 12:08:20 -0700659To 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) ```
660 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`)
661 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
662
663You 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.
664
665Currently, only sorting by `name` or `creationTimestamp desc` is supported.
666 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700667
668Returns:
669 An object of the form:
670
671 { # Contains a list of node templates.
Bu Sun Kim65020912020-05-20 12:08:20 -0700672 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
673 &quot;items&quot;: [ # A list of NodeTemplate resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700674 { # Represent a sole-tenant Node Template resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700675 #
676 # 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 ==) (== NextID: 19 ==)
677 &quot;cpuOvercommitType&quot;: &quot;A String&quot;, # CPU overcommit.
678 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
679 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
680 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
681 &quot;kind&quot;: &quot;compute#nodeTemplate&quot;, # [Output Only] The type of the resource. Always compute#nodeTemplate for node templates.
682 &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.
683 &quot;nodeAffinityLabels&quot;: { # Labels to use for node affinity, which will be used in instance scheduling.
684 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700685 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700686 &quot;nodeType&quot;: &quot;A String&quot;, # The node type to use for nodes group that are created from this template.
687 &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.
688 #
689 # This field is mutually exclusive with the node_type property; you can only define one or the other, but not both.
690 &quot;cpus&quot;: &quot;A String&quot;,
691 &quot;localSsd&quot;: &quot;A String&quot;,
692 &quot;memory&quot;: &quot;A String&quot;,
693 },
694 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The name of the region where the node template resides, such as us-central1.
695 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
696 &quot;serverBinding&quot;: { # Sets the binding properties for the physical server. Valid values include:
697 # - [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server
698 # - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible
699 #
700 # See Sole-tenant node options for more information.
701 &quot;type&quot;: &quot;A String&quot;,
702 },
703 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING.
704 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
705 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700706 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700707 &quot;kind&quot;: &quot;compute#nodeTemplateList&quot;, # [Output Only] Type of resource.Always compute#nodeTemplateList for lists of node templates.
708 &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.
709 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
710 &quot;warning&quot;: { # [Output Only] Informational warning message.
711 &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.
712 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
713 # &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 -0700714 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700715 &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).
716 &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 -0700717 },
718 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 &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 -0700720 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700721 }</pre>
722</div>
723
724<div class="method">
725 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
726 <pre>Retrieves the next page of results.
727
728Args:
729 previous_request: The request for the previous page. (required)
730 previous_response: The response from the request for the previous page. (required)
731
732Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700733 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700734 page. Returns None if there are no more items in the collection.
735 </pre>
736</div>
737
738<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700739 <code class="details" id="setIamPolicy">setIamPolicy(project, region, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700740 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
741
742Args:
743 project: string, Project ID for this request. (required)
744 region: string, The name of the region for this request. (required)
745 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700746 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700747 The object takes the form of:
748
749{
Bu Sun Kim65020912020-05-20 12:08:20 -0700750 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
751 { # Associates `members` with a `role`.
752 &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.
753 #
754 # If the condition evaluates to `true`, then this binding applies to the current request.
755 #
756 # 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.
757 #
758 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
759 #
760 # Example (Comparison):
761 #
762 # 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;
763 #
764 # Example (Equality):
765 #
766 # 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;
767 #
768 # Example (Logic):
769 #
770 # 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;
771 #
772 # Example (Data Manipulation):
773 #
774 # 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;
775 #
776 # 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.
777 &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.
778 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
779 &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.
780 &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.
781 },
782 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
783 #
784 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
785 #
786 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
787 #
788 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
789 #
790 #
791 #
792 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
793 #
794 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
795 #
796 # * `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.
797 #
798 # * `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.
799 #
800 # * `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.
801 #
802 #
803 #
804 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
805 &quot;A String&quot;,
806 ],
807 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
808 },
809 ],
810 &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.
811 &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 -0700812 #
813 #
814 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700815 # 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 -0700816 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700817 # 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 -0700818 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700819 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700820 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700821 # { &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 -0700822 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700823 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700824 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700825 # 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 -0700826 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700827 # 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 -0700828 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700829 { # 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.
830 #
831 # 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.
832 #
833 # Example Policy with multiple AuditConfigs:
834 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700835 # { &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 -0700836 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700837 # 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 -0700838 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700839 { # Provides the configuration for logging a type of permissions. Example:
840 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700841 # { &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 -0700842 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700843 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
844 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
845 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700846 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700847 &quot;ignoreChildExemptions&quot;: True or False,
848 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700849 },
850 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700851 &quot;exemptedMembers&quot;: [
852 &quot;A String&quot;,
853 ],
854 &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 -0700855 },
856 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700857 &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 -0700858 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700859 &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.
860 #
861 # If the condition evaluates to `true`, then this binding applies to the current request.
862 #
863 # 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.
864 #
865 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
866 #
867 # Example (Comparison):
868 #
869 # 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;
870 #
871 # Example (Equality):
872 #
873 # 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;
874 #
875 # Example (Logic):
876 #
877 # 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;
878 #
879 # Example (Data Manipulation):
880 #
881 # 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;
882 #
883 # 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.
884 &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.
885 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
886 &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.
887 &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.
888 },
889 &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 -0700890 #
891 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
892 #
893 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
894 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700895 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700896 #
897 #
898 #
899 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
900 #
901 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
902 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700903 # * `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.
904 #
905 # * `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.
906 #
907 # * `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.
908 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700909 #
910 #
911 # * `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 -0700912 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700913 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700914 &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 -0700915 },
916 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700917 &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.
918 #
919 # **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.
920 &quot;iamOwned&quot;: True or False,
921 &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.
922 { # A rule to be applied in a Policy.
923 &quot;action&quot;: &quot;A String&quot;, # Required
924 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
925 { # A condition to be met.
926 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
927 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
928 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
929 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
930 &quot;values&quot;: [ # The objects of the condition.
931 &quot;A String&quot;,
932 ],
933 },
934 ],
935 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
936 &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.
937 &quot;A String&quot;,
938 ],
939 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
940 { # Specifies what kind of log the caller must write
941 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
942 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
943 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
944 },
945 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
946 },
947 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
948 #
949 # 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.
950 #
951 # Field names correspond to IAM request parameters and field values are their respective values.
952 #
953 # 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.
954 #
955 # 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]}
956 &quot;customFields&quot;: [ # Custom fields.
957 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
958 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
959 &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.
960 },
961 ],
962 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
963 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
964 },
965 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
966 &quot;logMode&quot;: &quot;A String&quot;,
967 },
968 },
969 ],
970 &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.
971 &quot;A String&quot;,
972 ],
973 &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.
974 &quot;A String&quot;,
975 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700976 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700977 ],
978 &quot;version&quot;: 42, # Specifies the format of the policy.
979 #
980 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
981 #
982 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
983 #
984 # * 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
985 #
986 # **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.
987 #
988 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
989 #
990 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
991 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700992 }
993
994
995Returns:
996 An object of the form:
997
Dan O'Mearadd494642020-05-01 07:42:23 -0700998 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700999 #
1000 #
1001 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001002 # 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 -07001003 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001004 # 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 -07001005 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001006 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001007 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001008 # { &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 -07001009 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001010 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001011 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001012 # 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 -07001013 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001014 # 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 -07001015 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001016 { # 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.
1017 #
1018 # 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.
1019 #
1020 # Example Policy with multiple AuditConfigs:
1021 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001022 # { &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 -07001023 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001024 # 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 -07001025 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001026 { # Provides the configuration for logging a type of permissions. Example:
1027 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001028 # { &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 -07001029 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001030 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1031 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1032 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001033 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001034 &quot;ignoreChildExemptions&quot;: True or False,
1035 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001036 },
1037 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001038 &quot;exemptedMembers&quot;: [
1039 &quot;A String&quot;,
1040 ],
1041 &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 -07001042 },
1043 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001044 &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 -07001045 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001046 &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.
1047 #
1048 # If the condition evaluates to `true`, then this binding applies to the current request.
1049 #
1050 # 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.
1051 #
1052 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1053 #
1054 # Example (Comparison):
1055 #
1056 # 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;
1057 #
1058 # Example (Equality):
1059 #
1060 # 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;
1061 #
1062 # Example (Logic):
1063 #
1064 # 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;
1065 #
1066 # Example (Data Manipulation):
1067 #
1068 # 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;
1069 #
1070 # 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.
1071 &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.
1072 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1073 &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.
1074 &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.
1075 },
1076 &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 -07001077 #
1078 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1079 #
1080 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1081 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001082 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001083 #
1084 #
1085 #
1086 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1087 #
1088 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1089 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001090 # * `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.
1091 #
1092 # * `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.
1093 #
1094 # * `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.
1095 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001096 #
1097 #
1098 # * `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 -07001099 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001100 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001101 &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 -07001102 },
1103 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001104 &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.
1105 #
1106 # **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.
1107 &quot;iamOwned&quot;: True or False,
1108 &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.
1109 { # A rule to be applied in a Policy.
1110 &quot;action&quot;: &quot;A String&quot;, # Required
1111 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1112 { # A condition to be met.
1113 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1114 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1115 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1116 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1117 &quot;values&quot;: [ # The objects of the condition.
1118 &quot;A String&quot;,
1119 ],
1120 },
1121 ],
1122 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1123 &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.
1124 &quot;A String&quot;,
1125 ],
1126 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1127 { # Specifies what kind of log the caller must write
1128 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1129 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1130 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1131 },
1132 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1133 },
1134 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1135 #
1136 # 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.
1137 #
1138 # Field names correspond to IAM request parameters and field values are their respective values.
1139 #
1140 # 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.
1141 #
1142 # 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]}
1143 &quot;customFields&quot;: [ # Custom fields.
1144 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1145 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1146 &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.
1147 },
1148 ],
1149 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1150 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1151 },
1152 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1153 &quot;logMode&quot;: &quot;A String&quot;,
1154 },
1155 },
1156 ],
1157 &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.
1158 &quot;A String&quot;,
1159 ],
1160 &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.
1161 &quot;A String&quot;,
1162 ],
1163 },
1164 ],
1165 &quot;version&quot;: 42, # Specifies the format of the policy.
1166 #
1167 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1168 #
1169 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1170 #
1171 # * 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
1172 #
1173 # **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.
1174 #
1175 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1176 #
1177 # 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 -07001178 }</pre>
1179</div>
1180
1181<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001182 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001183 <pre>Returns permissions that a caller has on the specified resource.
1184
1185Args:
1186 project: string, Project ID for this request. (required)
1187 region: string, The name of the region for this request. (required)
1188 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001189 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001190 The object takes the form of:
1191
1192{
Bu Sun Kim65020912020-05-20 12:08:20 -07001193 &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.
1194 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001195 ],
1196 }
1197
1198
1199Returns:
1200 An object of the form:
1201
1202 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001203 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1204 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001205 ],
1206 }</pre>
1207</div>
1208
1209</body></html>