blob: 49718811113bca4b72706650138c86dd9f3e0a36 [file] [log] [blame]
Takashi Matsuo06694102015-09-11 13:55:40 -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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="pubsub_v1.html">Cloud Pub/Sub API</a> . <a href="pubsub_v1.projects.html">projects</a> . <a href="pubsub_v1.projects.topics.html">topics</a></h1>
Takashi Matsuo06694102015-09-11 13:55:40 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="pubsub_v1.projects.topics.snapshots.html">snapshots()</a></code>
79</p>
80<p class="firstline">Returns the snapshots Resource.</p>
81
82<p class="toc_element">
Takashi Matsuo06694102015-09-11 13:55:40 -070083 <code><a href="pubsub_v1.projects.topics.subscriptions.html">subscriptions()</a></code>
84</p>
85<p class="firstline">Returns the subscriptions Resource.</p>
86
87<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070088 <code><a href="#create">create(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070089<p class="firstline">Creates the given topic with the given name. See the</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070090<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070091 <code><a href="#delete">delete(topic, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080092<p class="firstline">Deletes the topic with the given name. Returns `NOT_FOUND` if the topic</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070093<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070094 <code><a href="#get">get(topic, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070095<p class="firstline">Gets the configuration of a topic.</p>
96<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070097 <code><a href="#getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080098<p class="firstline">Gets the access control policy for a resource.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070099<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700100 <code><a href="#list">list(project, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700101<p class="firstline">Lists matching topics.</p>
102<p class="toc_element">
103 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
104<p class="firstline">Retrieves the next page of results.</p>
105<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700106 <code><a href="#patch">patch(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700107<p class="firstline">Updates an existing topic. Note that certain properties of a</p>
108<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 <code><a href="#publish">publish(topic, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800110<p class="firstline">Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700111<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700112 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800113<p class="firstline">Sets the access control policy on the specified resource. Replaces any</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700114<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700115 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700116<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
117<h3>Method Details</h3>
118<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700119 <code class="details" id="create">create(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120 <pre>Creates the given topic with the given name. See the
Bu Sun Kim65020912020-05-20 12:08:20 -0700121&lt;a href=&quot;https://cloud.google.com/pubsub/docs/admin#resource_names&quot;&gt;
Dan O'Mearadd494642020-05-01 07:42:23 -0700122resource name rules&lt;/a&gt;.
Takashi Matsuo06694102015-09-11 13:55:40 -0700123
124Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700125 name: string, Required. The name of the topic. It must have the format
Bu Sun Kim65020912020-05-20 12:08:20 -0700126`&quot;projects/{project}/topics/{topic}&quot;`. `{topic}` must start with a letter,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800127and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
128underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
129signs (`%`). It must be between 3 and 255 characters in length, and it
Bu Sun Kim65020912020-05-20 12:08:20 -0700130must not start with `&quot;goog&quot;`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700131 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700132 The object takes the form of:
133
134{ # A topic resource.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700135 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the topic. It must have the format
136 # `&quot;projects/{project}/topics/{topic}&quot;`. `{topic}` must start with a letter,
137 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
138 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
139 # signs (`%`). It must be between 3 and 255 characters in length, and it
140 # must not start with `&quot;goog&quot;`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700141 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The resource name of the Cloud KMS CryptoKey to be used to protect access
142 # to messages published on this topic.
143 #
144 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
145 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
Dan O'Mearadd494642020-05-01 07:42:23 -0700146 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700149 &quot;messageStoragePolicy&quot;: { # Policy constraining the set of Google Cloud Platform regions where messages
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 # published to the topic may be stored. If not present, then no constraints
151 # are in effect.
Bu Sun Kim65020912020-05-20 12:08:20 -0700152 &quot;allowedPersistenceRegions&quot;: [ # A list of IDs of GCP regions where messages that are published to the topic
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 # may be persisted in storage. Messages published by publishers running in
154 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700155 # routed for storage in one of the allowed regions. An empty list means that
156 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -0700157 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700158 ],
159 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700160}
161
162 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800163 Allowed values
164 1 - v1 error format
165 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700166
167Returns:
168 An object of the form:
169
170 { # A topic resource.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700171 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the topic. It must have the format
172 # `&quot;projects/{project}/topics/{topic}&quot;`. `{topic}` must start with a letter,
173 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
174 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
175 # signs (`%`). It must be between 3 and 255 characters in length, and it
176 # must not start with `&quot;goog&quot;`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The resource name of the Cloud KMS CryptoKey to be used to protect access
178 # to messages published on this topic.
179 #
180 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
181 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
Dan O'Mearadd494642020-05-01 07:42:23 -0700182 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700183 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700184 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700185 &quot;messageStoragePolicy&quot;: { # Policy constraining the set of Google Cloud Platform regions where messages
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 # published to the topic may be stored. If not present, then no constraints
187 # are in effect.
Bu Sun Kim65020912020-05-20 12:08:20 -0700188 &quot;allowedPersistenceRegions&quot;: [ # A list of IDs of GCP regions where messages that are published to the topic
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700189 # may be persisted in storage. Messages published by publishers running in
190 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700191 # routed for storage in one of the allowed regions. An empty list means that
192 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -0700193 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700194 ],
195 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700196 }</pre>
197</div>
198
199<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700200 <code class="details" id="delete">delete(topic, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800201 <pre>Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
202does not exist. After a topic is deleted, a new topic may be created with
203the same name; this is an entirely new topic with none of the old
204configuration or subscriptions. Existing subscriptions to this topic are
205not deleted, but their `topic` field is set to `_deleted-topic_`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700206
207Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700208 topic: string, Required. Name of the topic to delete.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800209Format is `projects/{project}/topics/{topic}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700210 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800211 Allowed values
212 1 - v1 error format
213 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700214
215Returns:
216 An object of the form:
217
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800218 { # A generic empty message that you can re-use to avoid defining duplicated
219 # empty messages in your APIs. A typical example is to use it as the request
220 # or the response type of an API method. For instance:
221 #
222 # service Foo {
223 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
224 # }
225 #
226 # The JSON representation for `Empty` is empty JSON object `{}`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700227 }</pre>
228</div>
229
230<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700231 <code class="details" id="get">get(topic, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700232 <pre>Gets the configuration of a topic.
233
234Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700235 topic: string, Required. The name of the topic to get.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800236Format is `projects/{project}/topics/{topic}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700237 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800238 Allowed values
239 1 - v1 error format
240 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700241
242Returns:
243 An object of the form:
244
245 { # A topic resource.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700246 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the topic. It must have the format
247 # `&quot;projects/{project}/topics/{topic}&quot;`. `{topic}` must start with a letter,
248 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
249 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
250 # signs (`%`). It must be between 3 and 255 characters in length, and it
251 # must not start with `&quot;goog&quot;`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The resource name of the Cloud KMS CryptoKey to be used to protect access
253 # to messages published on this topic.
254 #
255 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
256 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
Dan O'Mearadd494642020-05-01 07:42:23 -0700257 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700258 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700260 &quot;messageStoragePolicy&quot;: { # Policy constraining the set of Google Cloud Platform regions where messages
Dan O'Mearadd494642020-05-01 07:42:23 -0700261 # published to the topic may be stored. If not present, then no constraints
262 # are in effect.
Bu Sun Kim65020912020-05-20 12:08:20 -0700263 &quot;allowedPersistenceRegions&quot;: [ # A list of IDs of GCP regions where messages that are published to the topic
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264 # may be persisted in storage. Messages published by publishers running in
265 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700266 # routed for storage in one of the allowed regions. An empty list means that
267 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -0700268 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700269 ],
270 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700271 }</pre>
272</div>
273
274<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700275 <code class="details" id="getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800276 <pre>Gets the access control policy for a resource.
277Returns an empty policy if the resource exists and does not have a policy
278set.
Takashi Matsuo06694102015-09-11 13:55:40 -0700279
280Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800281 resource: string, REQUIRED: The resource for which the policy is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700282See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700283 options_requestedPolicyVersion: integer, Optional. The policy format version to be returned.
284
285Valid values are 0, 1, and 3. Requests specifying an invalid value will be
286rejected.
287
288Requests for policies with any conditional bindings must specify version 3.
289Policies without any conditional bindings may specify any valid value or
290leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700291
292To learn which resources support conditions in their IAM policies, see the
293[IAM
294documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Takashi Matsuo06694102015-09-11 13:55:40 -0700295 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800296 Allowed values
297 1 - v1 error format
298 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700299
300Returns:
301 An object of the form:
302
Dan O'Mearadd494642020-05-01 07:42:23 -0700303 { # An Identity and Access Management (IAM) policy, which specifies access
304 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800305 #
306 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700307 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
308 # `members` to a single `role`. Members can be user accounts, service accounts,
309 # Google groups, and domains (such as G Suite). A `role` is a named list of
310 # permissions; each `role` can be an IAM predefined role or a user-created
311 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800312 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700313 # For some types of Google Cloud resources, a `binding` can also specify a
314 # `condition`, which is a logical expression that allows access to a resource
315 # only if the expression evaluates to `true`. A condition can add constraints
316 # based on attributes of the request, the resource, or both. To learn which
317 # resources support conditions in their IAM policies, see the
318 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700319 #
320 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800321 #
322 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700323 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800324 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700325 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
326 # &quot;members&quot;: [
327 # &quot;user:mike@example.com&quot;,
328 # &quot;group:admins@example.com&quot;,
329 # &quot;domain:google.com&quot;,
330 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800331 # ]
332 # },
333 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700334 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
335 # &quot;members&quot;: [
336 # &quot;user:eve@example.com&quot;
337 # ],
338 # &quot;condition&quot;: {
339 # &quot;title&quot;: &quot;expirable access&quot;,
340 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
341 # &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 -0700342 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800343 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700344 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700345 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
346 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800347 # }
348 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700349 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700350 #
351 # bindings:
352 # - members:
353 # - user:mike@example.com
354 # - group:admins@example.com
355 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700356 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
357 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700358 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700359 # - user:eve@example.com
360 # role: roles/resourcemanager.organizationViewer
361 # condition:
362 # title: expirable access
363 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700364 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700365 # - etag: BwWWja0YfJA=
366 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700367 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800368 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700369 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700370 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700371 # `condition` that determines how and when the `bindings` are applied. Each
372 # of the `bindings` must contain at least one member.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800373 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700374 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
375 #
376 # If the condition evaluates to `true`, then this binding applies to the
377 # current request.
378 #
379 # If the condition evaluates to `false`, then this binding does not apply to
380 # the current request. However, a different role binding might grant the same
381 # role to one or more of the members in this binding.
382 #
383 # To learn which resources support conditions in their IAM policies, see the
384 # [IAM
385 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
386 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
387 # are documented at https://github.com/google/cel-spec.
388 #
389 # Example (Comparison):
390 #
391 # title: &quot;Summary size limit&quot;
392 # description: &quot;Determines if a summary is less than 100 chars&quot;
393 # expression: &quot;document.summary.size() &lt; 100&quot;
394 #
395 # Example (Equality):
396 #
397 # title: &quot;Requestor is owner&quot;
398 # description: &quot;Determines if requestor is the document owner&quot;
399 # expression: &quot;document.owner == request.auth.claims.email&quot;
400 #
401 # Example (Logic):
402 #
403 # title: &quot;Public documents&quot;
404 # description: &quot;Determine whether the document should be publicly visible&quot;
405 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
406 #
407 # Example (Data Manipulation):
408 #
409 # title: &quot;Notification string&quot;
410 # description: &quot;Create a notification string with a timestamp.&quot;
411 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
412 #
413 # The exact variables and functions that may be referenced within an expression
414 # are determined by the service that evaluates it. See the service
415 # documentation for additional information.
416 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
417 # reporting, e.g. a file name and a position in the file.
418 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
419 # its purpose. This can be used e.g. in UIs which allow to enter the
420 # expression.
421 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
422 # describes the expression, e.g. when hovered over it in a UI.
423 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
424 # syntax.
425 },
426 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800427 # `members` can have the following values:
428 #
429 # * `allUsers`: A special identifier that represents anyone who is
430 # on the internet; with or without a Google account.
431 #
432 # * `allAuthenticatedUsers`: A special identifier that represents anyone
433 # who is authenticated with a Google account or a service account.
434 #
435 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700436 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800437 #
438 #
439 # * `serviceAccount:{emailid}`: An email address that represents a service
440 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
441 #
442 # * `group:{emailid}`: An email address that represents a Google group.
443 # For example, `admins@example.com`.
444 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700445 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
446 # identifier) representing a user that has been recently deleted. For
447 # example, `alice@example.com?uid=123456789012345678901`. If the user is
448 # recovered, this value reverts to `user:{emailid}` and the recovered user
449 # retains the role in the binding.
450 #
451 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
452 # unique identifier) representing a service account that has been recently
453 # deleted. For example,
454 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
455 # If the service account is undeleted, this value reverts to
456 # `serviceAccount:{emailid}` and the undeleted service account retains the
457 # role in the binding.
458 #
459 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
460 # identifier) representing a Google group that has been recently
461 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
462 # the group is recovered, this value reverts to `group:{emailid}` and the
463 # recovered group retains the role in the binding.
464 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700465 #
466 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800467 # users of that domain. For example, `google.com` or `example.com`.
468 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700469 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700470 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700471 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
472 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700473 },
474 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700475 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
476 # prevent simultaneous updates of a policy from overwriting each other.
477 # It is strongly suggested that systems make use of the `etag` in the
478 # read-modify-write cycle to perform policy updates in order to avoid race
479 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
480 # systems are expected to put that etag in the request to `setIamPolicy` to
481 # ensure that their change will be applied to the same version of the policy.
482 #
483 # **Important:** If you use IAM Conditions, you must include the `etag` field
484 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
485 # you to overwrite a version `3` policy with a version `1` policy, and all of
486 # the conditions in the version `3` policy are lost.
487 &quot;version&quot;: 42, # Specifies the format of the policy.
488 #
489 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
490 # are rejected.
491 #
492 # Any operation that affects conditional role bindings must specify version
493 # `3`. This requirement applies to the following operations:
494 #
495 # * Getting a policy that includes a conditional role binding
496 # * Adding a conditional role binding to a policy
497 # * Changing a conditional role binding in a policy
498 # * Removing any role binding, with or without a condition, from a policy
499 # that includes conditions
500 #
501 # **Important:** If you use IAM Conditions, you must include the `etag` field
502 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
503 # you to overwrite a version `3` policy with a version `1` policy, and all of
504 # the conditions in the version `3` policy are lost.
505 #
506 # If a policy does not include any conditions, operations on that policy may
507 # specify any valid version or leave the field unset.
508 #
509 # To learn which resources support conditions in their IAM policies, see the
510 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Takashi Matsuo06694102015-09-11 13:55:40 -0700511 }</pre>
512</div>
513
514<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700515 <code class="details" id="list">list(project, pageToken=None, pageSize=None, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700516 <pre>Lists matching topics.
517
518Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700519 project: string, Required. The name of the project in which to list topics.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700520Format is `projects/{project-id}`. (required)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800521 pageToken: string, The value returned by the last `ListTopicsResponse`; indicates that this is
522a continuation of a prior `ListTopics` call, and that the system should
523return the next page of data.
Bu Sun Kim65020912020-05-20 12:08:20 -0700524 pageSize: integer, Maximum number of topics to return.
Takashi Matsuo06694102015-09-11 13:55:40 -0700525 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800526 Allowed values
527 1 - v1 error format
528 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700529
530Returns:
531 An object of the form:
532
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800533 { # Response for the `ListTopics` method.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700534 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more topics that match the
535 # request; this value should be passed in a new `ListTopicsRequest`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700536 &quot;topics&quot;: [ # The resulting topics.
Takashi Matsuo06694102015-09-11 13:55:40 -0700537 { # A topic resource.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700538 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the topic. It must have the format
539 # `&quot;projects/{project}/topics/{topic}&quot;`. `{topic}` must start with a letter,
540 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
541 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
542 # signs (`%`). It must be between 3 and 255 characters in length, and it
543 # must not start with `&quot;goog&quot;`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700544 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The resource name of the Cloud KMS CryptoKey to be used to protect access
545 # to messages published on this topic.
546 #
547 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
548 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
Dan O'Mearadd494642020-05-01 07:42:23 -0700549 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700550 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700552 &quot;messageStoragePolicy&quot;: { # Policy constraining the set of Google Cloud Platform regions where messages
Dan O'Mearadd494642020-05-01 07:42:23 -0700553 # published to the topic may be stored. If not present, then no constraints
554 # are in effect.
Bu Sun Kim65020912020-05-20 12:08:20 -0700555 &quot;allowedPersistenceRegions&quot;: [ # A list of IDs of GCP regions where messages that are published to the topic
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700556 # may be persisted in storage. Messages published by publishers running in
557 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700558 # routed for storage in one of the allowed regions. An empty list means that
559 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -0700560 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700561 ],
562 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700563 },
564 ],
565 }</pre>
566</div>
567
568<div class="method">
569 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
570 <pre>Retrieves the next page of results.
571
572Args:
573 previous_request: The request for the previous page. (required)
574 previous_response: The response from the request for the previous page. (required)
575
576Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700577 A request object that you can call &#x27;execute()&#x27; on to request the next
Takashi Matsuo06694102015-09-11 13:55:40 -0700578 page. Returns None if there are no more items in the collection.
579 </pre>
580</div>
581
582<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700583 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700584 <pre>Updates an existing topic. Note that certain properties of a
585topic are not modifiable.
586
587Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700588 name: string, Required. The name of the topic. It must have the format
Bu Sun Kim65020912020-05-20 12:08:20 -0700589`&quot;projects/{project}/topics/{topic}&quot;`. `{topic}` must start with a letter,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700590and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
591underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
592signs (`%`). It must be between 3 and 255 characters in length, and it
Bu Sun Kim65020912020-05-20 12:08:20 -0700593must not start with `&quot;goog&quot;`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700594 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700595 The object takes the form of:
596
597{ # Request for the UpdateTopic method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700598 &quot;updateMask&quot;: &quot;A String&quot;, # Required. Indicates which fields in the provided topic to update. Must be specified
599 # and non-empty. Note that if `update_mask` contains
600 # &quot;message_storage_policy&quot; but the `message_storage_policy` is not set in
601 # the `topic` provided above, then the updated value is determined by the
602 # policy configured at the project or organization level.
603 &quot;topic&quot;: { # A topic resource. # Required. The updated topic object.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700604 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the topic. It must have the format
605 # `&quot;projects/{project}/topics/{topic}&quot;`. `{topic}` must start with a letter,
606 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
607 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
608 # signs (`%`). It must be between 3 and 255 characters in length, and it
609 # must not start with `&quot;goog&quot;`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700610 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The resource name of the Cloud KMS CryptoKey to be used to protect access
611 # to messages published on this topic.
612 #
613 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
614 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
Dan O'Mearadd494642020-05-01 07:42:23 -0700615 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700616 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700617 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 &quot;messageStoragePolicy&quot;: { # Policy constraining the set of Google Cloud Platform regions where messages
Dan O'Mearadd494642020-05-01 07:42:23 -0700619 # published to the topic may be stored. If not present, then no constraints
620 # are in effect.
Bu Sun Kim65020912020-05-20 12:08:20 -0700621 &quot;allowedPersistenceRegions&quot;: [ # A list of IDs of GCP regions where messages that are published to the topic
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700622 # may be persisted in storage. Messages published by publishers running in
623 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700624 # routed for storage in one of the allowed regions. An empty list means that
625 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -0700626 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700627 ],
628 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700629 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700630 }
631
632 x__xgafv: string, V1 error format.
633 Allowed values
634 1 - v1 error format
635 2 - v2 error format
636
637Returns:
638 An object of the form:
639
640 { # A topic resource.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700641 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the topic. It must have the format
642 # `&quot;projects/{project}/topics/{topic}&quot;`. `{topic}` must start with a letter,
643 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
644 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
645 # signs (`%`). It must be between 3 and 255 characters in length, and it
646 # must not start with `&quot;goog&quot;`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700647 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The resource name of the Cloud KMS CryptoKey to be used to protect access
648 # to messages published on this topic.
649 #
650 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
651 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
Dan O'Mearadd494642020-05-01 07:42:23 -0700652 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700653 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700654 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700655 &quot;messageStoragePolicy&quot;: { # Policy constraining the set of Google Cloud Platform regions where messages
Dan O'Mearadd494642020-05-01 07:42:23 -0700656 # published to the topic may be stored. If not present, then no constraints
657 # are in effect.
Bu Sun Kim65020912020-05-20 12:08:20 -0700658 &quot;allowedPersistenceRegions&quot;: [ # A list of IDs of GCP regions where messages that are published to the topic
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700659 # may be persisted in storage. Messages published by publishers running in
660 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700661 # routed for storage in one of the allowed regions. An empty list means that
662 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -0700663 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700664 ],
665 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700666 }</pre>
667</div>
668
669<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700670 <code class="details" id="publish">publish(topic, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800671 <pre>Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700672does not exist.
Takashi Matsuo06694102015-09-11 13:55:40 -0700673
674Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700675 topic: string, Required. The messages in the request will be published on this topic.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800676Format is `projects/{project}/topics/{topic}`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700677 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700678 The object takes the form of:
679
680{ # Request for the Publish method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700681 &quot;messages&quot;: [ # Required. The messages to publish.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700682 { # A message that is published by publishers and consumed by subscribers. The
683 # message must contain either a non-empty data field or at least one attribute.
684 # Note that client libraries represent this object differently
685 # depending on the language. See the corresponding
Bu Sun Kim65020912020-05-20 12:08:20 -0700686 # &lt;a href=&quot;https://cloud.google.com/pubsub/docs/reference/libraries&quot;&gt;client
Dan O'Mearadd494642020-05-01 07:42:23 -0700687 # library documentation&lt;/a&gt; for more information. See
Bu Sun Kim65020912020-05-20 12:08:20 -0700688 # &lt;a href=&quot;https://cloud.google.com/pubsub/quotas&quot;&gt;Quotas and limits&lt;/a&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689 # for more information about message limits.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700690 &quot;publishTime&quot;: &quot;A String&quot;, # The time at which the message was published, populated by the server when
691 # it receives the `Publish` call. It must not be populated by the
692 # publisher in a `Publish` call.
693 &quot;data&quot;: &quot;A String&quot;, # The message data field. If this field is empty, the message must contain
694 # at least one attribute.
Bu Sun Kim65020912020-05-20 12:08:20 -0700695 &quot;messageId&quot;: &quot;A String&quot;, # ID of this message, assigned by the server when the message is published.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800696 # Guaranteed to be unique within the topic. This value may be read by a
697 # subscriber that receives a `PubsubMessage` via a `Pull` call or a push
698 # delivery. It must not be populated by the publisher in a `Publish` call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700699 &quot;attributes&quot;: { # Attributes for this message. If this field is empty, the message must
700 # contain non-empty data.
701 &quot;a_key&quot;: &quot;A String&quot;,
702 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700703 },
704 ],
705 }
706
707 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800708 Allowed values
709 1 - v1 error format
710 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700711
712Returns:
713 An object of the form:
714
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800715 { # Response for the `Publish` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700716 &quot;messageIds&quot;: [ # The server-assigned ID of each published message, in the same order as
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800717 # the messages in the request. IDs are guaranteed to be unique within
718 # the topic.
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700720 ],
721 }</pre>
722</div>
723
724<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700725 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800726 <pre>Sets the access control policy on the specified resource. Replaces any
727existing policy.
Takashi Matsuo06694102015-09-11 13:55:40 -0700728
Bu Sun Kim65020912020-05-20 12:08:20 -0700729Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
Dan O'Mearadd494642020-05-01 07:42:23 -0700730
Takashi Matsuo06694102015-09-11 13:55:40 -0700731Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800732 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700733See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700734 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700735 The object takes the form of:
736
737{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700738 &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
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800739 # the policy is limited to a few 10s of KB. An empty policy is a
740 # valid policy but certain Cloud Platform services (such as Projects)
741 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -0700742 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800743 #
744 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700745 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
746 # `members` to a single `role`. Members can be user accounts, service accounts,
747 # Google groups, and domains (such as G Suite). A `role` is a named list of
748 # permissions; each `role` can be an IAM predefined role or a user-created
749 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800750 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700751 # For some types of Google Cloud resources, a `binding` can also specify a
752 # `condition`, which is a logical expression that allows access to a resource
753 # only if the expression evaluates to `true`. A condition can add constraints
754 # based on attributes of the request, the resource, or both. To learn which
755 # resources support conditions in their IAM policies, see the
756 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700757 #
758 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800759 #
760 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700761 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800762 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700763 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
764 # &quot;members&quot;: [
765 # &quot;user:mike@example.com&quot;,
766 # &quot;group:admins@example.com&quot;,
767 # &quot;domain:google.com&quot;,
768 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800769 # ]
770 # },
771 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700772 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
773 # &quot;members&quot;: [
774 # &quot;user:eve@example.com&quot;
775 # ],
776 # &quot;condition&quot;: {
777 # &quot;title&quot;: &quot;expirable access&quot;,
778 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
779 # &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 -0700780 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800781 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700782 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700783 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
784 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800785 # }
786 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700787 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700788 #
789 # bindings:
790 # - members:
791 # - user:mike@example.com
792 # - group:admins@example.com
793 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700794 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
795 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700796 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700797 # - user:eve@example.com
798 # role: roles/resourcemanager.organizationViewer
799 # condition:
800 # title: expirable access
801 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700802 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700803 # - etag: BwWWja0YfJA=
804 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700805 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800806 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700807 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700808 &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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800811 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -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;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
855 # reporting, e.g. a file name and a position in the file.
856 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
857 # its purpose. This can be used e.g. in UIs which allow to enter the
858 # expression.
859 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
860 # describes the expression, e.g. when hovered over it in a UI.
861 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
862 # syntax.
863 },
864 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800865 # `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
Dan O'Mearadd494642020-05-01 07:42:23 -0700874 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800875 #
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 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700883 # * `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 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700903 #
904 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800905 # 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;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700908 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700909 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
910 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700911 },
912 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -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.
925 &quot;version&quot;: 42, # Specifies the format of the policy.
926 #
927 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
928 # are rejected.
929 #
930 # Any operation that affects conditional role bindings must specify version
931 # `3`. This requirement applies to the following operations:
932 #
933 # * Getting a policy that includes a conditional role binding
934 # * Adding a conditional role binding to a policy
935 # * Changing a conditional role binding in a policy
936 # * Removing any role binding, with or without a condition, from a policy
937 # that includes conditions
938 #
939 # **Important:** If you use IAM Conditions, you must include the `etag` field
940 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
941 # you to overwrite a version `3` policy with a version `1` policy, and all of
942 # the conditions in the version `3` policy are lost.
943 #
944 # If a policy does not include any conditions, operations on that policy may
945 # specify any valid version or leave the field unset.
946 #
947 # To learn which resources support conditions in their IAM policies, see the
948 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Takashi Matsuo06694102015-09-11 13:55:40 -0700949 },
950 }
951
952 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800953 Allowed values
954 1 - v1 error format
955 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700956
957Returns:
958 An object of the form:
959
Dan O'Mearadd494642020-05-01 07:42:23 -0700960 { # An Identity and Access Management (IAM) policy, which specifies access
961 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800962 #
963 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700964 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
965 # `members` to a single `role`. Members can be user accounts, service accounts,
966 # Google groups, and domains (such as G Suite). A `role` is a named list of
967 # permissions; each `role` can be an IAM predefined role or a user-created
968 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800969 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700970 # For some types of Google Cloud resources, a `binding` can also specify a
971 # `condition`, which is a logical expression that allows access to a resource
972 # only if the expression evaluates to `true`. A condition can add constraints
973 # based on attributes of the request, the resource, or both. To learn which
974 # resources support conditions in their IAM policies, see the
975 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700976 #
977 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800978 #
979 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700980 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800981 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700982 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
983 # &quot;members&quot;: [
984 # &quot;user:mike@example.com&quot;,
985 # &quot;group:admins@example.com&quot;,
986 # &quot;domain:google.com&quot;,
987 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800988 # ]
989 # },
990 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700991 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
992 # &quot;members&quot;: [
993 # &quot;user:eve@example.com&quot;
994 # ],
995 # &quot;condition&quot;: {
996 # &quot;title&quot;: &quot;expirable access&quot;,
997 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
998 # &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 -0700999 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001000 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001001 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001002 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1003 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001004 # }
1005 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001006 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001007 #
1008 # bindings:
1009 # - members:
1010 # - user:mike@example.com
1011 # - group:admins@example.com
1012 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001013 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1014 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001015 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001016 # - user:eve@example.com
1017 # role: roles/resourcemanager.organizationViewer
1018 # condition:
1019 # title: expirable access
1020 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001021 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001022 # - etag: BwWWja0YfJA=
1023 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001024 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001025 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001026 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001027 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001028 # `condition` that determines how and when the `bindings` are applied. Each
1029 # of the `bindings` must contain at least one member.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001030 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001031 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1032 #
1033 # If the condition evaluates to `true`, then this binding applies to the
1034 # current request.
1035 #
1036 # If the condition evaluates to `false`, then this binding does not apply to
1037 # the current request. However, a different role binding might grant the same
1038 # role to one or more of the members in this binding.
1039 #
1040 # To learn which resources support conditions in their IAM policies, see the
1041 # [IAM
1042 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1043 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1044 # are documented at https://github.com/google/cel-spec.
1045 #
1046 # Example (Comparison):
1047 #
1048 # title: &quot;Summary size limit&quot;
1049 # description: &quot;Determines if a summary is less than 100 chars&quot;
1050 # expression: &quot;document.summary.size() &lt; 100&quot;
1051 #
1052 # Example (Equality):
1053 #
1054 # title: &quot;Requestor is owner&quot;
1055 # description: &quot;Determines if requestor is the document owner&quot;
1056 # expression: &quot;document.owner == request.auth.claims.email&quot;
1057 #
1058 # Example (Logic):
1059 #
1060 # title: &quot;Public documents&quot;
1061 # description: &quot;Determine whether the document should be publicly visible&quot;
1062 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1063 #
1064 # Example (Data Manipulation):
1065 #
1066 # title: &quot;Notification string&quot;
1067 # description: &quot;Create a notification string with a timestamp.&quot;
1068 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1069 #
1070 # The exact variables and functions that may be referenced within an expression
1071 # are determined by the service that evaluates it. See the service
1072 # documentation for additional information.
1073 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1074 # reporting, e.g. a file name and a position in the file.
1075 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1076 # its purpose. This can be used e.g. in UIs which allow to enter the
1077 # expression.
1078 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1079 # describes the expression, e.g. when hovered over it in a UI.
1080 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1081 # syntax.
1082 },
1083 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001084 # `members` can have the following values:
1085 #
1086 # * `allUsers`: A special identifier that represents anyone who is
1087 # on the internet; with or without a Google account.
1088 #
1089 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1090 # who is authenticated with a Google account or a service account.
1091 #
1092 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001093 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001094 #
1095 #
1096 # * `serviceAccount:{emailid}`: An email address that represents a service
1097 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1098 #
1099 # * `group:{emailid}`: An email address that represents a Google group.
1100 # For example, `admins@example.com`.
1101 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001102 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1103 # identifier) representing a user that has been recently deleted. For
1104 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1105 # recovered, this value reverts to `user:{emailid}` and the recovered user
1106 # retains the role in the binding.
1107 #
1108 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1109 # unique identifier) representing a service account that has been recently
1110 # deleted. For example,
1111 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1112 # If the service account is undeleted, this value reverts to
1113 # `serviceAccount:{emailid}` and the undeleted service account retains the
1114 # role in the binding.
1115 #
1116 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1117 # identifier) representing a Google group that has been recently
1118 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1119 # the group is recovered, this value reverts to `group:{emailid}` and the
1120 # recovered group retains the role in the binding.
1121 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001122 #
1123 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001124 # users of that domain. For example, `google.com` or `example.com`.
1125 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001126 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -07001127 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001128 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1129 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Takashi Matsuo06694102015-09-11 13:55:40 -07001130 },
1131 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001132 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1133 # prevent simultaneous updates of a policy from overwriting each other.
1134 # It is strongly suggested that systems make use of the `etag` in the
1135 # read-modify-write cycle to perform policy updates in order to avoid race
1136 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1137 # systems are expected to put that etag in the request to `setIamPolicy` to
1138 # ensure that their change will be applied to the same version of the policy.
1139 #
1140 # **Important:** If you use IAM Conditions, you must include the `etag` field
1141 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1142 # you to overwrite a version `3` policy with a version `1` policy, and all of
1143 # the conditions in the version `3` policy are lost.
1144 &quot;version&quot;: 42, # Specifies the format of the policy.
1145 #
1146 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1147 # are rejected.
1148 #
1149 # Any operation that affects conditional role bindings must specify version
1150 # `3`. This requirement applies to the following operations:
1151 #
1152 # * Getting a policy that includes a conditional role binding
1153 # * Adding a conditional role binding to a policy
1154 # * Changing a conditional role binding in a policy
1155 # * Removing any role binding, with or without a condition, from a policy
1156 # that includes conditions
1157 #
1158 # **Important:** If you use IAM Conditions, you must include the `etag` field
1159 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1160 # you to overwrite a version `3` policy with a version `1` policy, and all of
1161 # the conditions in the version `3` policy are lost.
1162 #
1163 # If a policy does not include any conditions, operations on that policy may
1164 # specify any valid version or leave the field unset.
1165 #
1166 # To learn which resources support conditions in their IAM policies, see the
1167 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Takashi Matsuo06694102015-09-11 13:55:40 -07001168 }</pre>
1169</div>
1170
1171<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001172 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -07001173 <pre>Returns permissions that a caller has on the specified resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001174If the resource does not exist, this will return an empty set of
Bu Sun Kim65020912020-05-20 12:08:20 -07001175permissions, not a `NOT_FOUND` error.
Takashi Matsuo06694102015-09-11 13:55:40 -07001176
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001177Note: This operation is designed to be used for building permission-aware
1178UIs and command-line tools, not for authorization checking. This operation
Bu Sun Kim65020912020-05-20 12:08:20 -07001179may &quot;fail open&quot; without warning.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001180
Takashi Matsuo06694102015-09-11 13:55:40 -07001181Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001182 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001183See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001184 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07001185 The object takes the form of:
1186
1187{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001188 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
1189 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001190 # information see
1191 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07001192 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -07001193 ],
1194 }
1195
1196 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001197 Allowed values
1198 1 - v1 error format
1199 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -07001200
1201Returns:
1202 An object of the form:
1203
1204 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001205 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001206 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001207 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -07001208 ],
1209 }</pre>
1210</div>
1211
1212</body></html>