blob: 0b387421a1e8fe04b9179daf0e6a5d9f7230abb3 [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -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="cloudasset_v1p1beta1.html">Cloud Asset API</a> . <a href="cloudasset_v1p1beta1.iamPolicies.html">iamPolicies</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070078 <code><a href="#searchAll">searchAll(scope, pageSize=None, pageToken=None, query=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Searches all the IAM policies within a given accessible CRM scope</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070080<p class="toc_element">
81 <code><a href="#searchAll_next">searchAll_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<h3>Method Details</h3>
84<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070085 <code class="details" id="searchAll">searchAll(scope, pageSize=None, pageToken=None, query=None, x__xgafv=None)</code>
86 <pre>Searches all the IAM policies within a given accessible CRM scope
87(project/folder/organization). This RPC gives callers especially
88administrators the ability to search all the IAM policies within a scope,
89even if they don&#x27;t have `.getIamPolicy` permission of all the IAM policies.
90Callers should have `cloud.assets.SearchAllIamPolicies` permission on the
91requested scope, otherwise the request will be rejected.
Bu Sun Kim65020912020-05-20 12:08:20 -070092
93Args:
94 scope: string, Required. The relative name of an asset. The search is limited to the resources
95within the `scope`. The allowed value must be:
Bu Sun Kimd059ad82020-07-22 17:02:09 -070096
Bu Sun Kim65020912020-05-20 12:08:20 -070097* Organization number (such as &quot;organizations/123&quot;)
98* Folder number(such as &quot;folders/1234&quot;)
99* Project number (such as &quot;projects/12345&quot;)
100* Project id (such as &quot;projects/abc&quot;) (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700101 pageSize: integer, Optional. The page size for search result pagination. Page size is capped at 500 even
102if a larger value is given. If set to zero, server will pick an appropriate
103default. Returned results may be fewer than requested. When this happens,
104there could be more results as long as `next_page_token` is returned.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700105 pageToken: string, Optional. If present, retrieve the next batch of results from the preceding call to
106this method. `page_token` must be the value of `next_page_token` from the
107previous response. The values of all other method parameters must be
108identical to those in the previous call.
109 query: string, Optional. The query statement. Examples:
110
111* &quot;policy:myuser@mydomain.com&quot;
112* &quot;policy:(myuser@mydomain.com viewer)&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700113 x__xgafv: string, V1 error format.
114 Allowed values
115 1 - v1 error format
116 2 - v2 error format
117
118Returns:
119 An object of the form:
120
121 { # Search all IAM policies response.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700122 &quot;nextPageToken&quot;: &quot;A String&quot;, # Set if there are more results than those appearing in this response; to get
123 # the next set of results, call this method again, using this value as the
124 # `page_token`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700125 &quot;results&quot;: [ # A list of IamPolicy that match the search query. Related information such
126 # as the associated resource is returned along with the policy.
127 { # The result for a IAM Policy search.
Bu Sun Kim65020912020-05-20 12:08:20 -0700128 &quot;project&quot;: &quot;A String&quot;, # The project that the associated GCP resource belongs to, in the form of
129 # `projects/{project_number}`. If an IAM policy is set on a resource (like VM
130 # instance, Cloud Storage bucket), the project field will indicate the
131 # project that contains the resource. If an IAM policy is set on a folder or
132 # orgnization, the project field will be empty.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700133 &quot;explanation&quot;: { # Explanation about the IAM policy search result. # Explanation about the IAM policy search result. It contains additional
134 # information to explain why the search result matches the query.
135 &quot;matchedPermissions&quot;: { # The map from roles to their included permission matching the permission
136 # query (e.g. containing `policy.role.permissions:`). A sample role string:
137 # &quot;roles/compute.instanceAdmin&quot;. The roles can also be found in the
138 # returned `policy` bindings. Note that the map is populated only if
139 # requesting with a permission query.
140 &quot;a_key&quot;: { # IAM permissions
141 &quot;permissions&quot;: [ # A list of permissions. A sample permission string: &quot;compute.disk.get&quot;.
142 &quot;A String&quot;,
143 ],
144 },
145 },
146 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # The IAM policy directly set on the given resource. Note that the original
148 # IAM policy can contain multiple bindings. This only contains the bindings
149 # that match the given query. For queries that don&#x27;t contain a constrain on
150 # policies (e.g. an empty query), this contains all the bindings.
151 # controls for Google Cloud resources.
152 #
153 #
154 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
155 # `members` to a single `role`. Members can be user accounts, service accounts,
156 # Google groups, and domains (such as G Suite). A `role` is a named list of
157 # permissions; each `role` can be an IAM predefined role or a user-created
158 # custom role.
159 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700160 # For some types of Google Cloud resources, a `binding` can also specify a
161 # `condition`, which is a logical expression that allows access to a resource
162 # only if the expression evaluates to `true`. A condition can add constraints
163 # based on attributes of the request, the resource, or both. To learn which
164 # resources support conditions in their IAM policies, see the
165 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700166 #
167 # **JSON example:**
168 #
169 # {
170 # &quot;bindings&quot;: [
171 # {
172 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
173 # &quot;members&quot;: [
174 # &quot;user:mike@example.com&quot;,
175 # &quot;group:admins@example.com&quot;,
176 # &quot;domain:google.com&quot;,
177 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
178 # ]
179 # },
180 # {
181 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700182 # &quot;members&quot;: [
183 # &quot;user:eve@example.com&quot;
184 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700185 # &quot;condition&quot;: {
186 # &quot;title&quot;: &quot;expirable access&quot;,
187 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
188 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
189 # }
190 # }
191 # ],
192 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
193 # &quot;version&quot;: 3
194 # }
195 #
196 # **YAML example:**
197 #
198 # bindings:
199 # - members:
200 # - user:mike@example.com
201 # - group:admins@example.com
202 # - domain:google.com
203 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
204 # role: roles/resourcemanager.organizationAdmin
205 # - members:
206 # - user:eve@example.com
207 # role: roles/resourcemanager.organizationViewer
208 # condition:
209 # title: expirable access
210 # description: Does not grant access after Sep 2020
211 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
212 # - etag: BwWWja0YfJA=
213 # - version: 3
214 #
215 # For a description of IAM and its features, see the
216 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700217 &quot;version&quot;: 42, # Specifies the format of the policy.
218 #
219 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
220 # are rejected.
221 #
222 # Any operation that affects conditional role bindings must specify version
223 # `3`. This requirement applies to the following operations:
224 #
225 # * Getting a policy that includes a conditional role binding
226 # * Adding a conditional role binding to a policy
227 # * Changing a conditional role binding in a policy
228 # * Removing any role binding, with or without a condition, from a policy
229 # that includes conditions
230 #
231 # **Important:** If you use IAM Conditions, you must include the `etag` field
232 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
233 # you to overwrite a version `3` policy with a version `1` policy, and all of
234 # the conditions in the version `3` policy are lost.
235 #
236 # If a policy does not include any conditions, operations on that policy may
237 # specify any valid version or leave the field unset.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700238 #
239 # To learn which resources support conditions in their IAM policies, see the
240 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700241 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
242 # `condition` that determines how and when the `bindings` are applied. Each
243 # of the `bindings` must contain at least one member.
244 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700245 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
246 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700247 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700248 #
249 # If the condition evaluates to `true`, then this binding applies to the
250 # current request.
251 #
252 # If the condition evaluates to `false`, then this binding does not apply to
253 # the current request. However, a different role binding might grant the same
254 # role to one or more of the members in this binding.
255 #
256 # To learn which resources support conditions in their IAM policies, see the
257 # [IAM
258 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700259 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
260 # are documented at https://github.com/google/cel-spec.
261 #
262 # Example (Comparison):
263 #
264 # title: &quot;Summary size limit&quot;
265 # description: &quot;Determines if a summary is less than 100 chars&quot;
266 # expression: &quot;document.summary.size() &lt; 100&quot;
267 #
268 # Example (Equality):
269 #
270 # title: &quot;Requestor is owner&quot;
271 # description: &quot;Determines if requestor is the document owner&quot;
272 # expression: &quot;document.owner == request.auth.claims.email&quot;
273 #
274 # Example (Logic):
275 #
276 # title: &quot;Public documents&quot;
277 # description: &quot;Determine whether the document should be publicly visible&quot;
278 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
279 #
280 # Example (Data Manipulation):
281 #
282 # title: &quot;Notification string&quot;
283 # description: &quot;Create a notification string with a timestamp.&quot;
284 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
285 #
286 # The exact variables and functions that may be referenced within an expression
287 # are determined by the service that evaluates it. See the service
288 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700289 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
290 # describes the expression, e.g. when hovered over it in a UI.
291 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
292 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700293 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
294 # reporting, e.g. a file name and a position in the file.
295 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
296 # its purpose. This can be used e.g. in UIs which allow to enter the
297 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700298 },
299 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
300 # `members` can have the following values:
301 #
302 # * `allUsers`: A special identifier that represents anyone who is
303 # on the internet; with or without a Google account.
304 #
305 # * `allAuthenticatedUsers`: A special identifier that represents anyone
306 # who is authenticated with a Google account or a service account.
307 #
308 # * `user:{emailid}`: An email address that represents a specific Google
309 # account. For example, `alice@example.com` .
310 #
311 #
312 # * `serviceAccount:{emailid}`: An email address that represents a service
313 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
314 #
315 # * `group:{emailid}`: An email address that represents a Google group.
316 # For example, `admins@example.com`.
317 #
318 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
319 # identifier) representing a user that has been recently deleted. For
320 # example, `alice@example.com?uid=123456789012345678901`. If the user is
321 # recovered, this value reverts to `user:{emailid}` and the recovered user
322 # retains the role in the binding.
323 #
324 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
325 # unique identifier) representing a service account that has been recently
326 # deleted. For example,
327 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
328 # If the service account is undeleted, this value reverts to
329 # `serviceAccount:{emailid}` and the undeleted service account retains the
330 # role in the binding.
331 #
332 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
333 # identifier) representing a Google group that has been recently
334 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
335 # the group is recovered, this value reverts to `group:{emailid}` and the
336 # recovered group retains the role in the binding.
337 #
338 #
339 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
340 # users of that domain. For example, `google.com` or `example.com`.
341 #
342 &quot;A String&quot;,
343 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700344 },
345 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700346 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
347 { # Specifies the audit configuration for a service.
348 # The configuration determines which permission types are logged, and what
349 # identities, if any, are exempted from logging.
350 # An AuditConfig must have one or more AuditLogConfigs.
351 #
352 # If there are AuditConfigs for both `allServices` and a specific service,
353 # the union of the two AuditConfigs is used for that service: the log_types
354 # specified in each AuditConfig are enabled, and the exempted_members in each
355 # AuditLogConfig are exempted.
356 #
357 # Example Policy with multiple AuditConfigs:
358 #
359 # {
360 # &quot;audit_configs&quot;: [
361 # {
362 # &quot;service&quot;: &quot;allServices&quot;,
363 # &quot;audit_log_configs&quot;: [
364 # {
365 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
366 # &quot;exempted_members&quot;: [
367 # &quot;user:jose@example.com&quot;
368 # ]
369 # },
370 # {
371 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
372 # },
373 # {
374 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
375 # }
376 # ]
377 # },
378 # {
379 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
380 # &quot;audit_log_configs&quot;: [
381 # {
382 # &quot;log_type&quot;: &quot;DATA_READ&quot;
383 # },
384 # {
385 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
386 # &quot;exempted_members&quot;: [
387 # &quot;user:aliya@example.com&quot;
388 # ]
389 # }
390 # ]
391 # }
392 # ]
393 # }
394 #
395 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
396 # logging. It also exempts jose@example.com from DATA_READ logging, and
397 # aliya@example.com from DATA_WRITE logging.
398 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
399 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
400 # `allServices` is a special value that covers all services.
401 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
402 { # Provides the configuration for logging a type of permissions.
403 # Example:
404 #
405 # {
406 # &quot;audit_log_configs&quot;: [
407 # {
408 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
409 # &quot;exempted_members&quot;: [
410 # &quot;user:jose@example.com&quot;
411 # ]
412 # },
413 # {
414 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
415 # }
416 # ]
417 # }
418 #
419 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
420 # jose@example.com from DATA_READ logging.
421 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
422 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
423 # permission.
424 # Follows the same format of Binding.members.
425 &quot;A String&quot;,
426 ],
427 },
428 ],
429 },
430 ],
431 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
432 # prevent simultaneous updates of a policy from overwriting each other.
433 # It is strongly suggested that systems make use of the `etag` in the
434 # read-modify-write cycle to perform policy updates in order to avoid race
435 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
436 # systems are expected to put that etag in the request to `setIamPolicy` to
437 # ensure that their change will be applied to the same version of the policy.
438 #
439 # **Important:** If you use IAM Conditions, you must include the `etag` field
440 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
441 # you to overwrite a version `3` policy with a version `1` policy, and all of
442 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700443 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700444 &quot;resource&quot;: &quot;A String&quot;, # The [full resource
445 # name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
446 # of the resource associated with this IAM policy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700447 },
448 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700449 }</pre>
450</div>
451
452<div class="method">
453 <code class="details" id="searchAll_next">searchAll_next(previous_request, previous_response)</code>
454 <pre>Retrieves the next page of results.
455
456Args:
457 previous_request: The request for the previous page. (required)
458 previous_response: The response from the request for the previous page. (required)
459
460Returns:
461 A request object that you can call &#x27;execute()&#x27; on to request the next
462 page. Returns None if there are no more items in the collection.
463 </pre>
464</div>
465
466</body></html>