blob: 31102941ae606e0e2a8810cc550ecdce746fa08a [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
75<h1><a href="pubsub_v1.html">Google Cloud Pub/Sub API</a> . <a href="pubsub_v1.projects.html">projects</a> . <a href="pubsub_v1.projects.topics.html">topics</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="pubsub_v1.projects.topics.subscriptions.html">subscriptions()</a></code>
79</p>
80<p class="firstline">Returns the subscriptions Resource.</p>
81
82<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080083 <code><a href="#create">create(name=None, body, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070084<p class="firstline">Creates the given topic with the given name.</p>
85<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080086 <code><a href="#delete">delete(topic=None, x__xgafv=None)</a></code></p>
87<p class="firstline">Deletes the topic with the given name. Returns `NOT_FOUND` if the topic</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070088<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080089 <code><a href="#get">get(topic=None, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070090<p class="firstline">Gets the configuration of a topic.</p>
91<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080092 <code><a href="#getIamPolicy">getIamPolicy(resource=None, x__xgafv=None)</a></code></p>
93<p class="firstline">Gets the access control policy for a resource.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070094<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080095 <code><a href="#list">list(project=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070096<p class="firstline">Lists matching topics.</p>
97<p class="toc_element">
98 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
99<p class="firstline">Retrieves the next page of results.</p>
100<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800101 <code><a href="#publish">publish(topic=None, body, x__xgafv=None)</a></code></p>
102<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 -0700103<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800104 <code><a href="#setIamPolicy">setIamPolicy(resource=None, body, x__xgafv=None)</a></code></p>
105<p class="firstline">Sets the access control policy on the specified resource. Replaces any</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700106<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800107 <code><a href="#testIamPermissions">testIamPermissions(resource=None, body, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700108<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
109<h3>Method Details</h3>
110<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800111 <code class="details" id="create">create(name=None, body, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700112 <pre>Creates the given topic with the given name.
113
114Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800115 name: string, The name of the topic. It must have the format
116`"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
117and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
118underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
119signs (`%`). It must be between 3 and 255 characters in length, and it
120must not start with `"goog"`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700121 body: object, The request body. (required)
122 The object takes the form of:
123
124{ # A topic resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800125 "name": "A String", # The name of the topic. It must have the format
126 # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
127 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
128 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
129 # signs (`%`). It must be between 3 and 255 characters in length, and it
130 # must not start with `"goog"`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700131}
132
133 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800134 Allowed values
135 1 - v1 error format
136 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700137
138Returns:
139 An object of the form:
140
141 { # A topic resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800142 "name": "A String", # The name of the topic. It must have the format
143 # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
144 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
145 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
146 # signs (`%`). It must be between 3 and 255 characters in length, and it
147 # must not start with `"goog"`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700148 }</pre>
149</div>
150
151<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800152 <code class="details" id="delete">delete(topic=None, x__xgafv=None)</code>
153 <pre>Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
154does not exist. After a topic is deleted, a new topic may be created with
155the same name; this is an entirely new topic with none of the old
156configuration or subscriptions. Existing subscriptions to this topic are
157not deleted, but their `topic` field is set to `_deleted-topic_`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700158
159Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800160 topic: string, Name of the topic to delete.
161Format is `projects/{project}/topics/{topic}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700162 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
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800170 { # A generic empty message that you can re-use to avoid defining duplicated
171 # empty messages in your APIs. A typical example is to use it as the request
172 # or the response type of an API method. For instance:
173 #
174 # service Foo {
175 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
176 # }
177 #
178 # The JSON representation for `Empty` is empty JSON object `{}`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700179 }</pre>
180</div>
181
182<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800183 <code class="details" id="get">get(topic=None, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700184 <pre>Gets the configuration of a topic.
185
186Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800187 topic: string, The name of the topic to get.
188Format is `projects/{project}/topics/{topic}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700189 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800190 Allowed values
191 1 - v1 error format
192 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700193
194Returns:
195 An object of the form:
196
197 { # A topic resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800198 "name": "A String", # The name of the topic. It must have the format
199 # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
200 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
201 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
202 # signs (`%`). It must be between 3 and 255 characters in length, and it
203 # must not start with `"goog"`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700204 }</pre>
205</div>
206
207<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800208 <code class="details" id="getIamPolicy">getIamPolicy(resource=None, x__xgafv=None)</code>
209 <pre>Gets the access control policy for a resource.
210Returns an empty policy if the resource exists and does not have a policy
211set.
Takashi Matsuo06694102015-09-11 13:55:40 -0700212
213Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800214 resource: string, REQUIRED: The resource for which the policy is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700215See the operation documentation for the appropriate value for this field. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700216 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800217 Allowed values
218 1 - v1 error format
219 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700220
221Returns:
222 An object of the form:
223
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800224 { # Defines an Identity and Access Management (IAM) policy. It is used to
225 # specify access control policies for Cloud Platform resources.
226 #
227 #
228 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
229 # `members` to a `role`, where the members can be user accounts, Google groups,
230 # Google domains, and service accounts. A `role` is a named list of permissions
231 # defined by IAM.
232 #
233 # **Example**
234 #
235 # {
236 # "bindings": [
237 # {
238 # "role": "roles/owner",
239 # "members": [
240 # "user:mike@example.com",
241 # "group:admins@example.com",
242 # "domain:google.com",
243 # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
244 # ]
245 # },
246 # {
247 # "role": "roles/viewer",
248 # "members": ["user:sean@example.com"]
249 # }
250 # ]
251 # }
252 #
253 # For a description of IAM and its features, see the
254 # [IAM developer's guide](https://cloud.google.com/iam).
255 "bindings": [ # Associates a list of `members` to a `role`.
256 # Multiple `bindings` must not be specified for the same `role`.
257 # `bindings` with no members will result in an error.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800258 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800259 "role": "A String", # Role that is assigned to `members`.
260 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
261 # Required
262 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
263 # `members` can have the following values:
264 #
265 # * `allUsers`: A special identifier that represents anyone who is
266 # on the internet; with or without a Google account.
267 #
268 # * `allAuthenticatedUsers`: A special identifier that represents anyone
269 # who is authenticated with a Google account or a service account.
270 #
271 # * `user:{emailid}`: An email address that represents a specific Google
272 # account. For example, `alice@gmail.com` or `joe@example.com`.
273 #
274 #
275 # * `serviceAccount:{emailid}`: An email address that represents a service
276 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
277 #
278 # * `group:{emailid}`: An email address that represents a Google group.
279 # For example, `admins@example.com`.
280 #
281 # * `domain:{domain}`: A Google Apps domain name that represents all the
282 # users of that domain. For example, `google.com` or `example.com`.
283 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700284 "A String",
285 ],
286 },
287 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800288 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
289 # prevent simultaneous updates of a policy from overwriting each other.
290 # It is strongly suggested that systems make use of the `etag` in the
291 # read-modify-write cycle to perform policy updates in order to avoid race
292 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
293 # systems are expected to put that etag in the request to `setIamPolicy` to
294 # ensure that their change will be applied to the same version of the policy.
295 #
296 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
297 # policy is overwritten blindly.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800298 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700299 }</pre>
300</div>
301
302<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800303 <code class="details" id="list">list(project=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700304 <pre>Lists matching topics.
305
306Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800307 project: string, The name of the cloud project that topics belong to.
308Format is `projects/{project}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700309 pageSize: integer, Maximum number of topics to return.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800310 pageToken: string, The value returned by the last `ListTopicsResponse`; indicates that this is
311a continuation of a prior `ListTopics` call, and that the system should
312return the next page of data.
Takashi Matsuo06694102015-09-11 13:55:40 -0700313 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800314 Allowed values
315 1 - v1 error format
316 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700317
318Returns:
319 An object of the form:
320
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800321 { # Response for the `ListTopics` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800322 "nextPageToken": "A String", # If not empty, indicates that there may be more topics that match the
323 # request; this value should be passed in a new `ListTopicsRequest`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700324 "topics": [ # The resulting topics.
325 { # A topic resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800326 "name": "A String", # The name of the topic. It must have the format
327 # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
328 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
329 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
330 # signs (`%`). It must be between 3 and 255 characters in length, and it
331 # must not start with `"goog"`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700332 },
333 ],
334 }</pre>
335</div>
336
337<div class="method">
338 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
339 <pre>Retrieves the next page of results.
340
341Args:
342 previous_request: The request for the previous page. (required)
343 previous_response: The response from the request for the previous page. (required)
344
345Returns:
346 A request object that you can call 'execute()' on to request the next
347 page. Returns None if there are no more items in the collection.
348 </pre>
349</div>
350
351<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800352 <code class="details" id="publish">publish(topic=None, body, x__xgafv=None)</code>
353 <pre>Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
354does not exist. The message payload must not be empty; it must contain
355 either a non-empty data field, or at least one attribute.
Takashi Matsuo06694102015-09-11 13:55:40 -0700356
357Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800358 topic: string, The messages in the request will be published on this topic.
359Format is `projects/{project}/topics/{topic}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700360 body: object, The request body. (required)
361 The object takes the form of:
362
363{ # Request for the Publish method.
364 "messages": [ # The messages to publish.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800365 { # A message data and its attributes. The message payload must not be empty;
366 # it must contain either a non-empty data field, or at least one attribute.
Takashi Matsuo06694102015-09-11 13:55:40 -0700367 "attributes": { # Optional attributes for this message.
368 "a_key": "A String",
369 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800370 "data": "A String", # The message payload.
371 "publishTime": "A String", # The time at which the message was published, populated by the server when
372 # it receives the `Publish` call. It must not be populated by the
373 # publisher in a `Publish` call.
374 "messageId": "A String", # ID of this message, assigned by the server when the message is published.
375 # Guaranteed to be unique within the topic. This value may be read by a
376 # subscriber that receives a `PubsubMessage` via a `Pull` call or a push
377 # delivery. It must not be populated by the publisher in a `Publish` call.
Takashi Matsuo06694102015-09-11 13:55:40 -0700378 },
379 ],
380 }
381
382 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800383 Allowed values
384 1 - v1 error format
385 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700386
387Returns:
388 An object of the form:
389
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800390 { # Response for the `Publish` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800391 "messageIds": [ # The server-assigned ID of each published message, in the same order as
392 # the messages in the request. IDs are guaranteed to be unique within
393 # the topic.
Takashi Matsuo06694102015-09-11 13:55:40 -0700394 "A String",
395 ],
396 }</pre>
397</div>
398
399<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800400 <code class="details" id="setIamPolicy">setIamPolicy(resource=None, body, x__xgafv=None)</code>
401 <pre>Sets the access control policy on the specified resource. Replaces any
402existing policy.
Takashi Matsuo06694102015-09-11 13:55:40 -0700403
404Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800405 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700406See the operation documentation for the appropriate value for this field. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700407 body: object, The request body. (required)
408 The object takes the form of:
409
410{ # Request message for `SetIamPolicy` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800411 "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to # REQUIRED: The complete policy to be applied to the `resource`. The size of
412 # the policy is limited to a few 10s of KB. An empty policy is a
413 # valid policy but certain Cloud Platform services (such as Projects)
414 # might reject them.
415 # specify access control policies for Cloud Platform resources.
416 #
417 #
418 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
419 # `members` to a `role`, where the members can be user accounts, Google groups,
420 # Google domains, and service accounts. A `role` is a named list of permissions
421 # defined by IAM.
422 #
423 # **Example**
424 #
425 # {
426 # "bindings": [
427 # {
428 # "role": "roles/owner",
429 # "members": [
430 # "user:mike@example.com",
431 # "group:admins@example.com",
432 # "domain:google.com",
433 # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
434 # ]
435 # },
436 # {
437 # "role": "roles/viewer",
438 # "members": ["user:sean@example.com"]
439 # }
440 # ]
441 # }
442 #
443 # For a description of IAM and its features, see the
444 # [IAM developer's guide](https://cloud.google.com/iam).
445 "bindings": [ # Associates a list of `members` to a `role`.
446 # Multiple `bindings` must not be specified for the same `role`.
447 # `bindings` with no members will result in an error.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800448 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800449 "role": "A String", # Role that is assigned to `members`.
450 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
451 # Required
452 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
453 # `members` can have the following values:
454 #
455 # * `allUsers`: A special identifier that represents anyone who is
456 # on the internet; with or without a Google account.
457 #
458 # * `allAuthenticatedUsers`: A special identifier that represents anyone
459 # who is authenticated with a Google account or a service account.
460 #
461 # * `user:{emailid}`: An email address that represents a specific Google
462 # account. For example, `alice@gmail.com` or `joe@example.com`.
463 #
464 #
465 # * `serviceAccount:{emailid}`: An email address that represents a service
466 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
467 #
468 # * `group:{emailid}`: An email address that represents a Google group.
469 # For example, `admins@example.com`.
470 #
471 # * `domain:{domain}`: A Google Apps domain name that represents all the
472 # users of that domain. For example, `google.com` or `example.com`.
473 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700474 "A String",
475 ],
476 },
477 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800478 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
479 # prevent simultaneous updates of a policy from overwriting each other.
480 # It is strongly suggested that systems make use of the `etag` in the
481 # read-modify-write cycle to perform policy updates in order to avoid race
482 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
483 # systems are expected to put that etag in the request to `setIamPolicy` to
484 # ensure that their change will be applied to the same version of the policy.
485 #
486 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
487 # policy is overwritten blindly.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800488 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700489 },
490 }
491
492 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800493 Allowed values
494 1 - v1 error format
495 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700496
497Returns:
498 An object of the form:
499
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800500 { # Defines an Identity and Access Management (IAM) policy. It is used to
501 # specify access control policies for Cloud Platform resources.
502 #
503 #
504 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
505 # `members` to a `role`, where the members can be user accounts, Google groups,
506 # Google domains, and service accounts. A `role` is a named list of permissions
507 # defined by IAM.
508 #
509 # **Example**
510 #
511 # {
512 # "bindings": [
513 # {
514 # "role": "roles/owner",
515 # "members": [
516 # "user:mike@example.com",
517 # "group:admins@example.com",
518 # "domain:google.com",
519 # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
520 # ]
521 # },
522 # {
523 # "role": "roles/viewer",
524 # "members": ["user:sean@example.com"]
525 # }
526 # ]
527 # }
528 #
529 # For a description of IAM and its features, see the
530 # [IAM developer's guide](https://cloud.google.com/iam).
531 "bindings": [ # Associates a list of `members` to a `role`.
532 # Multiple `bindings` must not be specified for the same `role`.
533 # `bindings` with no members will result in an error.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800534 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800535 "role": "A String", # Role that is assigned to `members`.
536 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
537 # Required
538 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
539 # `members` can have the following values:
540 #
541 # * `allUsers`: A special identifier that represents anyone who is
542 # on the internet; with or without a Google account.
543 #
544 # * `allAuthenticatedUsers`: A special identifier that represents anyone
545 # who is authenticated with a Google account or a service account.
546 #
547 # * `user:{emailid}`: An email address that represents a specific Google
548 # account. For example, `alice@gmail.com` or `joe@example.com`.
549 #
550 #
551 # * `serviceAccount:{emailid}`: An email address that represents a service
552 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
553 #
554 # * `group:{emailid}`: An email address that represents a Google group.
555 # For example, `admins@example.com`.
556 #
557 # * `domain:{domain}`: A Google Apps domain name that represents all the
558 # users of that domain. For example, `google.com` or `example.com`.
559 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700560 "A String",
561 ],
562 },
563 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800564 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
565 # prevent simultaneous updates of a policy from overwriting each other.
566 # It is strongly suggested that systems make use of the `etag` in the
567 # read-modify-write cycle to perform policy updates in order to avoid race
568 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
569 # systems are expected to put that etag in the request to `setIamPolicy` to
570 # ensure that their change will be applied to the same version of the policy.
571 #
572 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
573 # policy is overwritten blindly.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800574 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700575 }</pre>
576</div>
577
578<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800579 <code class="details" id="testIamPermissions">testIamPermissions(resource=None, body, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700580 <pre>Returns permissions that a caller has on the specified resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800581If the resource does not exist, this will return an empty set of
582permissions, not a NOT_FOUND error.
Takashi Matsuo06694102015-09-11 13:55:40 -0700583
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400584Note: This operation is designed to be used for building permission-aware
585UIs and command-line tools, not for authorization checking. This operation
586may "fail open" without warning.
587
Takashi Matsuo06694102015-09-11 13:55:40 -0700588Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800589 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700590See the operation documentation for the appropriate value for this field. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700591 body: object, The request body. (required)
592 The object takes the form of:
593
594{ # Request message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800595 "permissions": [ # The set of permissions to check for the `resource`. Permissions with
596 # wildcards (such as '*' or 'storage.*') are not allowed. For more
597 # information see
598 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Takashi Matsuo06694102015-09-11 13:55:40 -0700599 "A String",
600 ],
601 }
602
603 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800604 Allowed values
605 1 - v1 error format
606 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700607
608Returns:
609 An object of the form:
610
611 { # Response message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800612 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
613 # allowed.
Takashi Matsuo06694102015-09-11 13:55:40 -0700614 "A String",
615 ],
616 }</pre>
617</div>
618
619</body></html>