blob: 730cd49526b02d7ce5a5ef0c0dc63416d452204c [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="cloudiot_v1.html">Cloud IoT API</a> . <a href="cloudiot_v1.projects.html">projects</a> . <a href="cloudiot_v1.projects.locations.html">locations</a> . <a href="cloudiot_v1.projects.locations.registries.html">registries</a> . <a href="cloudiot_v1.projects.locations.registries.groups.html">groups</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="cloudiot_v1.projects.locations.registries.groups.devices.html">devices()</a></code>
79</p>
80<p class="firstline">Returns the devices Resource.</p>
81
82<p class="toc_element">
83 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
84<p class="firstline">Gets the access control policy for a resource.</p>
85<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070086 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087<p class="firstline">Sets the access control policy on the specified resource. Replaces any</p>
88<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070089 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
91<h3>Method Details</h3>
92<div class="method">
93 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
94 <pre>Gets the access control policy for a resource.
95Returns an empty policy if the resource exists and does not have a policy
96set.
97
98Args:
99 resource: string, REQUIRED: The resource for which the policy is being requested.
100See the operation documentation for the appropriate value for this field. (required)
101 body: object, The request body.
102 The object takes the form of:
103
104{ # Request message for `GetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
Dan O'Mearadd494642020-05-01 07:42:23 -0700106 # `GetIamPolicy`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700107 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 #
109 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
110 # rejected.
111 #
112 # Requests for policies with any conditional bindings must specify version 3.
113 # Policies without any conditional bindings may specify any valid value or
114 # leave the field unset.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700115 #
116 # To learn which resources support conditions in their IAM policies, see the
117 # [IAM
118 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700119 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120 }
121
122 x__xgafv: string, V1 error format.
123 Allowed values
124 1 - v1 error format
125 2 - v2 error format
126
127Returns:
128 An object of the form:
129
Dan O'Mearadd494642020-05-01 07:42:23 -0700130 { # An Identity and Access Management (IAM) policy, which specifies access
131 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 #
133 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700134 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
135 # `members` to a single `role`. Members can be user accounts, service accounts,
136 # Google groups, and domains (such as G Suite). A `role` is a named list of
137 # permissions; each `role` can be an IAM predefined role or a user-created
138 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700139 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700140 # For some types of Google Cloud resources, a `binding` can also specify a
141 # `condition`, which is a logical expression that allows access to a resource
142 # only if the expression evaluates to `true`. A condition can add constraints
143 # based on attributes of the request, the resource, or both. To learn which
144 # resources support conditions in their IAM policies, see the
145 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700146 #
147 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148 #
149 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700150 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700152 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
153 # &quot;members&quot;: [
154 # &quot;user:mike@example.com&quot;,
155 # &quot;group:admins@example.com&quot;,
156 # &quot;domain:google.com&quot;,
157 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700158 # ]
159 # },
160 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700161 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700162 # &quot;members&quot;: [
163 # &quot;user:eve@example.com&quot;
164 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700165 # &quot;condition&quot;: {
166 # &quot;title&quot;: &quot;expirable access&quot;,
167 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
168 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700169 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700170 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700172 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
173 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700174 # }
175 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700176 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700177 #
178 # bindings:
179 # - members:
180 # - user:mike@example.com
181 # - group:admins@example.com
182 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700183 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
184 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700185 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 # - user:eve@example.com
187 # role: roles/resourcemanager.organizationViewer
188 # condition:
189 # title: expirable access
190 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700191 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700192 # - etag: BwWWja0YfJA=
193 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700194 #
195 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700196 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700197 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700198 # `condition` that determines how and when the `bindings` are applied. Each
199 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700200 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700201 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
202 #
203 # If the condition evaluates to `true`, then this binding applies to the
204 # current request.
205 #
206 # If the condition evaluates to `false`, then this binding does not apply to
207 # the current request. However, a different role binding might grant the same
208 # role to one or more of the members in this binding.
209 #
210 # To learn which resources support conditions in their IAM policies, see the
211 # [IAM
212 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
213 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
214 # are documented at https://github.com/google/cel-spec.
215 #
216 # Example (Comparison):
217 #
218 # title: &quot;Summary size limit&quot;
219 # description: &quot;Determines if a summary is less than 100 chars&quot;
220 # expression: &quot;document.summary.size() &lt; 100&quot;
221 #
222 # Example (Equality):
223 #
224 # title: &quot;Requestor is owner&quot;
225 # description: &quot;Determines if requestor is the document owner&quot;
226 # expression: &quot;document.owner == request.auth.claims.email&quot;
227 #
228 # Example (Logic):
229 #
230 # title: &quot;Public documents&quot;
231 # description: &quot;Determine whether the document should be publicly visible&quot;
232 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
233 #
234 # Example (Data Manipulation):
235 #
236 # title: &quot;Notification string&quot;
237 # description: &quot;Create a notification string with a timestamp.&quot;
238 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
239 #
240 # The exact variables and functions that may be referenced within an expression
241 # are determined by the service that evaluates it. See the service
242 # documentation for additional information.
243 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
244 # describes the expression, e.g. when hovered over it in a UI.
245 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
246 # syntax.
247 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
248 # its purpose. This can be used e.g. in UIs which allow to enter the
249 # expression.
250 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
251 # reporting, e.g. a file name and a position in the file.
252 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700253 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254 # `members` can have the following values:
255 #
256 # * `allUsers`: A special identifier that represents anyone who is
257 # on the internet; with or without a Google account.
258 #
259 # * `allAuthenticatedUsers`: A special identifier that represents anyone
260 # who is authenticated with a Google account or a service account.
261 #
262 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700263 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264 #
265 #
266 # * `serviceAccount:{emailid}`: An email address that represents a service
267 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
268 #
269 # * `group:{emailid}`: An email address that represents a Google group.
270 # For example, `admins@example.com`.
271 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700272 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
273 # identifier) representing a user that has been recently deleted. For
274 # example, `alice@example.com?uid=123456789012345678901`. If the user is
275 # recovered, this value reverts to `user:{emailid}` and the recovered user
276 # retains the role in the binding.
277 #
278 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
279 # unique identifier) representing a service account that has been recently
280 # deleted. For example,
281 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
282 # If the service account is undeleted, this value reverts to
283 # `serviceAccount:{emailid}` and the undeleted service account retains the
284 # role in the binding.
285 #
286 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
287 # identifier) representing a Google group that has been recently
288 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
289 # the group is recovered, this value reverts to `group:{emailid}` and the
290 # recovered group retains the role in the binding.
291 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 #
293 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
294 # users of that domain. For example, `google.com` or `example.com`.
295 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700296 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700297 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700298 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
299 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700300 },
301 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700302 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
303 # prevent simultaneous updates of a policy from overwriting each other.
304 # It is strongly suggested that systems make use of the `etag` in the
305 # read-modify-write cycle to perform policy updates in order to avoid race
306 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
307 # systems are expected to put that etag in the request to `setIamPolicy` to
308 # ensure that their change will be applied to the same version of the policy.
309 #
310 # **Important:** If you use IAM Conditions, you must include the `etag` field
311 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
312 # you to overwrite a version `3` policy with a version `1` policy, and all of
313 # the conditions in the version `3` policy are lost.
314 &quot;version&quot;: 42, # Specifies the format of the policy.
315 #
316 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
317 # are rejected.
318 #
319 # Any operation that affects conditional role bindings must specify version
320 # `3`. This requirement applies to the following operations:
321 #
322 # * Getting a policy that includes a conditional role binding
323 # * Adding a conditional role binding to a policy
324 # * Changing a conditional role binding in a policy
325 # * Removing any role binding, with or without a condition, from a policy
326 # that includes conditions
327 #
328 # **Important:** If you use IAM Conditions, you must include the `etag` field
329 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
330 # you to overwrite a version `3` policy with a version `1` policy, and all of
331 # the conditions in the version `3` policy are lost.
332 #
333 # If a policy does not include any conditions, operations on that policy may
334 # specify any valid version or leave the field unset.
335 #
336 # To learn which resources support conditions in their IAM policies, see the
337 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700338 }</pre>
339</div>
340
341<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700342 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700343 <pre>Sets the access control policy on the specified resource. Replaces any
344existing policy.
345
346Args:
347 resource: string, REQUIRED: The resource for which the policy is being specified.
348See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700349 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700350 The object takes the form of:
351
352{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700353 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700354 # the policy is limited to a few 10s of KB. An empty policy is a
355 # valid policy but certain Cloud Platform services (such as Projects)
356 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -0700357 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700358 #
359 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700360 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
361 # `members` to a single `role`. Members can be user accounts, service accounts,
362 # Google groups, and domains (such as G Suite). A `role` is a named list of
363 # permissions; each `role` can be an IAM predefined role or a user-created
364 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700365 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700366 # For some types of Google Cloud resources, a `binding` can also specify a
367 # `condition`, which is a logical expression that allows access to a resource
368 # only if the expression evaluates to `true`. A condition can add constraints
369 # based on attributes of the request, the resource, or both. To learn which
370 # resources support conditions in their IAM policies, see the
371 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700372 #
373 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374 #
375 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700376 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700377 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700378 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
379 # &quot;members&quot;: [
380 # &quot;user:mike@example.com&quot;,
381 # &quot;group:admins@example.com&quot;,
382 # &quot;domain:google.com&quot;,
383 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700384 # ]
385 # },
386 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700387 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700388 # &quot;members&quot;: [
389 # &quot;user:eve@example.com&quot;
390 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700391 # &quot;condition&quot;: {
392 # &quot;title&quot;: &quot;expirable access&quot;,
393 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
394 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700395 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700396 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700397 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700398 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
399 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700400 # }
401 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700402 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700403 #
404 # bindings:
405 # - members:
406 # - user:mike@example.com
407 # - group:admins@example.com
408 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700409 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
410 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700412 # - user:eve@example.com
413 # role: roles/resourcemanager.organizationViewer
414 # condition:
415 # title: expirable access
416 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700417 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700418 # - etag: BwWWja0YfJA=
419 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700420 #
421 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700422 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700423 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700424 # `condition` that determines how and when the `bindings` are applied. Each
425 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700426 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700427 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
428 #
429 # If the condition evaluates to `true`, then this binding applies to the
430 # current request.
431 #
432 # If the condition evaluates to `false`, then this binding does not apply to
433 # the current request. However, a different role binding might grant the same
434 # role to one or more of the members in this binding.
435 #
436 # To learn which resources support conditions in their IAM policies, see the
437 # [IAM
438 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
439 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
440 # are documented at https://github.com/google/cel-spec.
441 #
442 # Example (Comparison):
443 #
444 # title: &quot;Summary size limit&quot;
445 # description: &quot;Determines if a summary is less than 100 chars&quot;
446 # expression: &quot;document.summary.size() &lt; 100&quot;
447 #
448 # Example (Equality):
449 #
450 # title: &quot;Requestor is owner&quot;
451 # description: &quot;Determines if requestor is the document owner&quot;
452 # expression: &quot;document.owner == request.auth.claims.email&quot;
453 #
454 # Example (Logic):
455 #
456 # title: &quot;Public documents&quot;
457 # description: &quot;Determine whether the document should be publicly visible&quot;
458 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
459 #
460 # Example (Data Manipulation):
461 #
462 # title: &quot;Notification string&quot;
463 # description: &quot;Create a notification string with a timestamp.&quot;
464 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
465 #
466 # The exact variables and functions that may be referenced within an expression
467 # are determined by the service that evaluates it. See the service
468 # documentation for additional information.
469 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
470 # describes the expression, e.g. when hovered over it in a UI.
471 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
472 # syntax.
473 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
474 # its purpose. This can be used e.g. in UIs which allow to enter the
475 # expression.
476 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
477 # reporting, e.g. a file name and a position in the file.
478 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700479 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700480 # `members` can have the following values:
481 #
482 # * `allUsers`: A special identifier that represents anyone who is
483 # on the internet; with or without a Google account.
484 #
485 # * `allAuthenticatedUsers`: A special identifier that represents anyone
486 # who is authenticated with a Google account or a service account.
487 #
488 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700489 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700490 #
491 #
492 # * `serviceAccount:{emailid}`: An email address that represents a service
493 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
494 #
495 # * `group:{emailid}`: An email address that represents a Google group.
496 # For example, `admins@example.com`.
497 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700498 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
499 # identifier) representing a user that has been recently deleted. For
500 # example, `alice@example.com?uid=123456789012345678901`. If the user is
501 # recovered, this value reverts to `user:{emailid}` and the recovered user
502 # retains the role in the binding.
503 #
504 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
505 # unique identifier) representing a service account that has been recently
506 # deleted. For example,
507 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
508 # If the service account is undeleted, this value reverts to
509 # `serviceAccount:{emailid}` and the undeleted service account retains the
510 # role in the binding.
511 #
512 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
513 # identifier) representing a Google group that has been recently
514 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
515 # the group is recovered, this value reverts to `group:{emailid}` and the
516 # recovered group retains the role in the binding.
517 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700518 #
519 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
520 # users of that domain. For example, `google.com` or `example.com`.
521 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700522 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700523 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700524 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
525 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700526 },
527 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700528 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
529 # prevent simultaneous updates of a policy from overwriting each other.
530 # It is strongly suggested that systems make use of the `etag` in the
531 # read-modify-write cycle to perform policy updates in order to avoid race
532 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
533 # systems are expected to put that etag in the request to `setIamPolicy` to
534 # ensure that their change will be applied to the same version of the policy.
535 #
536 # **Important:** If you use IAM Conditions, you must include the `etag` field
537 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
538 # you to overwrite a version `3` policy with a version `1` policy, and all of
539 # the conditions in the version `3` policy are lost.
540 &quot;version&quot;: 42, # Specifies the format of the policy.
541 #
542 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
543 # are rejected.
544 #
545 # Any operation that affects conditional role bindings must specify version
546 # `3`. This requirement applies to the following operations:
547 #
548 # * Getting a policy that includes a conditional role binding
549 # * Adding a conditional role binding to a policy
550 # * Changing a conditional role binding in a policy
551 # * Removing any role binding, with or without a condition, from a policy
552 # that includes conditions
553 #
554 # **Important:** If you use IAM Conditions, you must include the `etag` field
555 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
556 # you to overwrite a version `3` policy with a version `1` policy, and all of
557 # the conditions in the version `3` policy are lost.
558 #
559 # If a policy does not include any conditions, operations on that policy may
560 # specify any valid version or leave the field unset.
561 #
562 # To learn which resources support conditions in their IAM policies, see the
563 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700564 },
565 }
566
567 x__xgafv: string, V1 error format.
568 Allowed values
569 1 - v1 error format
570 2 - v2 error format
571
572Returns:
573 An object of the form:
574
Dan O'Mearadd494642020-05-01 07:42:23 -0700575 { # An Identity and Access Management (IAM) policy, which specifies access
576 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700577 #
578 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700579 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
580 # `members` to a single `role`. Members can be user accounts, service accounts,
581 # Google groups, and domains (such as G Suite). A `role` is a named list of
582 # permissions; each `role` can be an IAM predefined role or a user-created
583 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700584 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700585 # For some types of Google Cloud resources, a `binding` can also specify a
586 # `condition`, which is a logical expression that allows access to a resource
587 # only if the expression evaluates to `true`. A condition can add constraints
588 # based on attributes of the request, the resource, or both. To learn which
589 # resources support conditions in their IAM policies, see the
590 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700591 #
592 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593 #
594 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700595 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700596 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700597 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
598 # &quot;members&quot;: [
599 # &quot;user:mike@example.com&quot;,
600 # &quot;group:admins@example.com&quot;,
601 # &quot;domain:google.com&quot;,
602 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700603 # ]
604 # },
605 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700606 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700607 # &quot;members&quot;: [
608 # &quot;user:eve@example.com&quot;
609 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700610 # &quot;condition&quot;: {
611 # &quot;title&quot;: &quot;expirable access&quot;,
612 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
613 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700614 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700615 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700616 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700617 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
618 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700619 # }
620 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700621 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700622 #
623 # bindings:
624 # - members:
625 # - user:mike@example.com
626 # - group:admins@example.com
627 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700628 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
629 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700630 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700631 # - user:eve@example.com
632 # role: roles/resourcemanager.organizationViewer
633 # condition:
634 # title: expirable access
635 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700636 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700637 # - etag: BwWWja0YfJA=
638 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700639 #
640 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700641 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700642 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700643 # `condition` that determines how and when the `bindings` are applied. Each
644 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700645 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700646 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
647 #
648 # If the condition evaluates to `true`, then this binding applies to the
649 # current request.
650 #
651 # If the condition evaluates to `false`, then this binding does not apply to
652 # the current request. However, a different role binding might grant the same
653 # role to one or more of the members in this binding.
654 #
655 # To learn which resources support conditions in their IAM policies, see the
656 # [IAM
657 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
658 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
659 # are documented at https://github.com/google/cel-spec.
660 #
661 # Example (Comparison):
662 #
663 # title: &quot;Summary size limit&quot;
664 # description: &quot;Determines if a summary is less than 100 chars&quot;
665 # expression: &quot;document.summary.size() &lt; 100&quot;
666 #
667 # Example (Equality):
668 #
669 # title: &quot;Requestor is owner&quot;
670 # description: &quot;Determines if requestor is the document owner&quot;
671 # expression: &quot;document.owner == request.auth.claims.email&quot;
672 #
673 # Example (Logic):
674 #
675 # title: &quot;Public documents&quot;
676 # description: &quot;Determine whether the document should be publicly visible&quot;
677 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
678 #
679 # Example (Data Manipulation):
680 #
681 # title: &quot;Notification string&quot;
682 # description: &quot;Create a notification string with a timestamp.&quot;
683 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
684 #
685 # The exact variables and functions that may be referenced within an expression
686 # are determined by the service that evaluates it. See the service
687 # documentation for additional information.
688 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
689 # describes the expression, e.g. when hovered over it in a UI.
690 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
691 # syntax.
692 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
693 # its purpose. This can be used e.g. in UIs which allow to enter the
694 # expression.
695 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
696 # reporting, e.g. a file name and a position in the file.
697 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700698 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700699 # `members` can have the following values:
700 #
701 # * `allUsers`: A special identifier that represents anyone who is
702 # on the internet; with or without a Google account.
703 #
704 # * `allAuthenticatedUsers`: A special identifier that represents anyone
705 # who is authenticated with a Google account or a service account.
706 #
707 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700708 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700709 #
710 #
711 # * `serviceAccount:{emailid}`: An email address that represents a service
712 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
713 #
714 # * `group:{emailid}`: An email address that represents a Google group.
715 # For example, `admins@example.com`.
716 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700717 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
718 # identifier) representing a user that has been recently deleted. For
719 # example, `alice@example.com?uid=123456789012345678901`. If the user is
720 # recovered, this value reverts to `user:{emailid}` and the recovered user
721 # retains the role in the binding.
722 #
723 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
724 # unique identifier) representing a service account that has been recently
725 # deleted. For example,
726 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
727 # If the service account is undeleted, this value reverts to
728 # `serviceAccount:{emailid}` and the undeleted service account retains the
729 # role in the binding.
730 #
731 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
732 # identifier) representing a Google group that has been recently
733 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
734 # the group is recovered, this value reverts to `group:{emailid}` and the
735 # recovered group retains the role in the binding.
736 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700737 #
738 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
739 # users of that domain. For example, `google.com` or `example.com`.
740 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700741 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700742 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700743 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
744 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700745 },
746 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700747 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
748 # prevent simultaneous updates of a policy from overwriting each other.
749 # It is strongly suggested that systems make use of the `etag` in the
750 # read-modify-write cycle to perform policy updates in order to avoid race
751 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
752 # systems are expected to put that etag in the request to `setIamPolicy` to
753 # ensure that their change will be applied to the same version of the policy.
754 #
755 # **Important:** If you use IAM Conditions, you must include the `etag` field
756 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
757 # you to overwrite a version `3` policy with a version `1` policy, and all of
758 # the conditions in the version `3` policy are lost.
759 &quot;version&quot;: 42, # Specifies the format of the policy.
760 #
761 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
762 # are rejected.
763 #
764 # Any operation that affects conditional role bindings must specify version
765 # `3`. This requirement applies to the following operations:
766 #
767 # * Getting a policy that includes a conditional role binding
768 # * Adding a conditional role binding to a policy
769 # * Changing a conditional role binding in a policy
770 # * Removing any role binding, with or without a condition, from a policy
771 # that includes conditions
772 #
773 # **Important:** If you use IAM Conditions, you must include the `etag` field
774 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
775 # you to overwrite a version `3` policy with a version `1` policy, and all of
776 # the conditions in the version `3` policy are lost.
777 #
778 # If a policy does not include any conditions, operations on that policy may
779 # specify any valid version or leave the field unset.
780 #
781 # To learn which resources support conditions in their IAM policies, see the
782 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700783 }</pre>
784</div>
785
786<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700787 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700788 <pre>Returns permissions that a caller has on the specified resource.
789If the resource does not exist, this will return an empty set of
790permissions, not a NOT_FOUND error.
791
792Args:
793 resource: string, REQUIRED: The resource for which the policy detail is being requested.
794See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700795 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700796 The object takes the form of:
797
798{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700799 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
800 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700801 # information see
802 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -0700803 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700804 ],
805 }
806
807 x__xgafv: string, V1 error format.
808 Allowed values
809 1 - v1 error format
810 2 - v2 error format
811
812Returns:
813 An object of the form:
814
815 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700816 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700817 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -0700818 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700819 ],
820 }</pre>
821</div>
822
823</body></html>