blob: db7b271d2086f4e6affb3f6a1c83a613a836806a [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 Kim65020912020-05-20 12:08:20 -0700135 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The resource name of the Cloud KMS CryptoKey to be used to protect access
136 # to messages published on this topic.
137 #
138 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
139 &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 -0700140 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700141 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700143 &quot;messageStoragePolicy&quot;: { # Policy constraining the set of Google Cloud Platform regions where messages
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 # published to the topic may be stored. If not present, then no constraints
145 # are in effect.
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 &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 -0700147 # may be persisted in storage. Messages published by publishers running in
148 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700149 # routed for storage in one of the allowed regions. An empty list means that
150 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -0700151 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700152 ],
153 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700154 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the topic. It must have the format
155 # `&quot;projects/{project}/topics/{topic}&quot;`. `{topic}` must start with a letter,
156 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
157 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
158 # signs (`%`). It must be between 3 and 255 characters in length, and it
159 # must not start with `&quot;goog&quot;`.
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 Kim65020912020-05-20 12:08:20 -0700171 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The resource name of the Cloud KMS CryptoKey to be used to protect access
172 # to messages published on this topic.
173 #
174 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
175 &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 -0700176 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700178 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700179 &quot;messageStoragePolicy&quot;: { # Policy constraining the set of Google Cloud Platform regions where messages
Dan O'Mearadd494642020-05-01 07:42:23 -0700180 # published to the topic may be stored. If not present, then no constraints
181 # are in effect.
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 &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 -0700183 # may be persisted in storage. Messages published by publishers running in
184 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700185 # routed for storage in one of the allowed regions. An empty list means that
186 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -0700187 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700188 ],
189 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700190 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the topic. It must have the format
191 # `&quot;projects/{project}/topics/{topic}&quot;`. `{topic}` must start with a letter,
192 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
193 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
194 # signs (`%`). It must be between 3 and 255 characters in length, and it
195 # must not start with `&quot;goog&quot;`.
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 Kim65020912020-05-20 12:08:20 -0700246 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The resource name of the Cloud KMS CryptoKey to be used to protect access
247 # to messages published on this topic.
248 #
249 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
250 &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 -0700251 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700253 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700254 &quot;messageStoragePolicy&quot;: { # Policy constraining the set of Google Cloud Platform regions where messages
Dan O'Mearadd494642020-05-01 07:42:23 -0700255 # published to the topic may be stored. If not present, then no constraints
256 # are in effect.
Bu Sun Kim65020912020-05-20 12:08:20 -0700257 &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 -0700258 # may be persisted in storage. Messages published by publishers running in
259 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700260 # routed for storage in one of the allowed regions. An empty list means that
261 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700263 ],
264 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700265 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the topic. It must have the format
266 # `&quot;projects/{project}/topics/{topic}&quot;`. `{topic}` must start with a letter,
267 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
268 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
269 # signs (`%`). It must be between 3 and 255 characters in length, and it
270 # must not start with `&quot;goog&quot;`.
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;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
371 # prevent simultaneous updates of a policy from overwriting each other.
372 # It is strongly suggested that systems make use of the `etag` in the
373 # read-modify-write cycle to perform policy updates in order to avoid race
374 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
375 # systems are expected to put that etag in the request to `setIamPolicy` to
376 # ensure that their change will be applied to the same version of the policy.
377 #
378 # **Important:** If you use IAM Conditions, you must include the `etag` field
379 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
380 # you to overwrite a version `3` policy with a version `1` policy, and all of
381 # the conditions in the version `3` policy are lost.
382 &quot;version&quot;: 42, # Specifies the format of the policy.
383 #
384 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
385 # are rejected.
386 #
387 # Any operation that affects conditional role bindings must specify version
388 # `3`. This requirement applies to the following operations:
389 #
390 # * Getting a policy that includes a conditional role binding
391 # * Adding a conditional role binding to a policy
392 # * Changing a conditional role binding in a policy
393 # * Removing any role binding, with or without a condition, from a policy
394 # that includes conditions
395 #
396 # **Important:** If you use IAM Conditions, you must include the `etag` field
397 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
398 # you to overwrite a version `3` policy with a version `1` policy, and all of
399 # the conditions in the version `3` policy are lost.
400 #
401 # If a policy does not include any conditions, operations on that policy may
402 # specify any valid version or leave the field unset.
403 #
404 # To learn which resources support conditions in their IAM policies, see the
405 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
406 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700407 # `condition` that determines how and when the `bindings` are applied. Each
408 # of the `bindings` must contain at least one member.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800409 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
411 #
412 # If the condition evaluates to `true`, then this binding applies to the
413 # current request.
414 #
415 # If the condition evaluates to `false`, then this binding does not apply to
416 # the current request. However, a different role binding might grant the same
417 # role to one or more of the members in this binding.
418 #
419 # To learn which resources support conditions in their IAM policies, see the
420 # [IAM
421 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
422 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
423 # are documented at https://github.com/google/cel-spec.
424 #
425 # Example (Comparison):
426 #
427 # title: &quot;Summary size limit&quot;
428 # description: &quot;Determines if a summary is less than 100 chars&quot;
429 # expression: &quot;document.summary.size() &lt; 100&quot;
430 #
431 # Example (Equality):
432 #
433 # title: &quot;Requestor is owner&quot;
434 # description: &quot;Determines if requestor is the document owner&quot;
435 # expression: &quot;document.owner == request.auth.claims.email&quot;
436 #
437 # Example (Logic):
438 #
439 # title: &quot;Public documents&quot;
440 # description: &quot;Determine whether the document should be publicly visible&quot;
441 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
442 #
443 # Example (Data Manipulation):
444 #
445 # title: &quot;Notification string&quot;
446 # description: &quot;Create a notification string with a timestamp.&quot;
447 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
448 #
449 # The exact variables and functions that may be referenced within an expression
450 # are determined by the service that evaluates it. See the service
451 # documentation for additional information.
452 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
453 # reporting, e.g. a file name and a position in the file.
454 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
455 # its purpose. This can be used e.g. in UIs which allow to enter the
456 # expression.
457 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
458 # describes the expression, e.g. when hovered over it in a UI.
459 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
460 # syntax.
461 },
462 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800463 # `members` can have the following values:
464 #
465 # * `allUsers`: A special identifier that represents anyone who is
466 # on the internet; with or without a Google account.
467 #
468 # * `allAuthenticatedUsers`: A special identifier that represents anyone
469 # who is authenticated with a Google account or a service account.
470 #
471 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700472 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800473 #
474 #
475 # * `serviceAccount:{emailid}`: An email address that represents a service
476 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
477 #
478 # * `group:{emailid}`: An email address that represents a Google group.
479 # For example, `admins@example.com`.
480 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700481 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
482 # identifier) representing a user that has been recently deleted. For
483 # example, `alice@example.com?uid=123456789012345678901`. If the user is
484 # recovered, this value reverts to `user:{emailid}` and the recovered user
485 # retains the role in the binding.
486 #
487 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
488 # unique identifier) representing a service account that has been recently
489 # deleted. For example,
490 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
491 # If the service account is undeleted, this value reverts to
492 # `serviceAccount:{emailid}` and the undeleted service account retains the
493 # role in the binding.
494 #
495 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
496 # identifier) representing a Google group that has been recently
497 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
498 # the group is recovered, this value reverts to `group:{emailid}` and the
499 # recovered group retains the role in the binding.
500 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700501 #
502 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800503 # users of that domain. For example, `google.com` or `example.com`.
504 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700505 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700506 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700507 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
508 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700509 },
510 ],
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 Kim65020912020-05-20 12:08:20 -0700534 &quot;topics&quot;: [ # The resulting topics.
Takashi Matsuo06694102015-09-11 13:55:40 -0700535 { # A topic resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700536 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The resource name of the Cloud KMS CryptoKey to be used to protect access
537 # to messages published on this topic.
538 #
539 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
540 &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 -0700541 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700542 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700543 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700544 &quot;messageStoragePolicy&quot;: { # Policy constraining the set of Google Cloud Platform regions where messages
Dan O'Mearadd494642020-05-01 07:42:23 -0700545 # published to the topic may be stored. If not present, then no constraints
546 # are in effect.
Bu Sun Kim65020912020-05-20 12:08:20 -0700547 &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 -0700548 # may be persisted in storage. Messages published by publishers running in
549 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700550 # routed for storage in one of the allowed regions. An empty list means that
551 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -0700552 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700553 ],
554 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700555 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the topic. It must have the format
556 # `&quot;projects/{project}/topics/{topic}&quot;`. `{topic}` must start with a letter,
557 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
558 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
559 # signs (`%`). It must be between 3 and 255 characters in length, and it
560 # must not start with `&quot;goog&quot;`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700561 },
562 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700563 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more topics that match the
564 # request; this value should be passed in a new `ListTopicsRequest`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700565 }</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.
604 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The resource name of the Cloud KMS CryptoKey to be used to protect access
605 # to messages published on this topic.
606 #
607 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
608 &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 -0700609 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700610 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700611 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700612 &quot;messageStoragePolicy&quot;: { # Policy constraining the set of Google Cloud Platform regions where messages
Dan O'Mearadd494642020-05-01 07:42:23 -0700613 # published to the topic may be stored. If not present, then no constraints
614 # are in effect.
Bu Sun Kim65020912020-05-20 12:08:20 -0700615 &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 -0700616 # may be persisted in storage. Messages published by publishers running in
617 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700618 # routed for storage in one of the allowed regions. An empty list means that
619 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -0700620 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700621 ],
622 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700623 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the topic. It must have the format
624 # `&quot;projects/{project}/topics/{topic}&quot;`. `{topic}` must start with a letter,
625 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
626 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
627 # signs (`%`). It must be between 3 and 255 characters in length, and it
628 # must not start with `&quot;goog&quot;`.
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 Kim65020912020-05-20 12:08:20 -0700641 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The resource name of the Cloud KMS CryptoKey to be used to protect access
642 # to messages published on this topic.
643 #
644 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
645 &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 -0700646 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700647 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700648 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700649 &quot;messageStoragePolicy&quot;: { # Policy constraining the set of Google Cloud Platform regions where messages
Dan O'Mearadd494642020-05-01 07:42:23 -0700650 # published to the topic may be stored. If not present, then no constraints
651 # are in effect.
Bu Sun Kim65020912020-05-20 12:08:20 -0700652 &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 -0700653 # may be persisted in storage. Messages published by publishers running in
654 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700655 # routed for storage in one of the allowed regions. An empty list means that
656 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -0700657 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700658 ],
659 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700660 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the topic. It must have the format
661 # `&quot;projects/{project}/topics/{topic}&quot;`. `{topic}` must start with a letter,
662 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
663 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
664 # signs (`%`). It must be between 3 and 255 characters in length, and it
665 # must not start with `&quot;goog&quot;`.
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 Kim65020912020-05-20 12:08:20 -0700690 &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 -0800691 # Guaranteed to be unique within the topic. This value may be read by a
692 # subscriber that receives a `PubsubMessage` via a `Pull` call or a push
693 # delivery. It must not be populated by the publisher in a `Publish` call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700694 &quot;attributes&quot;: { # Attributes for this message. If this field is empty, the message must
695 # contain non-empty data.
696 &quot;a_key&quot;: &quot;A String&quot;,
697 },
698 &quot;publishTime&quot;: &quot;A String&quot;, # The time at which the message was published, populated by the server when
699 # it receives the `Publish` call. It must not be populated by the
700 # publisher in a `Publish` call.
701 &quot;data&quot;: &quot;A String&quot;, # The message data field. If this field is empty, the message must contain
702 # at least one attribute.
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;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
809 # prevent simultaneous updates of a policy from overwriting each other.
810 # It is strongly suggested that systems make use of the `etag` in the
811 # read-modify-write cycle to perform policy updates in order to avoid race
812 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
813 # systems are expected to put that etag in the request to `setIamPolicy` to
814 # ensure that their change will be applied to the same version of the policy.
815 #
816 # **Important:** If you use IAM Conditions, you must include the `etag` field
817 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
818 # you to overwrite a version `3` policy with a version `1` policy, and all of
819 # the conditions in the version `3` policy are lost.
820 &quot;version&quot;: 42, # Specifies the format of the policy.
821 #
822 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
823 # are rejected.
824 #
825 # Any operation that affects conditional role bindings must specify version
826 # `3`. This requirement applies to the following operations:
827 #
828 # * Getting a policy that includes a conditional role binding
829 # * Adding a conditional role binding to a policy
830 # * Changing a conditional role binding in a policy
831 # * Removing any role binding, with or without a condition, from a policy
832 # that includes conditions
833 #
834 # **Important:** If you use IAM Conditions, you must include the `etag` field
835 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
836 # you to overwrite a version `3` policy with a version `1` policy, and all of
837 # the conditions in the version `3` policy are lost.
838 #
839 # If a policy does not include any conditions, operations on that policy may
840 # specify any valid version or leave the field unset.
841 #
842 # To learn which resources support conditions in their IAM policies, see the
843 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
844 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700845 # `condition` that determines how and when the `bindings` are applied. Each
846 # of the `bindings` must contain at least one member.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800847 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700848 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
849 #
850 # If the condition evaluates to `true`, then this binding applies to the
851 # current request.
852 #
853 # If the condition evaluates to `false`, then this binding does not apply to
854 # the current request. However, a different role binding might grant the same
855 # role to one or more of the members in this binding.
856 #
857 # To learn which resources support conditions in their IAM policies, see the
858 # [IAM
859 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
860 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
861 # are documented at https://github.com/google/cel-spec.
862 #
863 # Example (Comparison):
864 #
865 # title: &quot;Summary size limit&quot;
866 # description: &quot;Determines if a summary is less than 100 chars&quot;
867 # expression: &quot;document.summary.size() &lt; 100&quot;
868 #
869 # Example (Equality):
870 #
871 # title: &quot;Requestor is owner&quot;
872 # description: &quot;Determines if requestor is the document owner&quot;
873 # expression: &quot;document.owner == request.auth.claims.email&quot;
874 #
875 # Example (Logic):
876 #
877 # title: &quot;Public documents&quot;
878 # description: &quot;Determine whether the document should be publicly visible&quot;
879 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
880 #
881 # Example (Data Manipulation):
882 #
883 # title: &quot;Notification string&quot;
884 # description: &quot;Create a notification string with a timestamp.&quot;
885 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
886 #
887 # The exact variables and functions that may be referenced within an expression
888 # are determined by the service that evaluates it. See the service
889 # documentation for additional information.
890 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
891 # reporting, e.g. a file name and a position in the file.
892 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
893 # its purpose. This can be used e.g. in UIs which allow to enter the
894 # expression.
895 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
896 # describes the expression, e.g. when hovered over it in a UI.
897 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
898 # syntax.
899 },
900 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800901 # `members` can have the following values:
902 #
903 # * `allUsers`: A special identifier that represents anyone who is
904 # on the internet; with or without a Google account.
905 #
906 # * `allAuthenticatedUsers`: A special identifier that represents anyone
907 # who is authenticated with a Google account or a service account.
908 #
909 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700910 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800911 #
912 #
913 # * `serviceAccount:{emailid}`: An email address that represents a service
914 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
915 #
916 # * `group:{emailid}`: An email address that represents a Google group.
917 # For example, `admins@example.com`.
918 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700919 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
920 # identifier) representing a user that has been recently deleted. For
921 # example, `alice@example.com?uid=123456789012345678901`. If the user is
922 # recovered, this value reverts to `user:{emailid}` and the recovered user
923 # retains the role in the binding.
924 #
925 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
926 # unique identifier) representing a service account that has been recently
927 # deleted. For example,
928 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
929 # If the service account is undeleted, this value reverts to
930 # `serviceAccount:{emailid}` and the undeleted service account retains the
931 # role in the binding.
932 #
933 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
934 # identifier) representing a Google group that has been recently
935 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
936 # the group is recovered, this value reverts to `group:{emailid}` and the
937 # recovered group retains the role in the binding.
938 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700939 #
940 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800941 # users of that domain. For example, `google.com` or `example.com`.
942 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700943 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700944 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700945 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
946 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700947 },
948 ],
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;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1028 # prevent simultaneous updates of a policy from overwriting each other.
1029 # It is strongly suggested that systems make use of the `etag` in the
1030 # read-modify-write cycle to perform policy updates in order to avoid race
1031 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1032 # systems are expected to put that etag in the request to `setIamPolicy` to
1033 # ensure that their change will be applied to the same version of the policy.
1034 #
1035 # **Important:** If you use IAM Conditions, you must include the `etag` field
1036 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1037 # you to overwrite a version `3` policy with a version `1` policy, and all of
1038 # the conditions in the version `3` policy are lost.
1039 &quot;version&quot;: 42, # Specifies the format of the policy.
1040 #
1041 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1042 # are rejected.
1043 #
1044 # Any operation that affects conditional role bindings must specify version
1045 # `3`. This requirement applies to the following operations:
1046 #
1047 # * Getting a policy that includes a conditional role binding
1048 # * Adding a conditional role binding to a policy
1049 # * Changing a conditional role binding in a policy
1050 # * Removing any role binding, with or without a condition, from a policy
1051 # that includes conditions
1052 #
1053 # **Important:** If you use IAM Conditions, you must include the `etag` field
1054 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1055 # you to overwrite a version `3` policy with a version `1` policy, and all of
1056 # the conditions in the version `3` policy are lost.
1057 #
1058 # If a policy does not include any conditions, operations on that policy may
1059 # specify any valid version or leave the field unset.
1060 #
1061 # To learn which resources support conditions in their IAM policies, see the
1062 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1063 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001064 # `condition` that determines how and when the `bindings` are applied. Each
1065 # of the `bindings` must contain at least one member.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001066 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001067 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1068 #
1069 # If the condition evaluates to `true`, then this binding applies to the
1070 # current request.
1071 #
1072 # If the condition evaluates to `false`, then this binding does not apply to
1073 # the current request. However, a different role binding might grant the same
1074 # role to one or more of the members in this binding.
1075 #
1076 # To learn which resources support conditions in their IAM policies, see the
1077 # [IAM
1078 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1079 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1080 # are documented at https://github.com/google/cel-spec.
1081 #
1082 # Example (Comparison):
1083 #
1084 # title: &quot;Summary size limit&quot;
1085 # description: &quot;Determines if a summary is less than 100 chars&quot;
1086 # expression: &quot;document.summary.size() &lt; 100&quot;
1087 #
1088 # Example (Equality):
1089 #
1090 # title: &quot;Requestor is owner&quot;
1091 # description: &quot;Determines if requestor is the document owner&quot;
1092 # expression: &quot;document.owner == request.auth.claims.email&quot;
1093 #
1094 # Example (Logic):
1095 #
1096 # title: &quot;Public documents&quot;
1097 # description: &quot;Determine whether the document should be publicly visible&quot;
1098 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1099 #
1100 # Example (Data Manipulation):
1101 #
1102 # title: &quot;Notification string&quot;
1103 # description: &quot;Create a notification string with a timestamp.&quot;
1104 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1105 #
1106 # The exact variables and functions that may be referenced within an expression
1107 # are determined by the service that evaluates it. See the service
1108 # documentation for additional information.
1109 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1110 # reporting, e.g. a file name and a position in the file.
1111 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1112 # its purpose. This can be used e.g. in UIs which allow to enter the
1113 # expression.
1114 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1115 # describes the expression, e.g. when hovered over it in a UI.
1116 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1117 # syntax.
1118 },
1119 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001120 # `members` can have the following values:
1121 #
1122 # * `allUsers`: A special identifier that represents anyone who is
1123 # on the internet; with or without a Google account.
1124 #
1125 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1126 # who is authenticated with a Google account or a service account.
1127 #
1128 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001129 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001130 #
1131 #
1132 # * `serviceAccount:{emailid}`: An email address that represents a service
1133 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1134 #
1135 # * `group:{emailid}`: An email address that represents a Google group.
1136 # For example, `admins@example.com`.
1137 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001138 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1139 # identifier) representing a user that has been recently deleted. For
1140 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1141 # recovered, this value reverts to `user:{emailid}` and the recovered user
1142 # retains the role in the binding.
1143 #
1144 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1145 # unique identifier) representing a service account that has been recently
1146 # deleted. For example,
1147 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1148 # If the service account is undeleted, this value reverts to
1149 # `serviceAccount:{emailid}` and the undeleted service account retains the
1150 # role in the binding.
1151 #
1152 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1153 # identifier) representing a Google group that has been recently
1154 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1155 # the group is recovered, this value reverts to `group:{emailid}` and the
1156 # recovered group retains the role in the binding.
1157 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001158 #
1159 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001160 # users of that domain. For example, `google.com` or `example.com`.
1161 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001162 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -07001163 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001164 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1165 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Takashi Matsuo06694102015-09-11 13:55:40 -07001166 },
1167 ],
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>