blob: cf4aa46e0e3776652660e634e96314e2e7a211e5 [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">
Thomas Coffee2f245372017-03-27 10:39:26 -0700100 <code><a href="#list">list(project, pageSize=None, pageToken=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
Dan O'Mearadd494642020-05-01 07:42:23 -0700121&lt;a href="https://cloud.google.com/pubsub/docs/admin#resource_names"&gt;
122resource 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
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800126`"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
127and 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
130must not start with `"goog"`. (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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 "labels": { # See &lt;a href="https://cloud.google.com/pubsub/docs/labels"&gt; Creating and
136 # managing labels&lt;/a&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700137 "a_key": "A String",
138 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700139 "name": "A String", # Required. The name of the topic. It must have the format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800140 # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
141 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
142 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
143 # signs (`%`). It must be between 3 and 255 characters in length, and it
144 # must not start with `"goog"`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700145 "messageStoragePolicy": { # Policy constraining the set of Google Cloud Platform regions where messages
146 # published to the topic may be stored. If not present, then no constraints
147 # are in effect.
148 "allowedPersistenceRegions": [ # A list of IDs of GCP regions where messages that are published to the topic
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700149 # may be persisted in storage. Messages published by publishers running in
150 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700151 # routed for storage in one of the allowed regions. An empty list means that
152 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 "A String",
154 ],
155 },
156 "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access
157 # to messages published on this topic.
158 #
159 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 "labels": { # See &lt;a href="https://cloud.google.com/pubsub/docs/labels"&gt; Creating and
172 # managing labels&lt;/a&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700173 "a_key": "A String",
174 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700175 "name": "A String", # Required. The name of the topic. It must have the format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800176 # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
177 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
178 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
179 # signs (`%`). It must be between 3 and 255 characters in length, and it
180 # must not start with `"goog"`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700181 "messageStoragePolicy": { # Policy constraining the set of Google Cloud Platform regions where messages
182 # published to the topic may be stored. If not present, then no constraints
183 # are in effect.
184 "allowedPersistenceRegions": [ # A list of IDs of GCP regions where messages that are published to the topic
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700185 # may be persisted in storage. Messages published by publishers running in
186 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700187 # routed for storage in one of the allowed regions. An empty list means that
188 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700189 "A String",
190 ],
191 },
192 "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access
193 # to messages published on this topic.
194 #
195 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700246 "labels": { # See &lt;a href="https://cloud.google.com/pubsub/docs/labels"&gt; Creating and
247 # managing labels&lt;/a&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 "a_key": "A String",
249 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700250 "name": "A String", # Required. The name of the topic. It must have the format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800251 # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
252 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
253 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
254 # signs (`%`). It must be between 3 and 255 characters in length, and it
255 # must not start with `"goog"`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700256 "messageStoragePolicy": { # Policy constraining the set of Google Cloud Platform regions where messages
257 # published to the topic may be stored. If not present, then no constraints
258 # are in effect.
259 "allowedPersistenceRegions": [ # A list of IDs of GCP regions where messages that are published to the topic
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700260 # may be persisted in storage. Messages published by publishers running in
261 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700262 # routed for storage in one of the allowed regions. An empty list means that
263 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264 "A String",
265 ],
266 },
267 "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access
268 # to messages published on this topic.
269 #
270 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700291 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800292 Allowed values
293 1 - v1 error format
294 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700295
296Returns:
297 An object of the form:
298
Dan O'Mearadd494642020-05-01 07:42:23 -0700299 { # An Identity and Access Management (IAM) policy, which specifies access
300 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800301 #
302 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700303 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
304 # `members` to a single `role`. Members can be user accounts, service accounts,
305 # Google groups, and domains (such as G Suite). A `role` is a named list of
306 # permissions; each `role` can be an IAM predefined role or a user-created
307 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800308 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700309 # Optionally, a `binding` can specify a `condition`, which is a logical
310 # expression that allows access to a resource only if the expression evaluates
311 # to `true`. A condition can add constraints based on attributes of the
312 # request, the resource, or both.
313 #
314 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800315 #
316 # {
317 # "bindings": [
318 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700319 # "role": "roles/resourcemanager.organizationAdmin",
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800320 # "members": [
321 # "user:mike@example.com",
322 # "group:admins@example.com",
323 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -0700324 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800325 # ]
326 # },
327 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700328 # "role": "roles/resourcemanager.organizationViewer",
329 # "members": ["user:eve@example.com"],
330 # "condition": {
331 # "title": "expirable access",
332 # "description": "Does not grant access after Sep 2020",
333 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
334 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800335 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700336 # ],
337 # "etag": "BwWWja0YfJA=",
338 # "version": 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800339 # }
340 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700341 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700342 #
343 # bindings:
344 # - members:
345 # - user:mike@example.com
346 # - group:admins@example.com
347 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700348 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
349 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700350 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700351 # - user:eve@example.com
352 # role: roles/resourcemanager.organizationViewer
353 # condition:
354 # title: expirable access
355 # description: Does not grant access after Sep 2020
356 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
357 # - etag: BwWWja0YfJA=
358 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700359 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800360 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700361 # [IAM documentation](https://cloud.google.com/iam/docs/).
362 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
363 # `condition` that determines how and when the `bindings` are applied. Each
364 # of the `bindings` must contain at least one member.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800365 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800366 "role": "A String", # Role that is assigned to `members`.
367 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800368 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
369 # `members` can have the following values:
370 #
371 # * `allUsers`: A special identifier that represents anyone who is
372 # on the internet; with or without a Google account.
373 #
374 # * `allAuthenticatedUsers`: A special identifier that represents anyone
375 # who is authenticated with a Google account or a service account.
376 #
377 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700378 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800379 #
380 #
381 # * `serviceAccount:{emailid}`: An email address that represents a service
382 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
383 #
384 # * `group:{emailid}`: An email address that represents a Google group.
385 # For example, `admins@example.com`.
386 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700387 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
388 # identifier) representing a user that has been recently deleted. For
389 # example, `alice@example.com?uid=123456789012345678901`. If the user is
390 # recovered, this value reverts to `user:{emailid}` and the recovered user
391 # retains the role in the binding.
392 #
393 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
394 # unique identifier) representing a service account that has been recently
395 # deleted. For example,
396 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
397 # If the service account is undeleted, this value reverts to
398 # `serviceAccount:{emailid}` and the undeleted service account retains the
399 # role in the binding.
400 #
401 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
402 # identifier) representing a Google group that has been recently
403 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
404 # the group is recovered, this value reverts to `group:{emailid}` and the
405 # recovered group retains the role in the binding.
406 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700407 #
408 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800409 # users of that domain. For example, `google.com` or `example.com`.
410 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700411 "A String",
412 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700413 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700414 # NOTE: An unsatisfied condition will not allow user access via current
415 # binding. Different bindings, including their conditions, are examined
416 # independently.
Dan O'Mearadd494642020-05-01 07:42:23 -0700417 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
418 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700419 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700420 # Example (Comparison):
421 #
422 # title: "Summary size limit"
423 # description: "Determines if a summary is less than 100 chars"
424 # expression: "document.summary.size() &lt; 100"
425 #
426 # Example (Equality):
427 #
428 # title: "Requestor is owner"
429 # description: "Determines if requestor is the document owner"
430 # expression: "document.owner == request.auth.claims.email"
431 #
432 # Example (Logic):
433 #
434 # title: "Public documents"
435 # description: "Determine whether the document should be publicly visible"
436 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
437 #
438 # Example (Data Manipulation):
439 #
440 # title: "Notification string"
441 # description: "Create a notification string with a timestamp."
442 # expression: "'New message received at ' + string(document.create_time)"
443 #
444 # The exact variables and functions that may be referenced within an expression
445 # are determined by the service that evaluates it. See the service
446 # documentation for additional information.
447 "description": "A String", # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700448 # describes the expression, e.g. when hovered over it in a UI.
Dan O'Mearadd494642020-05-01 07:42:23 -0700449 "expression": "A String", # Textual representation of an expression in Common Expression Language
450 # syntax.
451 "location": "A String", # Optional. String indicating the location of the expression for error
452 # reporting, e.g. a file name and a position in the file.
453 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700454 # its purpose. This can be used e.g. in UIs which allow to enter the
455 # expression.
456 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700457 },
458 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800459 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
460 # prevent simultaneous updates of a policy from overwriting each other.
461 # It is strongly suggested that systems make use of the `etag` in the
462 # read-modify-write cycle to perform policy updates in order to avoid race
463 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
464 # systems are expected to put that etag in the request to `setIamPolicy` to
465 # ensure that their change will be applied to the same version of the policy.
466 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700467 # **Important:** If you use IAM Conditions, you must include the `etag` field
468 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
469 # you to overwrite a version `3` policy with a version `1` policy, and all of
470 # the conditions in the version `3` policy are lost.
471 "version": 42, # Specifies the format of the policy.
472 #
473 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
474 # are rejected.
475 #
476 # Any operation that affects conditional role bindings must specify version
477 # `3`. This requirement applies to the following operations:
478 #
479 # * Getting a policy that includes a conditional role binding
480 # * Adding a conditional role binding to a policy
481 # * Changing a conditional role binding in a policy
482 # * Removing any role binding, with or without a condition, from a policy
483 # that includes conditions
484 #
485 # **Important:** If you use IAM Conditions, you must include the `etag` field
486 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
487 # you to overwrite a version `3` policy with a version `1` policy, and all of
488 # the conditions in the version `3` policy are lost.
489 #
490 # If a policy does not include any conditions, operations on that policy may
491 # specify any valid version or leave the field unset.
Takashi Matsuo06694102015-09-11 13:55:40 -0700492 }</pre>
493</div>
494
495<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700496 <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700497 <pre>Lists matching topics.
498
499Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700500 project: string, Required. The name of the project in which to list topics.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700501Format is `projects/{project-id}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700502 pageSize: integer, Maximum number of topics to return.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800503 pageToken: string, The value returned by the last `ListTopicsResponse`; indicates that this is
504a continuation of a prior `ListTopics` call, and that the system should
505return the next page of data.
Takashi Matsuo06694102015-09-11 13:55:40 -0700506 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800507 Allowed values
508 1 - v1 error format
509 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700510
511Returns:
512 An object of the form:
513
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800514 { # Response for the `ListTopics` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800515 "nextPageToken": "A String", # If not empty, indicates that there may be more topics that match the
516 # request; this value should be passed in a new `ListTopicsRequest`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700517 "topics": [ # The resulting topics.
518 { # A topic resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700519 "labels": { # See &lt;a href="https://cloud.google.com/pubsub/docs/labels"&gt; Creating and
520 # managing labels&lt;/a&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700521 "a_key": "A String",
522 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700523 "name": "A String", # Required. The name of the topic. It must have the format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800524 # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
525 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
526 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
527 # signs (`%`). It must be between 3 and 255 characters in length, and it
528 # must not start with `"goog"`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700529 "messageStoragePolicy": { # Policy constraining the set of Google Cloud Platform regions where messages
530 # published to the topic may be stored. If not present, then no constraints
531 # are in effect.
532 "allowedPersistenceRegions": [ # A list of IDs of GCP regions where messages that are published to the topic
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 # may be persisted in storage. Messages published by publishers running in
534 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700535 # routed for storage in one of the allowed regions. An empty list means that
536 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700537 "A String",
538 ],
539 },
540 "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access
541 # to messages published on this topic.
542 #
543 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700544 },
545 ],
546 }</pre>
547</div>
548
549<div class="method">
550 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
551 <pre>Retrieves the next page of results.
552
553Args:
554 previous_request: The request for the previous page. (required)
555 previous_response: The response from the request for the previous page. (required)
556
557Returns:
558 A request object that you can call 'execute()' on to request the next
559 page. Returns None if there are no more items in the collection.
560 </pre>
561</div>
562
563<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700564 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700565 <pre>Updates an existing topic. Note that certain properties of a
566topic are not modifiable.
567
568Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700569 name: string, Required. The name of the topic. It must have the format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700570`"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
571and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
572underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
573signs (`%`). It must be between 3 and 255 characters in length, and it
574must not start with `"goog"`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700575 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700576 The object takes the form of:
577
578{ # Request for the UpdateTopic method.
Dan O'Mearadd494642020-05-01 07:42:23 -0700579 "topic": { # A topic resource. # Required. The updated topic object.
580 "labels": { # See &lt;a href="https://cloud.google.com/pubsub/docs/labels"&gt; Creating and
581 # managing labels&lt;/a&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700582 "a_key": "A String",
583 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700584 "name": "A String", # Required. The name of the topic. It must have the format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700585 # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
586 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
587 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
588 # signs (`%`). It must be between 3 and 255 characters in length, and it
589 # must not start with `"goog"`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700590 "messageStoragePolicy": { # Policy constraining the set of Google Cloud Platform regions where messages
591 # published to the topic may be stored. If not present, then no constraints
592 # are in effect.
593 "allowedPersistenceRegions": [ # A list of IDs of GCP regions where messages that are published to the topic
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700594 # may be persisted in storage. Messages published by publishers running in
595 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700596 # routed for storage in one of the allowed regions. An empty list means that
597 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700598 "A String",
599 ],
600 },
601 "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access
602 # to messages published on this topic.
603 #
604 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
605 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700606 "updateMask": "A String", # Required. Indicates which fields in the provided topic to update. Must be specified
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700607 # and non-empty. Note that if `update_mask` contains
Dan O'Mearadd494642020-05-01 07:42:23 -0700608 # "message_storage_policy" but the `message_storage_policy` is not set in
609 # the `topic` provided above, then the updated value is determined by the
610 # policy configured at the project or organization level.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700611 }
612
613 x__xgafv: string, V1 error format.
614 Allowed values
615 1 - v1 error format
616 2 - v2 error format
617
618Returns:
619 An object of the form:
620
621 { # A topic resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700622 "labels": { # See &lt;a href="https://cloud.google.com/pubsub/docs/labels"&gt; Creating and
623 # managing labels&lt;/a&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700624 "a_key": "A String",
625 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700626 "name": "A String", # Required. The name of the topic. It must have the format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700627 # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
628 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
629 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
630 # signs (`%`). It must be between 3 and 255 characters in length, and it
631 # must not start with `"goog"`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700632 "messageStoragePolicy": { # Policy constraining the set of Google Cloud Platform regions where messages
633 # published to the topic may be stored. If not present, then no constraints
634 # are in effect.
635 "allowedPersistenceRegions": [ # A list of IDs of GCP regions where messages that are published to the topic
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700636 # may be persisted in storage. Messages published by publishers running in
637 # non-allowed GCP regions (or running outside of GCP altogether) will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700638 # routed for storage in one of the allowed regions. An empty list means that
639 # no regions are allowed, and is not a valid configuration.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700640 "A String",
641 ],
642 },
643 "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access
644 # to messages published on this topic.
645 #
646 # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
647 }</pre>
648</div>
649
650<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700651 <code class="details" id="publish">publish(topic, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800652 <pre>Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700653does not exist.
Takashi Matsuo06694102015-09-11 13:55:40 -0700654
655Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700656 topic: string, Required. The messages in the request will be published on this topic.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800657Format is `projects/{project}/topics/{topic}`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700658 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700659 The object takes the form of:
660
661{ # Request for the Publish method.
Dan O'Mearadd494642020-05-01 07:42:23 -0700662 "messages": [ # Required. The messages to publish.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700663 { # A message that is published by publishers and consumed by subscribers. The
664 # message must contain either a non-empty data field or at least one attribute.
665 # Note that client libraries represent this object differently
666 # depending on the language. See the corresponding
Dan O'Mearadd494642020-05-01 07:42:23 -0700667 # &lt;a href="https://cloud.google.com/pubsub/docs/reference/libraries"&gt;client
668 # library documentation&lt;/a&gt; for more information. See
669 # &lt;a href="https://cloud.google.com/pubsub/quotas"&gt;Quotas and limits&lt;/a&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700670 # for more information about message limits.
Dan O'Mearadd494642020-05-01 07:42:23 -0700671 "attributes": { # Attributes for this message. If this field is empty, the message must
672 # contain non-empty data.
Takashi Matsuo06694102015-09-11 13:55:40 -0700673 "a_key": "A String",
674 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700675 "data": "A String", # The message data field. If this field is empty, the message must contain
676 # at least one attribute.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800677 "publishTime": "A String", # The time at which the message was published, populated by the server when
678 # it receives the `Publish` call. It must not be populated by the
679 # publisher in a `Publish` call.
680 "messageId": "A String", # ID of this message, assigned by the server when the message is published.
681 # Guaranteed to be unique within the topic. This value may be read by a
682 # subscriber that receives a `PubsubMessage` via a `Pull` call or a push
683 # delivery. It must not be populated by the publisher in a `Publish` call.
Takashi Matsuo06694102015-09-11 13:55:40 -0700684 },
685 ],
686 }
687
688 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800689 Allowed values
690 1 - v1 error format
691 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700692
693Returns:
694 An object of the form:
695
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800696 { # Response for the `Publish` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800697 "messageIds": [ # The server-assigned ID of each published message, in the same order as
698 # the messages in the request. IDs are guaranteed to be unique within
699 # the topic.
Takashi Matsuo06694102015-09-11 13:55:40 -0700700 "A String",
701 ],
702 }</pre>
703</div>
704
705<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700706 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800707 <pre>Sets the access control policy on the specified resource. Replaces any
708existing policy.
Takashi Matsuo06694102015-09-11 13:55:40 -0700709
Dan O'Mearadd494642020-05-01 07:42:23 -0700710Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
711
Takashi Matsuo06694102015-09-11 13:55:40 -0700712Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800713 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700714See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700715 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700716 The object takes the form of:
717
718{ # Request message for `SetIamPolicy` method.
Dan O'Mearadd494642020-05-01 07:42:23 -0700719 "policy": { # 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 -0800720 # the policy is limited to a few 10s of KB. An empty policy is a
721 # valid policy but certain Cloud Platform services (such as Projects)
722 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -0700723 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800724 #
725 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700726 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
727 # `members` to a single `role`. Members can be user accounts, service accounts,
728 # Google groups, and domains (such as G Suite). A `role` is a named list of
729 # permissions; each `role` can be an IAM predefined role or a user-created
730 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800731 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700732 # Optionally, a `binding` can specify a `condition`, which is a logical
733 # expression that allows access to a resource only if the expression evaluates
734 # to `true`. A condition can add constraints based on attributes of the
735 # request, the resource, or both.
736 #
737 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800738 #
739 # {
740 # "bindings": [
741 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700742 # "role": "roles/resourcemanager.organizationAdmin",
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800743 # "members": [
744 # "user:mike@example.com",
745 # "group:admins@example.com",
746 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -0700747 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800748 # ]
749 # },
750 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700751 # "role": "roles/resourcemanager.organizationViewer",
752 # "members": ["user:eve@example.com"],
753 # "condition": {
754 # "title": "expirable access",
755 # "description": "Does not grant access after Sep 2020",
756 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
757 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800758 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700759 # ],
760 # "etag": "BwWWja0YfJA=",
761 # "version": 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800762 # }
763 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700764 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700765 #
766 # bindings:
767 # - members:
768 # - user:mike@example.com
769 # - group:admins@example.com
770 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700771 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
772 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700773 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700774 # - user:eve@example.com
775 # role: roles/resourcemanager.organizationViewer
776 # condition:
777 # title: expirable access
778 # description: Does not grant access after Sep 2020
779 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
780 # - etag: BwWWja0YfJA=
781 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700782 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800783 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700784 # [IAM documentation](https://cloud.google.com/iam/docs/).
785 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
786 # `condition` that determines how and when the `bindings` are applied. Each
787 # of the `bindings` must contain at least one member.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800788 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800789 "role": "A String", # Role that is assigned to `members`.
790 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800791 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
792 # `members` can have the following values:
793 #
794 # * `allUsers`: A special identifier that represents anyone who is
795 # on the internet; with or without a Google account.
796 #
797 # * `allAuthenticatedUsers`: A special identifier that represents anyone
798 # who is authenticated with a Google account or a service account.
799 #
800 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700801 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800802 #
803 #
804 # * `serviceAccount:{emailid}`: An email address that represents a service
805 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
806 #
807 # * `group:{emailid}`: An email address that represents a Google group.
808 # For example, `admins@example.com`.
809 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700810 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
811 # identifier) representing a user that has been recently deleted. For
812 # example, `alice@example.com?uid=123456789012345678901`. If the user is
813 # recovered, this value reverts to `user:{emailid}` and the recovered user
814 # retains the role in the binding.
815 #
816 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
817 # unique identifier) representing a service account that has been recently
818 # deleted. For example,
819 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
820 # If the service account is undeleted, this value reverts to
821 # `serviceAccount:{emailid}` and the undeleted service account retains the
822 # role in the binding.
823 #
824 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
825 # identifier) representing a Google group that has been recently
826 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
827 # the group is recovered, this value reverts to `group:{emailid}` and the
828 # recovered group retains the role in the binding.
829 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700830 #
831 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800832 # users of that domain. For example, `google.com` or `example.com`.
833 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700834 "A String",
835 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700836 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700837 # NOTE: An unsatisfied condition will not allow user access via current
838 # binding. Different bindings, including their conditions, are examined
839 # independently.
Dan O'Mearadd494642020-05-01 07:42:23 -0700840 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
841 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700842 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700843 # Example (Comparison):
844 #
845 # title: "Summary size limit"
846 # description: "Determines if a summary is less than 100 chars"
847 # expression: "document.summary.size() &lt; 100"
848 #
849 # Example (Equality):
850 #
851 # title: "Requestor is owner"
852 # description: "Determines if requestor is the document owner"
853 # expression: "document.owner == request.auth.claims.email"
854 #
855 # Example (Logic):
856 #
857 # title: "Public documents"
858 # description: "Determine whether the document should be publicly visible"
859 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
860 #
861 # Example (Data Manipulation):
862 #
863 # title: "Notification string"
864 # description: "Create a notification string with a timestamp."
865 # expression: "'New message received at ' + string(document.create_time)"
866 #
867 # The exact variables and functions that may be referenced within an expression
868 # are determined by the service that evaluates it. See the service
869 # documentation for additional information.
870 "description": "A String", # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700871 # describes the expression, e.g. when hovered over it in a UI.
Dan O'Mearadd494642020-05-01 07:42:23 -0700872 "expression": "A String", # Textual representation of an expression in Common Expression Language
873 # syntax.
874 "location": "A String", # Optional. String indicating the location of the expression for error
875 # reporting, e.g. a file name and a position in the file.
876 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700877 # its purpose. This can be used e.g. in UIs which allow to enter the
878 # expression.
879 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700880 },
881 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800882 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
883 # prevent simultaneous updates of a policy from overwriting each other.
884 # It is strongly suggested that systems make use of the `etag` in the
885 # read-modify-write cycle to perform policy updates in order to avoid race
886 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
887 # systems are expected to put that etag in the request to `setIamPolicy` to
888 # ensure that their change will be applied to the same version of the policy.
889 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700890 # **Important:** If you use IAM Conditions, you must include the `etag` field
891 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
892 # you to overwrite a version `3` policy with a version `1` policy, and all of
893 # the conditions in the version `3` policy are lost.
894 "version": 42, # Specifies the format of the policy.
895 #
896 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
897 # are rejected.
898 #
899 # Any operation that affects conditional role bindings must specify version
900 # `3`. This requirement applies to the following operations:
901 #
902 # * Getting a policy that includes a conditional role binding
903 # * Adding a conditional role binding to a policy
904 # * Changing a conditional role binding in a policy
905 # * Removing any role binding, with or without a condition, from a policy
906 # that includes conditions
907 #
908 # **Important:** If you use IAM Conditions, you must include the `etag` field
909 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
910 # you to overwrite a version `3` policy with a version `1` policy, and all of
911 # the conditions in the version `3` policy are lost.
912 #
913 # If a policy does not include any conditions, operations on that policy may
914 # specify any valid version or leave the field unset.
Takashi Matsuo06694102015-09-11 13:55:40 -0700915 },
916 }
917
918 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800919 Allowed values
920 1 - v1 error format
921 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700922
923Returns:
924 An object of the form:
925
Dan O'Mearadd494642020-05-01 07:42:23 -0700926 { # An Identity and Access Management (IAM) policy, which specifies access
927 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800928 #
929 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700930 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
931 # `members` to a single `role`. Members can be user accounts, service accounts,
932 # Google groups, and domains (such as G Suite). A `role` is a named list of
933 # permissions; each `role` can be an IAM predefined role or a user-created
934 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800935 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700936 # Optionally, a `binding` can specify a `condition`, which is a logical
937 # expression that allows access to a resource only if the expression evaluates
938 # to `true`. A condition can add constraints based on attributes of the
939 # request, the resource, or both.
940 #
941 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800942 #
943 # {
944 # "bindings": [
945 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700946 # "role": "roles/resourcemanager.organizationAdmin",
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800947 # "members": [
948 # "user:mike@example.com",
949 # "group:admins@example.com",
950 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -0700951 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800952 # ]
953 # },
954 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700955 # "role": "roles/resourcemanager.organizationViewer",
956 # "members": ["user:eve@example.com"],
957 # "condition": {
958 # "title": "expirable access",
959 # "description": "Does not grant access after Sep 2020",
960 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
961 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800962 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700963 # ],
964 # "etag": "BwWWja0YfJA=",
965 # "version": 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800966 # }
967 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700968 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700969 #
970 # bindings:
971 # - members:
972 # - user:mike@example.com
973 # - group:admins@example.com
974 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700975 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
976 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700977 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700978 # - user:eve@example.com
979 # role: roles/resourcemanager.organizationViewer
980 # condition:
981 # title: expirable access
982 # description: Does not grant access after Sep 2020
983 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
984 # - etag: BwWWja0YfJA=
985 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700986 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800987 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700988 # [IAM documentation](https://cloud.google.com/iam/docs/).
989 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
990 # `condition` that determines how and when the `bindings` are applied. Each
991 # of the `bindings` must contain at least one member.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800992 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800993 "role": "A String", # Role that is assigned to `members`.
994 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800995 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
996 # `members` can have the following values:
997 #
998 # * `allUsers`: A special identifier that represents anyone who is
999 # on the internet; with or without a Google account.
1000 #
1001 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1002 # who is authenticated with a Google account or a service account.
1003 #
1004 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001005 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001006 #
1007 #
1008 # * `serviceAccount:{emailid}`: An email address that represents a service
1009 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1010 #
1011 # * `group:{emailid}`: An email address that represents a Google group.
1012 # For example, `admins@example.com`.
1013 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001014 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1015 # identifier) representing a user that has been recently deleted. For
1016 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1017 # recovered, this value reverts to `user:{emailid}` and the recovered user
1018 # retains the role in the binding.
1019 #
1020 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1021 # unique identifier) representing a service account that has been recently
1022 # deleted. For example,
1023 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1024 # If the service account is undeleted, this value reverts to
1025 # `serviceAccount:{emailid}` and the undeleted service account retains the
1026 # role in the binding.
1027 #
1028 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1029 # identifier) representing a Google group that has been recently
1030 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1031 # the group is recovered, this value reverts to `group:{emailid}` and the
1032 # recovered group retains the role in the binding.
1033 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001034 #
1035 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001036 # users of that domain. For example, `google.com` or `example.com`.
1037 #
Takashi Matsuo06694102015-09-11 13:55:40 -07001038 "A String",
1039 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001040 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001041 # NOTE: An unsatisfied condition will not allow user access via current
1042 # binding. Different bindings, including their conditions, are examined
1043 # independently.
Dan O'Mearadd494642020-05-01 07:42:23 -07001044 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1045 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001046 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001047 # Example (Comparison):
1048 #
1049 # title: "Summary size limit"
1050 # description: "Determines if a summary is less than 100 chars"
1051 # expression: "document.summary.size() &lt; 100"
1052 #
1053 # Example (Equality):
1054 #
1055 # title: "Requestor is owner"
1056 # description: "Determines if requestor is the document owner"
1057 # expression: "document.owner == request.auth.claims.email"
1058 #
1059 # Example (Logic):
1060 #
1061 # title: "Public documents"
1062 # description: "Determine whether the document should be publicly visible"
1063 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1064 #
1065 # Example (Data Manipulation):
1066 #
1067 # title: "Notification string"
1068 # description: "Create a notification string with a timestamp."
1069 # expression: "'New message received at ' + string(document.create_time)"
1070 #
1071 # The exact variables and functions that may be referenced within an expression
1072 # are determined by the service that evaluates it. See the service
1073 # documentation for additional information.
1074 "description": "A String", # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001075 # describes the expression, e.g. when hovered over it in a UI.
Dan O'Mearadd494642020-05-01 07:42:23 -07001076 "expression": "A String", # Textual representation of an expression in Common Expression Language
1077 # syntax.
1078 "location": "A String", # Optional. String indicating the location of the expression for error
1079 # reporting, e.g. a file name and a position in the file.
1080 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001081 # its purpose. This can be used e.g. in UIs which allow to enter the
1082 # expression.
1083 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001084 },
1085 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001086 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
1087 # prevent simultaneous updates of a policy from overwriting each other.
1088 # It is strongly suggested that systems make use of the `etag` in the
1089 # read-modify-write cycle to perform policy updates in order to avoid race
1090 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1091 # systems are expected to put that etag in the request to `setIamPolicy` to
1092 # ensure that their change will be applied to the same version of the policy.
1093 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001094 # **Important:** If you use IAM Conditions, you must include the `etag` field
1095 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1096 # you to overwrite a version `3` policy with a version `1` policy, and all of
1097 # the conditions in the version `3` policy are lost.
1098 "version": 42, # Specifies the format of the policy.
1099 #
1100 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1101 # are rejected.
1102 #
1103 # Any operation that affects conditional role bindings must specify version
1104 # `3`. This requirement applies to the following operations:
1105 #
1106 # * Getting a policy that includes a conditional role binding
1107 # * Adding a conditional role binding to a policy
1108 # * Changing a conditional role binding in a policy
1109 # * Removing any role binding, with or without a condition, from a policy
1110 # that includes conditions
1111 #
1112 # **Important:** If you use IAM Conditions, you must include the `etag` field
1113 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1114 # you to overwrite a version `3` policy with a version `1` policy, and all of
1115 # the conditions in the version `3` policy are lost.
1116 #
1117 # If a policy does not include any conditions, operations on that policy may
1118 # specify any valid version or leave the field unset.
Takashi Matsuo06694102015-09-11 13:55:40 -07001119 }</pre>
1120</div>
1121
1122<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001123 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -07001124 <pre>Returns permissions that a caller has on the specified resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001125If the resource does not exist, this will return an empty set of
1126permissions, not a NOT_FOUND error.
Takashi Matsuo06694102015-09-11 13:55:40 -07001127
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001128Note: This operation is designed to be used for building permission-aware
1129UIs and command-line tools, not for authorization checking. This operation
1130may "fail open" without warning.
1131
Takashi Matsuo06694102015-09-11 13:55:40 -07001132Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001133 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001134See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001135 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07001136 The object takes the form of:
1137
1138{ # Request message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001139 "permissions": [ # The set of permissions to check for the `resource`. Permissions with
1140 # wildcards (such as '*' or 'storage.*') are not allowed. For more
1141 # information see
1142 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Takashi Matsuo06694102015-09-11 13:55:40 -07001143 "A String",
1144 ],
1145 }
1146
1147 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001148 Allowed values
1149 1 - v1 error format
1150 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -07001151
1152Returns:
1153 An object of the form:
1154
1155 { # Response message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001156 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
1157 # allowed.
Takashi Matsuo06694102015-09-11 13:55:40 -07001158 "A String",
1159 ],
1160 }</pre>
1161</div>
1162
1163</body></html>