blob: af1f110dcaf8cd5123211146c628606d71a85709 [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="iap_v1.html">Cloud Identity-Aware Proxy API</a> . <a href="iap_v1.v1.html">v1</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Gets the access control policy for an Identity-Aware Proxy protected</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#getIapSettings">getIapSettings(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Gets the IAP settings on a particular IAP protected resource.</p>
83<p class="toc_element">
84 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Sets the access control policy for an Identity-Aware Proxy protected</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns permissions that a caller has on the Identity-Aware Proxy protected</p>
Dan O'Mearadd494642020-05-01 07:42:23 -070089<p class="toc_element">
90 <code><a href="#updateIapSettings">updateIapSettings(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Updates the IAP settings on a particular IAP protected resource. It</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
95 <pre>Gets the access control policy for an Identity-Aware Proxy protected
96resource.
97More information about managing access via IAP can be found at:
98https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
99
100Args:
101 resource: string, REQUIRED: The resource for which the policy is being requested.
102See the operation documentation for the appropriate value for this field. (required)
103 body: object, The request body.
104 The object takes the form of:
105
106{ # Request message for `GetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700107 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
108 # `GetIamPolicy`.
109 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
112 # rejected.
113 #
114 # Requests for policies with any conditional bindings must specify version 3.
115 # Policies without any conditional bindings may specify any valid value or
116 # leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700117 #
118 # To learn which resources support conditions in their IAM policies, see the
119 # [IAM
120 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121 },
122 }
123
124 x__xgafv: string, V1 error format.
125 Allowed values
126 1 - v1 error format
127 2 - v2 error format
128
129Returns:
130 An object of the form:
131
Dan O'Mearadd494642020-05-01 07:42:23 -0700132 { # An Identity and Access Management (IAM) policy, which specifies access
133 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700134 #
135 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700136 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
137 # `members` to a single `role`. Members can be user accounts, service accounts,
138 # Google groups, and domains (such as G Suite). A `role` is a named list of
139 # permissions; each `role` can be an IAM predefined role or a user-created
140 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700141 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700142 # For some types of Google Cloud resources, a `binding` can also specify a
143 # `condition`, which is a logical expression that allows access to a resource
144 # only if the expression evaluates to `true`. A condition can add constraints
145 # based on attributes of the request, the resource, or both. To learn which
146 # resources support conditions in their IAM policies, see the
147 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700148 #
149 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700150 #
151 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700152 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700154 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
155 # &quot;members&quot;: [
156 # &quot;user:mike@example.com&quot;,
157 # &quot;group:admins@example.com&quot;,
158 # &quot;domain:google.com&quot;,
159 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700160 # ]
161 # },
162 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700163 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
164 # &quot;members&quot;: [
165 # &quot;user:eve@example.com&quot;
166 # ],
167 # &quot;condition&quot;: {
168 # &quot;title&quot;: &quot;expirable access&quot;,
169 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
170 # &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 -0700171 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700172 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700173 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700174 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
175 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700176 # }
177 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700178 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700179 #
180 # bindings:
181 # - members:
182 # - user:mike@example.com
183 # - group:admins@example.com
184 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700185 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
186 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700188 # - user:eve@example.com
189 # role: roles/resourcemanager.organizationViewer
190 # condition:
191 # title: expirable access
192 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700193 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700194 # - etag: BwWWja0YfJA=
195 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700196 #
197 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700198 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700199 &quot;version&quot;: 42, # Specifies the format of the policy.
200 #
201 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
202 # are rejected.
203 #
204 # Any operation that affects conditional role bindings must specify version
205 # `3`. This requirement applies to the following operations:
206 #
207 # * Getting a policy that includes a conditional role binding
208 # * Adding a conditional role binding to a policy
209 # * Changing a conditional role binding in a policy
210 # * Removing any role binding, with or without a condition, from a policy
211 # that includes conditions
212 #
213 # **Important:** If you use IAM Conditions, you must include the `etag` field
214 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
215 # you to overwrite a version `3` policy with a version `1` policy, and all of
216 # the conditions in the version `3` policy are lost.
217 #
218 # If a policy does not include any conditions, operations on that policy may
219 # specify any valid version or leave the field unset.
220 #
221 # To learn which resources support conditions in their IAM policies, see the
222 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
223 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700224 # `condition` that determines how and when the `bindings` are applied. Each
225 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700226 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700227 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
228 #
229 # If the condition evaluates to `true`, then this binding applies to the
230 # current request.
231 #
232 # If the condition evaluates to `false`, then this binding does not apply to
233 # the current request. However, a different role binding might grant the same
234 # role to one or more of the members in this binding.
235 #
236 # To learn which resources support conditions in their IAM policies, see the
237 # [IAM
238 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
239 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
240 # are documented at https://github.com/google/cel-spec.
241 #
242 # Example (Comparison):
243 #
244 # title: &quot;Summary size limit&quot;
245 # description: &quot;Determines if a summary is less than 100 chars&quot;
246 # expression: &quot;document.summary.size() &lt; 100&quot;
247 #
248 # Example (Equality):
249 #
250 # title: &quot;Requestor is owner&quot;
251 # description: &quot;Determines if requestor is the document owner&quot;
252 # expression: &quot;document.owner == request.auth.claims.email&quot;
253 #
254 # Example (Logic):
255 #
256 # title: &quot;Public documents&quot;
257 # description: &quot;Determine whether the document should be publicly visible&quot;
258 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
259 #
260 # Example (Data Manipulation):
261 #
262 # title: &quot;Notification string&quot;
263 # description: &quot;Create a notification string with a timestamp.&quot;
264 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
265 #
266 # The exact variables and functions that may be referenced within an expression
267 # are determined by the service that evaluates it. See the service
268 # documentation for additional information.
269 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
270 # describes the expression, e.g. when hovered over it in a UI.
271 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
272 # reporting, e.g. a file name and a position in the file.
273 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
274 # syntax.
275 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
276 # its purpose. This can be used e.g. in UIs which allow to enter the
277 # expression.
278 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700279 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 # `members` can have the following values:
281 #
282 # * `allUsers`: A special identifier that represents anyone who is
283 # on the internet; with or without a Google account.
284 #
285 # * `allAuthenticatedUsers`: A special identifier that represents anyone
286 # who is authenticated with a Google account or a service account.
287 #
288 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700289 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700290 #
291 #
292 # * `serviceAccount:{emailid}`: An email address that represents a service
293 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
294 #
295 # * `group:{emailid}`: An email address that represents a Google group.
296 # For example, `admins@example.com`.
297 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700298 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
299 # identifier) representing a user that has been recently deleted. For
300 # example, `alice@example.com?uid=123456789012345678901`. If the user is
301 # recovered, this value reverts to `user:{emailid}` and the recovered user
302 # retains the role in the binding.
303 #
304 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
305 # unique identifier) representing a service account that has been recently
306 # deleted. For example,
307 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
308 # If the service account is undeleted, this value reverts to
309 # `serviceAccount:{emailid}` and the undeleted service account retains the
310 # role in the binding.
311 #
312 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
313 # identifier) representing a Google group that has been recently
314 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
315 # the group is recovered, this value reverts to `group:{emailid}` and the
316 # recovered group retains the role in the binding.
317 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700318 #
319 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
320 # users of that domain. For example, `google.com` or `example.com`.
321 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700322 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700323 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700324 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
325 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700326 },
327 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700328 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
329 # prevent simultaneous updates of a policy from overwriting each other.
330 # It is strongly suggested that systems make use of the `etag` in the
331 # read-modify-write cycle to perform policy updates in order to avoid race
332 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
333 # systems are expected to put that etag in the request to `setIamPolicy` to
334 # ensure that their change will be applied to the same version of the policy.
335 #
336 # **Important:** If you use IAM Conditions, you must include the `etag` field
337 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
338 # you to overwrite a version `3` policy with a version `1` policy, and all of
339 # the conditions in the version `3` policy are lost.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700340 }</pre>
341</div>
342
343<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700344 <code class="details" id="getIapSettings">getIapSettings(name, x__xgafv=None)</code>
345 <pre>Gets the IAP settings on a particular IAP protected resource.
346
347Args:
348 name: string, Required. The resource name for which to retrieve the settings.
349Authorization: Requires the `getSettings` permission for the associated
350resource. (required)
351 x__xgafv: string, V1 error format.
352 Allowed values
353 1 - v1 error format
354 2 - v2 error format
355
356Returns:
357 An object of the form:
358
359 { # The IAP configurable settings.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700360 &quot;name&quot;: &quot;A String&quot;, # Required. The resource name of the IAP protected resource.
361 &quot;applicationSettings&quot;: { # Wrapper over application specific settings for IAP. # Top level wrapper for all application related settings in IAP
362 &quot;accessDeniedPageSettings&quot;: { # Custom content configuration for access denied page. # Customization for Access Denied page.
363 # IAP allows customers to define a custom URI to use as the error page when
364 # access is denied to users. If IAP prevents access to this page, the default
365 # IAP error page will be displayed instead.
366 &quot;accessDeniedPageUri&quot;: &quot;A String&quot;, # The URI to be redirected to when access is denied.
367 },
368 &quot;csmSettings&quot;: { # Configuration for RCTokens generated for CSM workloads protected by IAP. # Settings to configure IAP&#x27;s behavior for a CSM mesh.
369 # RCTokens are IAP generated JWTs that can be verified at the application. The
370 # RCToken is primarily used for ISTIO deployments, and can be scoped to a
371 # single mesh by configuring the audience field accordingly
372 &quot;rctokenAud&quot;: &quot;A String&quot;, # Audience claim set in the generated RCToken. This value is not validated by
373 # IAP.
374 },
375 &quot;cookieDomain&quot;: &quot;A String&quot;, # The Domain value to set for cookies generated by IAP. This value is not
376 # validated by the API, but will be ignored at runtime if invalid.
377 },
378 &quot;accessSettings&quot;: { # Access related settings for IAP protected apps. # Top level wrapper for all access related setting in IAP
379 &quot;policyDelegationSettings&quot;: { # PolicyDelegationConfig allows google-internal teams to use IAP for apps # Settings to configure Policy delegation for apps hosted in tenant projects.
380 # INTERNAL_ONLY.
381 # hosted in a tenant project. Using these settings, the app can delegate
382 # permission check to happen against the linked customer project.
383 # This is only ever supposed to be used by google internal teams, hence the
384 # restriction on the proto.
385 &quot;iamServiceName&quot;: &quot;A String&quot;, # The DNS name of the service (e.g. &quot;resourcemanager.googleapis.com&quot;).
386 # This should be the domain name part of the full resource names (see
387 # https://aip.dev/122#full-resource-names), which is usually
388 # the same as IamServiceSpec.service of the service where the resource type
389 # is defined.
390 &quot;policyName&quot;: { # Policy name to be checked
391 &quot;id&quot;: &quot;A String&quot;,
392 &quot;region&quot;: &quot;A String&quot;, # For Cloud IAM:
393 # The location of the Policy.
394 # Must be empty or &quot;global&quot; for Policies owned by global IAM. Must name a
395 # region from prodspec/cloud-iam-cloudspec for Regional IAM Policies, see
396 # go/iam-faq#where-is-iam-currently-deployed.
397 #
398 # For Local IAM:
399 # This field should be set to &quot;local&quot;.
400 &quot;type&quot;: &quot;A String&quot;, # Valid values for type might be &#x27;gce&#x27;, &#x27;gcs&#x27;, &#x27;project&#x27;, &#x27;account&#x27; etc.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700401 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700402 &quot;iamPermission&quot;: &quot;A String&quot;, # Permission to check in IAM.
403 &quot;resource&quot;: { # IAM resource to check permission on
404 &quot;type&quot;: &quot;A String&quot;, # The public resource type name of the resource on which conditions will be
405 # evaluated. It is configured using the official_name of the ResourceType as
406 # defined in service configurations under //configs/cloud/resourcetypes.
407 # For example, the official_name for GCP projects is set as
408 # &#x27;cloudresourcemanager.googleapis.com/Project&#x27; according to
409 # //configs/cloud/resourcetypes/google/cloud/resourcemanager/prod.yaml
410 # For details see go/iam-conditions-integration-guide.
411 &quot;service&quot;: &quot;A String&quot;, # The name of the service this resource belongs to. It is configured using
412 # the official_service_name of the Service as defined in service
413 # configurations under //configs/cloud/resourcetypes.
414 # For example, the official_service_name of cloud resource manager service
415 # is set as &#x27;cloudresourcemanager.googleapis.com&#x27; according to
416 # //configs/cloud/resourcetypes/google/cloud/resourcemanager/prod.yaml
417 &quot;name&quot;: &quot;A String&quot;, # Name of the resource on which conditions will be evaluated.
418 # Must use the Relative Resource Name of the resource, which is the URI
419 # path of the resource without the leading &quot;/&quot;. Examples are
420 # &quot;projects/_/buckets/[BUCKET-ID]&quot; for storage buckets or
421 # &quot;projects/[PROJECT-ID]/global/firewalls/[FIREWALL-ID]&quot; for a firewall.
422 #
423 # This field is required for evaluating conditions with rules on resource
424 # names. For a `list` permission check, the resource.name value must be set
425 # to the parent resource. If the parent resource is a project, this field
426 # should be left unset.
427 &quot;labels&quot;: { # The service defined labels of the resource on which the conditions will be
428 # evaluated. The semantics - including the key names - are vague to IAM.
429 # If the effective condition has a reference to a `resource.labels[foo]`
430 # construct, IAM consults with this map to retrieve the values associated
431 # with `foo` key for Conditions evaluation. If the provided key is not found
432 # in the labels map, the condition would evaluate to false.
433 #
434 # This field is in limited use. If your intended use case is not expected
435 # to express resource.labels attribute in IAM Conditions, leave this field
436 # empty. Before planning on using this attribute please:
437 # * Read go/iam-conditions-labels-comm and ensure your service can meet the
438 # data availability and management requirements.
439 # * Talk to iam-conditions-eng@ about your use case.
440 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700441 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700442 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700443 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700444 &quot;gcipSettings&quot;: { # Allows customers to configure tenant_id for GCIP instance per-app. # GCIP claims and endpoint configurations for 3p identity providers.
445 &quot;loginPageUri&quot;: &quot;A String&quot;, # Login page URI associated with the GCIP tenants.
446 # Typically, all resources within the same project share the same login page,
447 # though it could be overridden at the sub resource level.
448 &quot;tenantIds&quot;: [ # GCIP tenant ids that are linked to the IAP resource.
449 # tenant_ids could be a string beginning with a number character to indicate
450 # authenticating with GCIP tenant flow, or in the format of _&lt;ProjectNumber&gt;
451 # to indicate authenticating with GCIP agent flow.
452 # If agent flow is used, tenant_ids should only contain one single element,
453 # while for tenant flow, tenant_ids can contain multiple elements.
454 &quot;A String&quot;,
455 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700456 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700457 &quot;corsSettings&quot;: { # Allows customers to configure HTTP request paths that&#x27;ll allow HTTP OPTIONS # Configuration to allow cross-origin requests via IAP.
458 # call to bypass authentication and authorization.
459 &quot;allowHttpOptions&quot;: True or False, # Configuration to allow HTTP OPTIONS calls to skip authorization. If
460 # undefined, IAP will not apply any special logic to OPTIONS requests.
461 },
462 &quot;oauthSettings&quot;: { # Configuration for OAuth login&amp;consent flow behavior as well as for OAuth # Settings to configure IAP&#x27;s OAuth behavior.
463 # Credentials.
464 &quot;clientId&quot;: &quot;A String&quot;, # OAuth 2.0 client ID used in the OAuth flow to generate an access token. If
465 # this field is set, you can skip obtaining the OAuth credentials in this
466 # step:
467 # https://developers.google.com/identity/protocols/OAuth2?hl=en_US#1.-obtain-oauth-2.0-credentials-from-the-google-api-console.
468 # However, this could allow for client sharing. The risks of client sharing
469 # are outlined here:
470 # https://cloud.google.com/iap/docs/sharing-oauth-clients#risks.
471 &quot;loginHint&quot;: &quot;A String&quot;, # Domain hint to send as hd=? parameter in OAuth request flow. Enables
472 # redirect to primary IDP by skipping Google&#x27;s login screen.
473 # https://developers.google.com/identity/protocols/OpenIDConnect#hd-param
474 # Note: IAP does not verify that the id token&#x27;s hd claim matches this value
475 # since access behavior is managed by IAM policies.
476 },
477 },
478 }</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700479</div>
480
481<div class="method">
482 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
483 <pre>Sets the access control policy for an Identity-Aware Proxy protected
484resource. Replaces any existing policy.
485More information about managing access via IAP can be found at:
486https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
487
488Args:
489 resource: string, REQUIRED: The resource for which the policy is being specified.
490See the operation documentation for the appropriate value for this field. (required)
491 body: object, The request body.
492 The object takes the form of:
493
494{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700495 &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
Dan O'Mearadd494642020-05-01 07:42:23 -0700496 # the policy is limited to a few 10s of KB. An empty policy is a
497 # valid policy but certain Cloud Platform services (such as Projects)
498 # might reject them.
499 # controls for Google Cloud resources.
500 #
501 #
502 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
503 # `members` to a single `role`. Members can be user accounts, service accounts,
504 # Google groups, and domains (such as G Suite). A `role` is a named list of
505 # permissions; each `role` can be an IAM predefined role or a user-created
506 # custom role.
507 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700508 # For some types of Google Cloud resources, a `binding` can also specify a
509 # `condition`, which is a logical expression that allows access to a resource
510 # only if the expression evaluates to `true`. A condition can add constraints
511 # based on attributes of the request, the resource, or both. To learn which
512 # resources support conditions in their IAM policies, see the
513 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700514 #
515 # **JSON example:**
516 #
517 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700518 # &quot;bindings&quot;: [
Dan O'Mearadd494642020-05-01 07:42:23 -0700519 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700520 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
521 # &quot;members&quot;: [
522 # &quot;user:mike@example.com&quot;,
523 # &quot;group:admins@example.com&quot;,
524 # &quot;domain:google.com&quot;,
525 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700526 # ]
527 # },
528 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700529 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
530 # &quot;members&quot;: [
531 # &quot;user:eve@example.com&quot;
532 # ],
533 # &quot;condition&quot;: {
534 # &quot;title&quot;: &quot;expirable access&quot;,
535 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
536 # &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 -0700537 # }
538 # }
539 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700540 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
541 # &quot;version&quot;: 3
Dan O'Mearadd494642020-05-01 07:42:23 -0700542 # }
543 #
544 # **YAML example:**
545 #
546 # bindings:
547 # - members:
548 # - user:mike@example.com
549 # - group:admins@example.com
550 # - domain:google.com
551 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
552 # role: roles/resourcemanager.organizationAdmin
553 # - members:
554 # - user:eve@example.com
555 # role: roles/resourcemanager.organizationViewer
556 # condition:
557 # title: expirable access
558 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700559 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700560 # - etag: BwWWja0YfJA=
561 # - version: 3
562 #
563 # For a description of IAM and its features, see the
564 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700565 &quot;version&quot;: 42, # Specifies the format of the policy.
566 #
567 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
568 # are rejected.
569 #
570 # Any operation that affects conditional role bindings must specify version
571 # `3`. This requirement applies to the following operations:
572 #
573 # * Getting a policy that includes a conditional role binding
574 # * Adding a conditional role binding to a policy
575 # * Changing a conditional role binding in a policy
576 # * Removing any role binding, with or without a condition, from a policy
577 # that includes conditions
578 #
579 # **Important:** If you use IAM Conditions, you must include the `etag` field
580 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
581 # you to overwrite a version `3` policy with a version `1` policy, and all of
582 # the conditions in the version `3` policy are lost.
583 #
584 # If a policy does not include any conditions, operations on that policy may
585 # specify any valid version or leave the field unset.
586 #
587 # To learn which resources support conditions in their IAM policies, see the
588 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
589 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700590 # `condition` that determines how and when the `bindings` are applied. Each
591 # of the `bindings` must contain at least one member.
592 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700593 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
594 #
595 # If the condition evaluates to `true`, then this binding applies to the
596 # current request.
597 #
598 # If the condition evaluates to `false`, then this binding does not apply to
599 # the current request. However, a different role binding might grant the same
600 # role to one or more of the members in this binding.
601 #
602 # To learn which resources support conditions in their IAM policies, see the
603 # [IAM
604 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
605 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
606 # are documented at https://github.com/google/cel-spec.
607 #
608 # Example (Comparison):
609 #
610 # title: &quot;Summary size limit&quot;
611 # description: &quot;Determines if a summary is less than 100 chars&quot;
612 # expression: &quot;document.summary.size() &lt; 100&quot;
613 #
614 # Example (Equality):
615 #
616 # title: &quot;Requestor is owner&quot;
617 # description: &quot;Determines if requestor is the document owner&quot;
618 # expression: &quot;document.owner == request.auth.claims.email&quot;
619 #
620 # Example (Logic):
621 #
622 # title: &quot;Public documents&quot;
623 # description: &quot;Determine whether the document should be publicly visible&quot;
624 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
625 #
626 # Example (Data Manipulation):
627 #
628 # title: &quot;Notification string&quot;
629 # description: &quot;Create a notification string with a timestamp.&quot;
630 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
631 #
632 # The exact variables and functions that may be referenced within an expression
633 # are determined by the service that evaluates it. See the service
634 # documentation for additional information.
635 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
636 # describes the expression, e.g. when hovered over it in a UI.
637 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
638 # reporting, e.g. a file name and a position in the file.
639 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
640 # syntax.
641 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
642 # its purpose. This can be used e.g. in UIs which allow to enter the
643 # expression.
644 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700645 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700646 # `members` can have the following values:
647 #
648 # * `allUsers`: A special identifier that represents anyone who is
649 # on the internet; with or without a Google account.
650 #
651 # * `allAuthenticatedUsers`: A special identifier that represents anyone
652 # who is authenticated with a Google account or a service account.
653 #
654 # * `user:{emailid}`: An email address that represents a specific Google
655 # account. For example, `alice@example.com` .
656 #
657 #
658 # * `serviceAccount:{emailid}`: An email address that represents a service
659 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
660 #
661 # * `group:{emailid}`: An email address that represents a Google group.
662 # For example, `admins@example.com`.
663 #
664 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
665 # identifier) representing a user that has been recently deleted. For
666 # example, `alice@example.com?uid=123456789012345678901`. If the user is
667 # recovered, this value reverts to `user:{emailid}` and the recovered user
668 # retains the role in the binding.
669 #
670 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
671 # unique identifier) representing a service account that has been recently
672 # deleted. For example,
673 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
674 # If the service account is undeleted, this value reverts to
675 # `serviceAccount:{emailid}` and the undeleted service account retains the
676 # role in the binding.
677 #
678 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
679 # identifier) representing a Google group that has been recently
680 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
681 # the group is recovered, this value reverts to `group:{emailid}` and the
682 # recovered group retains the role in the binding.
683 #
684 #
685 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
686 # users of that domain. For example, `google.com` or `example.com`.
687 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700688 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700689 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700690 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
691 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700692 },
693 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700694 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
695 # prevent simultaneous updates of a policy from overwriting each other.
696 # It is strongly suggested that systems make use of the `etag` in the
697 # read-modify-write cycle to perform policy updates in order to avoid race
698 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
699 # systems are expected to put that etag in the request to `setIamPolicy` to
700 # ensure that their change will be applied to the same version of the policy.
701 #
702 # **Important:** If you use IAM Conditions, you must include the `etag` field
703 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
704 # you to overwrite a version `3` policy with a version `1` policy, and all of
705 # the conditions in the version `3` policy are lost.
Dan O'Mearadd494642020-05-01 07:42:23 -0700706 },
707 }
708
709 x__xgafv: string, V1 error format.
710 Allowed values
711 1 - v1 error format
712 2 - v2 error format
713
714Returns:
715 An object of the form:
716
717 { # An Identity and Access Management (IAM) policy, which specifies access
718 # controls for Google Cloud resources.
719 #
720 #
721 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
722 # `members` to a single `role`. Members can be user accounts, service accounts,
723 # Google groups, and domains (such as G Suite). A `role` is a named list of
724 # permissions; each `role` can be an IAM predefined role or a user-created
725 # custom role.
726 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700727 # For some types of Google Cloud resources, a `binding` can also specify a
728 # `condition`, which is a logical expression that allows access to a resource
729 # only if the expression evaluates to `true`. A condition can add constraints
730 # based on attributes of the request, the resource, or both. To learn which
731 # resources support conditions in their IAM policies, see the
732 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700733 #
734 # **JSON example:**
735 #
736 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700737 # &quot;bindings&quot;: [
Dan O'Mearadd494642020-05-01 07:42:23 -0700738 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700739 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
740 # &quot;members&quot;: [
741 # &quot;user:mike@example.com&quot;,
742 # &quot;group:admins@example.com&quot;,
743 # &quot;domain:google.com&quot;,
744 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700745 # ]
746 # },
747 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700748 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
749 # &quot;members&quot;: [
750 # &quot;user:eve@example.com&quot;
751 # ],
752 # &quot;condition&quot;: {
753 # &quot;title&quot;: &quot;expirable access&quot;,
754 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
755 # &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 -0700756 # }
757 # }
758 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700759 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
760 # &quot;version&quot;: 3
Dan O'Mearadd494642020-05-01 07:42:23 -0700761 # }
762 #
763 # **YAML example:**
764 #
765 # bindings:
766 # - members:
767 # - user:mike@example.com
768 # - group:admins@example.com
769 # - domain:google.com
770 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
771 # role: roles/resourcemanager.organizationAdmin
772 # - members:
773 # - user:eve@example.com
774 # role: roles/resourcemanager.organizationViewer
775 # condition:
776 # title: expirable access
777 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700778 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700779 # - etag: BwWWja0YfJA=
780 # - version: 3
781 #
782 # For a description of IAM and its features, see the
783 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700784 &quot;version&quot;: 42, # Specifies the format of the policy.
785 #
786 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
787 # are rejected.
788 #
789 # Any operation that affects conditional role bindings must specify version
790 # `3`. This requirement applies to the following operations:
791 #
792 # * Getting a policy that includes a conditional role binding
793 # * Adding a conditional role binding to a policy
794 # * Changing a conditional role binding in a policy
795 # * Removing any role binding, with or without a condition, from a policy
796 # that includes conditions
797 #
798 # **Important:** If you use IAM Conditions, you must include the `etag` field
799 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
800 # you to overwrite a version `3` policy with a version `1` policy, and all of
801 # the conditions in the version `3` policy are lost.
802 #
803 # If a policy does not include any conditions, operations on that policy may
804 # specify any valid version or leave the field unset.
805 #
806 # To learn which resources support conditions in their IAM policies, see the
807 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
808 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700809 # `condition` that determines how and when the `bindings` are applied. Each
810 # of the `bindings` must contain at least one member.
811 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700812 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
813 #
814 # If the condition evaluates to `true`, then this binding applies to the
815 # current request.
816 #
817 # If the condition evaluates to `false`, then this binding does not apply to
818 # the current request. However, a different role binding might grant the same
819 # role to one or more of the members in this binding.
820 #
821 # To learn which resources support conditions in their IAM policies, see the
822 # [IAM
823 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
824 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
825 # are documented at https://github.com/google/cel-spec.
826 #
827 # Example (Comparison):
828 #
829 # title: &quot;Summary size limit&quot;
830 # description: &quot;Determines if a summary is less than 100 chars&quot;
831 # expression: &quot;document.summary.size() &lt; 100&quot;
832 #
833 # Example (Equality):
834 #
835 # title: &quot;Requestor is owner&quot;
836 # description: &quot;Determines if requestor is the document owner&quot;
837 # expression: &quot;document.owner == request.auth.claims.email&quot;
838 #
839 # Example (Logic):
840 #
841 # title: &quot;Public documents&quot;
842 # description: &quot;Determine whether the document should be publicly visible&quot;
843 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
844 #
845 # Example (Data Manipulation):
846 #
847 # title: &quot;Notification string&quot;
848 # description: &quot;Create a notification string with a timestamp.&quot;
849 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
850 #
851 # The exact variables and functions that may be referenced within an expression
852 # are determined by the service that evaluates it. See the service
853 # documentation for additional information.
854 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
855 # describes the expression, e.g. when hovered over it in a UI.
856 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
857 # reporting, e.g. a file name and a position in the file.
858 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
859 # syntax.
860 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
861 # its purpose. This can be used e.g. in UIs which allow to enter the
862 # expression.
863 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700864 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700865 # `members` can have the following values:
866 #
867 # * `allUsers`: A special identifier that represents anyone who is
868 # on the internet; with or without a Google account.
869 #
870 # * `allAuthenticatedUsers`: A special identifier that represents anyone
871 # who is authenticated with a Google account or a service account.
872 #
873 # * `user:{emailid}`: An email address that represents a specific Google
874 # account. For example, `alice@example.com` .
875 #
876 #
877 # * `serviceAccount:{emailid}`: An email address that represents a service
878 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
879 #
880 # * `group:{emailid}`: An email address that represents a Google group.
881 # For example, `admins@example.com`.
882 #
883 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
884 # identifier) representing a user that has been recently deleted. For
885 # example, `alice@example.com?uid=123456789012345678901`. If the user is
886 # recovered, this value reverts to `user:{emailid}` and the recovered user
887 # retains the role in the binding.
888 #
889 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
890 # unique identifier) representing a service account that has been recently
891 # deleted. For example,
892 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
893 # If the service account is undeleted, this value reverts to
894 # `serviceAccount:{emailid}` and the undeleted service account retains the
895 # role in the binding.
896 #
897 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
898 # identifier) representing a Google group that has been recently
899 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
900 # the group is recovered, this value reverts to `group:{emailid}` and the
901 # recovered group retains the role in the binding.
902 #
903 #
904 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
905 # users of that domain. For example, `google.com` or `example.com`.
906 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700907 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700908 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700909 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
910 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700911 },
912 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700913 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
914 # prevent simultaneous updates of a policy from overwriting each other.
915 # It is strongly suggested that systems make use of the `etag` in the
916 # read-modify-write cycle to perform policy updates in order to avoid race
917 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
918 # systems are expected to put that etag in the request to `setIamPolicy` to
919 # ensure that their change will be applied to the same version of the policy.
920 #
921 # **Important:** If you use IAM Conditions, you must include the `etag` field
922 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
923 # you to overwrite a version `3` policy with a version `1` policy, and all of
924 # the conditions in the version `3` policy are lost.
Dan O'Mearadd494642020-05-01 07:42:23 -0700925 }</pre>
926</div>
927
928<div class="method">
929 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700930 <pre>Returns permissions that a caller has on the Identity-Aware Proxy protected
931resource.
932More information about managing access via IAP can be found at:
933https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
934
935Args:
936 resource: string, REQUIRED: The resource for which the policy detail is being requested.
937See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700938 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700939 The object takes the form of:
940
941{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700942 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
943 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700944 # information see
945 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -0700946 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700947 ],
948 }
949
950 x__xgafv: string, V1 error format.
951 Allowed values
952 1 - v1 error format
953 2 - v2 error format
954
955Returns:
956 An object of the form:
957
958 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700959 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700960 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -0700961 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700962 ],
963 }</pre>
964</div>
965
Dan O'Mearadd494642020-05-01 07:42:23 -0700966<div class="method">
967 <code class="details" id="updateIapSettings">updateIapSettings(name, body=None, updateMask=None, x__xgafv=None)</code>
968 <pre>Updates the IAP settings on a particular IAP protected resource. It
969replaces all fields unless the `update_mask` is set.
970
971Args:
972 name: string, Required. The resource name of the IAP protected resource. (required)
973 body: object, The request body.
974 The object takes the form of:
975
976{ # The IAP configurable settings.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700977 &quot;name&quot;: &quot;A String&quot;, # Required. The resource name of the IAP protected resource.
978 &quot;applicationSettings&quot;: { # Wrapper over application specific settings for IAP. # Top level wrapper for all application related settings in IAP
979 &quot;accessDeniedPageSettings&quot;: { # Custom content configuration for access denied page. # Customization for Access Denied page.
980 # IAP allows customers to define a custom URI to use as the error page when
981 # access is denied to users. If IAP prevents access to this page, the default
982 # IAP error page will be displayed instead.
983 &quot;accessDeniedPageUri&quot;: &quot;A String&quot;, # The URI to be redirected to when access is denied.
984 },
985 &quot;csmSettings&quot;: { # Configuration for RCTokens generated for CSM workloads protected by IAP. # Settings to configure IAP&#x27;s behavior for a CSM mesh.
986 # RCTokens are IAP generated JWTs that can be verified at the application. The
987 # RCToken is primarily used for ISTIO deployments, and can be scoped to a
988 # single mesh by configuring the audience field accordingly
989 &quot;rctokenAud&quot;: &quot;A String&quot;, # Audience claim set in the generated RCToken. This value is not validated by
990 # IAP.
991 },
992 &quot;cookieDomain&quot;: &quot;A String&quot;, # The Domain value to set for cookies generated by IAP. This value is not
993 # validated by the API, but will be ignored at runtime if invalid.
994 },
995 &quot;accessSettings&quot;: { # Access related settings for IAP protected apps. # Top level wrapper for all access related setting in IAP
996 &quot;policyDelegationSettings&quot;: { # PolicyDelegationConfig allows google-internal teams to use IAP for apps # Settings to configure Policy delegation for apps hosted in tenant projects.
997 # INTERNAL_ONLY.
998 # hosted in a tenant project. Using these settings, the app can delegate
999 # permission check to happen against the linked customer project.
1000 # This is only ever supposed to be used by google internal teams, hence the
1001 # restriction on the proto.
1002 &quot;iamServiceName&quot;: &quot;A String&quot;, # The DNS name of the service (e.g. &quot;resourcemanager.googleapis.com&quot;).
1003 # This should be the domain name part of the full resource names (see
1004 # https://aip.dev/122#full-resource-names), which is usually
1005 # the same as IamServiceSpec.service of the service where the resource type
1006 # is defined.
1007 &quot;policyName&quot;: { # Policy name to be checked
1008 &quot;id&quot;: &quot;A String&quot;,
1009 &quot;region&quot;: &quot;A String&quot;, # For Cloud IAM:
1010 # The location of the Policy.
1011 # Must be empty or &quot;global&quot; for Policies owned by global IAM. Must name a
1012 # region from prodspec/cloud-iam-cloudspec for Regional IAM Policies, see
1013 # go/iam-faq#where-is-iam-currently-deployed.
1014 #
1015 # For Local IAM:
1016 # This field should be set to &quot;local&quot;.
1017 &quot;type&quot;: &quot;A String&quot;, # Valid values for type might be &#x27;gce&#x27;, &#x27;gcs&#x27;, &#x27;project&#x27;, &#x27;account&#x27; etc.
1018 },
1019 &quot;iamPermission&quot;: &quot;A String&quot;, # Permission to check in IAM.
1020 &quot;resource&quot;: { # IAM resource to check permission on
1021 &quot;type&quot;: &quot;A String&quot;, # The public resource type name of the resource on which conditions will be
1022 # evaluated. It is configured using the official_name of the ResourceType as
1023 # defined in service configurations under //configs/cloud/resourcetypes.
1024 # For example, the official_name for GCP projects is set as
1025 # &#x27;cloudresourcemanager.googleapis.com/Project&#x27; according to
1026 # //configs/cloud/resourcetypes/google/cloud/resourcemanager/prod.yaml
1027 # For details see go/iam-conditions-integration-guide.
1028 &quot;service&quot;: &quot;A String&quot;, # The name of the service this resource belongs to. It is configured using
1029 # the official_service_name of the Service as defined in service
1030 # configurations under //configs/cloud/resourcetypes.
1031 # For example, the official_service_name of cloud resource manager service
1032 # is set as &#x27;cloudresourcemanager.googleapis.com&#x27; according to
1033 # //configs/cloud/resourcetypes/google/cloud/resourcemanager/prod.yaml
1034 &quot;name&quot;: &quot;A String&quot;, # Name of the resource on which conditions will be evaluated.
1035 # Must use the Relative Resource Name of the resource, which is the URI
1036 # path of the resource without the leading &quot;/&quot;. Examples are
1037 # &quot;projects/_/buckets/[BUCKET-ID]&quot; for storage buckets or
1038 # &quot;projects/[PROJECT-ID]/global/firewalls/[FIREWALL-ID]&quot; for a firewall.
1039 #
1040 # This field is required for evaluating conditions with rules on resource
1041 # names. For a `list` permission check, the resource.name value must be set
1042 # to the parent resource. If the parent resource is a project, this field
1043 # should be left unset.
1044 &quot;labels&quot;: { # The service defined labels of the resource on which the conditions will be
1045 # evaluated. The semantics - including the key names - are vague to IAM.
1046 # If the effective condition has a reference to a `resource.labels[foo]`
1047 # construct, IAM consults with this map to retrieve the values associated
1048 # with `foo` key for Conditions evaluation. If the provided key is not found
1049 # in the labels map, the condition would evaluate to false.
1050 #
1051 # This field is in limited use. If your intended use case is not expected
1052 # to express resource.labels attribute in IAM Conditions, leave this field
1053 # empty. Before planning on using this attribute please:
1054 # * Read go/iam-conditions-labels-comm and ensure your service can meet the
1055 # data availability and management requirements.
1056 # * Talk to iam-conditions-eng@ about your use case.
1057 &quot;a_key&quot;: &quot;A String&quot;,
1058 },
1059 },
1060 },
1061 &quot;gcipSettings&quot;: { # Allows customers to configure tenant_id for GCIP instance per-app. # GCIP claims and endpoint configurations for 3p identity providers.
1062 &quot;loginPageUri&quot;: &quot;A String&quot;, # Login page URI associated with the GCIP tenants.
1063 # Typically, all resources within the same project share the same login page,
1064 # though it could be overridden at the sub resource level.
1065 &quot;tenantIds&quot;: [ # GCIP tenant ids that are linked to the IAP resource.
1066 # tenant_ids could be a string beginning with a number character to indicate
1067 # authenticating with GCIP tenant flow, or in the format of _&lt;ProjectNumber&gt;
1068 # to indicate authenticating with GCIP agent flow.
1069 # If agent flow is used, tenant_ids should only contain one single element,
1070 # while for tenant flow, tenant_ids can contain multiple elements.
1071 &quot;A String&quot;,
1072 ],
1073 },
1074 &quot;corsSettings&quot;: { # Allows customers to configure HTTP request paths that&#x27;ll allow HTTP OPTIONS # Configuration to allow cross-origin requests via IAP.
1075 # call to bypass authentication and authorization.
1076 &quot;allowHttpOptions&quot;: True or False, # Configuration to allow HTTP OPTIONS calls to skip authorization. If
1077 # undefined, IAP will not apply any special logic to OPTIONS requests.
1078 },
1079 &quot;oauthSettings&quot;: { # Configuration for OAuth login&amp;consent flow behavior as well as for OAuth # Settings to configure IAP&#x27;s OAuth behavior.
1080 # Credentials.
1081 &quot;clientId&quot;: &quot;A String&quot;, # OAuth 2.0 client ID used in the OAuth flow to generate an access token. If
1082 # this field is set, you can skip obtaining the OAuth credentials in this
1083 # step:
1084 # https://developers.google.com/identity/protocols/OAuth2?hl=en_US#1.-obtain-oauth-2.0-credentials-from-the-google-api-console.
1085 # However, this could allow for client sharing. The risks of client sharing
1086 # are outlined here:
1087 # https://cloud.google.com/iap/docs/sharing-oauth-clients#risks.
1088 &quot;loginHint&quot;: &quot;A String&quot;, # Domain hint to send as hd=? parameter in OAuth request flow. Enables
1089 # redirect to primary IDP by skipping Google&#x27;s login screen.
1090 # https://developers.google.com/identity/protocols/OpenIDConnect#hd-param
1091 # Note: IAP does not verify that the id token&#x27;s hd claim matches this value
1092 # since access behavior is managed by IAM policies.
1093 },
1094 },
1095}
1096
1097 updateMask: string, The field mask specifying which IAP settings should be updated.
1098If omitted, the all of the settings are updated. See
1099https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
1100 x__xgafv: string, V1 error format.
1101 Allowed values
1102 1 - v1 error format
1103 2 - v2 error format
1104
1105Returns:
1106 An object of the form:
1107
1108 { # The IAP configurable settings.
1109 &quot;name&quot;: &quot;A String&quot;, # Required. The resource name of the IAP protected resource.
1110 &quot;applicationSettings&quot;: { # Wrapper over application specific settings for IAP. # Top level wrapper for all application related settings in IAP
1111 &quot;accessDeniedPageSettings&quot;: { # Custom content configuration for access denied page. # Customization for Access Denied page.
1112 # IAP allows customers to define a custom URI to use as the error page when
1113 # access is denied to users. If IAP prevents access to this page, the default
1114 # IAP error page will be displayed instead.
1115 &quot;accessDeniedPageUri&quot;: &quot;A String&quot;, # The URI to be redirected to when access is denied.
1116 },
1117 &quot;csmSettings&quot;: { # Configuration for RCTokens generated for CSM workloads protected by IAP. # Settings to configure IAP&#x27;s behavior for a CSM mesh.
1118 # RCTokens are IAP generated JWTs that can be verified at the application. The
1119 # RCToken is primarily used for ISTIO deployments, and can be scoped to a
1120 # single mesh by configuring the audience field accordingly
1121 &quot;rctokenAud&quot;: &quot;A String&quot;, # Audience claim set in the generated RCToken. This value is not validated by
1122 # IAP.
1123 },
1124 &quot;cookieDomain&quot;: &quot;A String&quot;, # The Domain value to set for cookies generated by IAP. This value is not
1125 # validated by the API, but will be ignored at runtime if invalid.
1126 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001127 &quot;accessSettings&quot;: { # Access related settings for IAP protected apps. # Top level wrapper for all access related setting in IAP
Bu Sun Kim65020912020-05-20 12:08:20 -07001128 &quot;policyDelegationSettings&quot;: { # PolicyDelegationConfig allows google-internal teams to use IAP for apps # Settings to configure Policy delegation for apps hosted in tenant projects.
1129 # INTERNAL_ONLY.
1130 # hosted in a tenant project. Using these settings, the app can delegate
1131 # permission check to happen against the linked customer project.
1132 # This is only ever supposed to be used by google internal teams, hence the
1133 # restriction on the proto.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001134 &quot;iamServiceName&quot;: &quot;A String&quot;, # The DNS name of the service (e.g. &quot;resourcemanager.googleapis.com&quot;).
1135 # This should be the domain name part of the full resource names (see
1136 # https://aip.dev/122#full-resource-names), which is usually
1137 # the same as IamServiceSpec.service of the service where the resource type
1138 # is defined.
Bu Sun Kim65020912020-05-20 12:08:20 -07001139 &quot;policyName&quot;: { # Policy name to be checked
Bu Sun Kim65020912020-05-20 12:08:20 -07001140 &quot;id&quot;: &quot;A String&quot;,
1141 &quot;region&quot;: &quot;A String&quot;, # For Cloud IAM:
1142 # The location of the Policy.
1143 # Must be empty or &quot;global&quot; for Policies owned by global IAM. Must name a
1144 # region from prodspec/cloud-iam-cloudspec for Regional IAM Policies, see
1145 # go/iam-faq#where-is-iam-currently-deployed.
1146 #
1147 # For Local IAM:
1148 # This field should be set to &quot;local&quot;.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001149 &quot;type&quot;: &quot;A String&quot;, # Valid values for type might be &#x27;gce&#x27;, &#x27;gcs&#x27;, &#x27;project&#x27;, &#x27;account&#x27; etc.
Dan O'Mearadd494642020-05-01 07:42:23 -07001150 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001151 &quot;iamPermission&quot;: &quot;A String&quot;, # Permission to check in IAM.
Bu Sun Kim65020912020-05-20 12:08:20 -07001152 &quot;resource&quot;: { # IAM resource to check permission on
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001153 &quot;type&quot;: &quot;A String&quot;, # The public resource type name of the resource on which conditions will be
1154 # evaluated. It is configured using the official_name of the ResourceType as
1155 # defined in service configurations under //configs/cloud/resourcetypes.
1156 # For example, the official_name for GCP projects is set as
1157 # &#x27;cloudresourcemanager.googleapis.com/Project&#x27; according to
1158 # //configs/cloud/resourcetypes/google/cloud/resourcemanager/prod.yaml
1159 # For details see go/iam-conditions-integration-guide.
Bu Sun Kim65020912020-05-20 12:08:20 -07001160 &quot;service&quot;: &quot;A String&quot;, # The name of the service this resource belongs to. It is configured using
1161 # the official_service_name of the Service as defined in service
1162 # configurations under //configs/cloud/resourcetypes.
1163 # For example, the official_service_name of cloud resource manager service
1164 # is set as &#x27;cloudresourcemanager.googleapis.com&#x27; according to
1165 # //configs/cloud/resourcetypes/google/cloud/resourcemanager/prod.yaml
1166 &quot;name&quot;: &quot;A String&quot;, # Name of the resource on which conditions will be evaluated.
1167 # Must use the Relative Resource Name of the resource, which is the URI
1168 # path of the resource without the leading &quot;/&quot;. Examples are
1169 # &quot;projects/_/buckets/[BUCKET-ID]&quot; for storage buckets or
1170 # &quot;projects/[PROJECT-ID]/global/firewalls/[FIREWALL-ID]&quot; for a firewall.
1171 #
1172 # This field is required for evaluating conditions with rules on resource
1173 # names. For a `list` permission check, the resource.name value must be set
1174 # to the parent resource. If the parent resource is a project, this field
1175 # should be left unset.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001176 &quot;labels&quot;: { # The service defined labels of the resource on which the conditions will be
1177 # evaluated. The semantics - including the key names - are vague to IAM.
1178 # If the effective condition has a reference to a `resource.labels[foo]`
1179 # construct, IAM consults with this map to retrieve the values associated
1180 # with `foo` key for Conditions evaluation. If the provided key is not found
1181 # in the labels map, the condition would evaluate to false.
1182 #
1183 # This field is in limited use. If your intended use case is not expected
1184 # to express resource.labels attribute in IAM Conditions, leave this field
1185 # empty. Before planning on using this attribute please:
1186 # * Read go/iam-conditions-labels-comm and ensure your service can meet the
1187 # data availability and management requirements.
1188 # * Talk to iam-conditions-eng@ about your use case.
1189 &quot;a_key&quot;: &quot;A String&quot;,
1190 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001191 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001192 },
1193 &quot;gcipSettings&quot;: { # Allows customers to configure tenant_id for GCIP instance per-app. # GCIP claims and endpoint configurations for 3p identity providers.
1194 &quot;loginPageUri&quot;: &quot;A String&quot;, # Login page URI associated with the GCIP tenants.
1195 # Typically, all resources within the same project share the same login page,
1196 # though it could be overridden at the sub resource level.
1197 &quot;tenantIds&quot;: [ # GCIP tenant ids that are linked to the IAP resource.
1198 # tenant_ids could be a string beginning with a number character to indicate
1199 # authenticating with GCIP tenant flow, or in the format of _&lt;ProjectNumber&gt;
1200 # to indicate authenticating with GCIP agent flow.
1201 # If agent flow is used, tenant_ids should only contain one single element,
1202 # while for tenant flow, tenant_ids can contain multiple elements.
1203 &quot;A String&quot;,
1204 ],
1205 },
1206 &quot;corsSettings&quot;: { # Allows customers to configure HTTP request paths that&#x27;ll allow HTTP OPTIONS # Configuration to allow cross-origin requests via IAP.
1207 # call to bypass authentication and authorization.
1208 &quot;allowHttpOptions&quot;: True or False, # Configuration to allow HTTP OPTIONS calls to skip authorization. If
1209 # undefined, IAP will not apply any special logic to OPTIONS requests.
1210 },
1211 &quot;oauthSettings&quot;: { # Configuration for OAuth login&amp;consent flow behavior as well as for OAuth # Settings to configure IAP&#x27;s OAuth behavior.
1212 # Credentials.
1213 &quot;clientId&quot;: &quot;A String&quot;, # OAuth 2.0 client ID used in the OAuth flow to generate an access token. If
1214 # this field is set, you can skip obtaining the OAuth credentials in this
1215 # step:
1216 # https://developers.google.com/identity/protocols/OAuth2?hl=en_US#1.-obtain-oauth-2.0-credentials-from-the-google-api-console.
1217 # However, this could allow for client sharing. The risks of client sharing
1218 # are outlined here:
1219 # https://cloud.google.com/iap/docs/sharing-oauth-clients#risks.
1220 &quot;loginHint&quot;: &quot;A String&quot;, # Domain hint to send as hd=? parameter in OAuth request flow. Enables
1221 # redirect to primary IDP by skipping Google&#x27;s login screen.
1222 # https://developers.google.com/identity/protocols/OpenIDConnect#hd-param
1223 # Note: IAP does not verify that the id token&#x27;s hd claim matches this value
1224 # since access behavior is managed by IAM policies.
Bu Sun Kim65020912020-05-20 12:08:20 -07001225 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001226 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001227 }</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07001228</div>
1229
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001230</body></html>