blob: 026d91b0af2cd8e62fc3659060efa0ce0b81eb61 [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.
215`resource` is usually specified as a path. For example, a Project
216resource is specified as `projects/{project}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700217 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800218 Allowed values
219 1 - v1 error format
220 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700221
222Returns:
223 An object of the form:
224
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800225 { # Defines an Identity and Access Management (IAM) policy. It is used to
226 # specify access control policies for Cloud Platform resources.
227 #
228 #
229 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
230 # `members` to a `role`, where the members can be user accounts, Google groups,
231 # Google domains, and service accounts. A `role` is a named list of permissions
232 # defined by IAM.
233 #
234 # **Example**
235 #
236 # {
237 # "bindings": [
238 # {
239 # "role": "roles/owner",
240 # "members": [
241 # "user:mike@example.com",
242 # "group:admins@example.com",
243 # "domain:google.com",
244 # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
245 # ]
246 # },
247 # {
248 # "role": "roles/viewer",
249 # "members": ["user:sean@example.com"]
250 # }
251 # ]
252 # }
253 #
254 # For a description of IAM and its features, see the
255 # [IAM developer's guide](https://cloud.google.com/iam).
256 "bindings": [ # Associates a list of `members` to a `role`.
257 # Multiple `bindings` must not be specified for the same `role`.
258 # `bindings` with no members will result in an error.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800259 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800260 "role": "A String", # Role that is assigned to `members`.
261 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
262 # Required
263 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
264 # `members` can have the following values:
265 #
266 # * `allUsers`: A special identifier that represents anyone who is
267 # on the internet; with or without a Google account.
268 #
269 # * `allAuthenticatedUsers`: A special identifier that represents anyone
270 # who is authenticated with a Google account or a service account.
271 #
272 # * `user:{emailid}`: An email address that represents a specific Google
273 # account. For example, `alice@gmail.com` or `joe@example.com`.
274 #
275 #
276 # * `serviceAccount:{emailid}`: An email address that represents a service
277 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
278 #
279 # * `group:{emailid}`: An email address that represents a Google group.
280 # For example, `admins@example.com`.
281 #
282 # * `domain:{domain}`: A Google Apps domain name that represents all the
283 # users of that domain. For example, `google.com` or `example.com`.
284 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700285 "A String",
286 ],
287 },
288 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800289 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
290 # prevent simultaneous updates of a policy from overwriting each other.
291 # It is strongly suggested that systems make use of the `etag` in the
292 # read-modify-write cycle to perform policy updates in order to avoid race
293 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
294 # systems are expected to put that etag in the request to `setIamPolicy` to
295 # ensure that their change will be applied to the same version of the policy.
296 #
297 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
298 # policy is overwritten blindly.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800299 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700300 }</pre>
301</div>
302
303<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800304 <code class="details" id="list">list(project=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700305 <pre>Lists matching topics.
306
307Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800308 project: string, The name of the cloud project that topics belong to.
309Format is `projects/{project}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700310 pageSize: integer, Maximum number of topics to return.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800311 pageToken: string, The value returned by the last `ListTopicsResponse`; indicates that this is
312a continuation of a prior `ListTopics` call, and that the system should
313return the next page of data.
Takashi Matsuo06694102015-09-11 13:55:40 -0700314 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800315 Allowed values
316 1 - v1 error format
317 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700318
319Returns:
320 An object of the form:
321
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800322 { # Response for the `ListTopics` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800323 "nextPageToken": "A String", # If not empty, indicates that there may be more topics that match the
324 # request; this value should be passed in a new `ListTopicsRequest`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700325 "topics": [ # The resulting topics.
326 { # A topic resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800327 "name": "A String", # The name of the topic. It must have the format
328 # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
329 # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
330 # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
331 # signs (`%`). It must be between 3 and 255 characters in length, and it
332 # must not start with `"goog"`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700333 },
334 ],
335 }</pre>
336</div>
337
338<div class="method">
339 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
340 <pre>Retrieves the next page of results.
341
342Args:
343 previous_request: The request for the previous page. (required)
344 previous_response: The response from the request for the previous page. (required)
345
346Returns:
347 A request object that you can call 'execute()' on to request the next
348 page. Returns None if there are no more items in the collection.
349 </pre>
350</div>
351
352<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800353 <code class="details" id="publish">publish(topic=None, body, x__xgafv=None)</code>
354 <pre>Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
355does not exist. The message payload must not be empty; it must contain
356 either a non-empty data field, or at least one attribute.
Takashi Matsuo06694102015-09-11 13:55:40 -0700357
358Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800359 topic: string, The messages in the request will be published on this topic.
360Format is `projects/{project}/topics/{topic}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700361 body: object, The request body. (required)
362 The object takes the form of:
363
364{ # Request for the Publish method.
365 "messages": [ # The messages to publish.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800366 { # A message data and its attributes. The message payload must not be empty;
367 # it must contain either a non-empty data field, or at least one attribute.
Takashi Matsuo06694102015-09-11 13:55:40 -0700368 "attributes": { # Optional attributes for this message.
369 "a_key": "A String",
370 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800371 "data": "A String", # The message payload.
372 "publishTime": "A String", # The time at which the message was published, populated by the server when
373 # it receives the `Publish` call. It must not be populated by the
374 # publisher in a `Publish` call.
375 "messageId": "A String", # ID of this message, assigned by the server when the message is published.
376 # Guaranteed to be unique within the topic. This value may be read by a
377 # subscriber that receives a `PubsubMessage` via a `Pull` call or a push
378 # delivery. It must not be populated by the publisher in a `Publish` call.
Takashi Matsuo06694102015-09-11 13:55:40 -0700379 },
380 ],
381 }
382
383 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800384 Allowed values
385 1 - v1 error format
386 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700387
388Returns:
389 An object of the form:
390
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800391 { # Response for the `Publish` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800392 "messageIds": [ # The server-assigned ID of each published message, in the same order as
393 # the messages in the request. IDs are guaranteed to be unique within
394 # the topic.
Takashi Matsuo06694102015-09-11 13:55:40 -0700395 "A String",
396 ],
397 }</pre>
398</div>
399
400<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800401 <code class="details" id="setIamPolicy">setIamPolicy(resource=None, body, x__xgafv=None)</code>
402 <pre>Sets the access control policy on the specified resource. Replaces any
403existing policy.
Takashi Matsuo06694102015-09-11 13:55:40 -0700404
405Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800406 resource: string, REQUIRED: The resource for which the policy is being specified.
407`resource` is usually specified as a path. For example, a Project
408resource is specified as `projects/{project}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700409 body: object, The request body. (required)
410 The object takes the form of:
411
412{ # Request message for `SetIamPolicy` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800413 "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
414 # the policy is limited to a few 10s of KB. An empty policy is a
415 # valid policy but certain Cloud Platform services (such as Projects)
416 # might reject them.
417 # specify access control policies for Cloud Platform resources.
418 #
419 #
420 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
421 # `members` to a `role`, where the members can be user accounts, Google groups,
422 # Google domains, and service accounts. A `role` is a named list of permissions
423 # defined by IAM.
424 #
425 # **Example**
426 #
427 # {
428 # "bindings": [
429 # {
430 # "role": "roles/owner",
431 # "members": [
432 # "user:mike@example.com",
433 # "group:admins@example.com",
434 # "domain:google.com",
435 # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
436 # ]
437 # },
438 # {
439 # "role": "roles/viewer",
440 # "members": ["user:sean@example.com"]
441 # }
442 # ]
443 # }
444 #
445 # For a description of IAM and its features, see the
446 # [IAM developer's guide](https://cloud.google.com/iam).
447 "bindings": [ # Associates a list of `members` to a `role`.
448 # Multiple `bindings` must not be specified for the same `role`.
449 # `bindings` with no members will result in an error.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800450 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800451 "role": "A String", # Role that is assigned to `members`.
452 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
453 # Required
454 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
455 # `members` can have the following values:
456 #
457 # * `allUsers`: A special identifier that represents anyone who is
458 # on the internet; with or without a Google account.
459 #
460 # * `allAuthenticatedUsers`: A special identifier that represents anyone
461 # who is authenticated with a Google account or a service account.
462 #
463 # * `user:{emailid}`: An email address that represents a specific Google
464 # account. For example, `alice@gmail.com` or `joe@example.com`.
465 #
466 #
467 # * `serviceAccount:{emailid}`: An email address that represents a service
468 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
469 #
470 # * `group:{emailid}`: An email address that represents a Google group.
471 # For example, `admins@example.com`.
472 #
473 # * `domain:{domain}`: A Google Apps domain name that represents all the
474 # users of that domain. For example, `google.com` or `example.com`.
475 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700476 "A String",
477 ],
478 },
479 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800480 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
481 # prevent simultaneous updates of a policy from overwriting each other.
482 # It is strongly suggested that systems make use of the `etag` in the
483 # read-modify-write cycle to perform policy updates in order to avoid race
484 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
485 # systems are expected to put that etag in the request to `setIamPolicy` to
486 # ensure that their change will be applied to the same version of the policy.
487 #
488 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
489 # policy is overwritten blindly.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800490 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700491 },
492 }
493
494 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800495 Allowed values
496 1 - v1 error format
497 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700498
499Returns:
500 An object of the form:
501
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800502 { # Defines an Identity and Access Management (IAM) policy. It is used to
503 # specify access control policies for Cloud Platform resources.
504 #
505 #
506 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
507 # `members` to a `role`, where the members can be user accounts, Google groups,
508 # Google domains, and service accounts. A `role` is a named list of permissions
509 # defined by IAM.
510 #
511 # **Example**
512 #
513 # {
514 # "bindings": [
515 # {
516 # "role": "roles/owner",
517 # "members": [
518 # "user:mike@example.com",
519 # "group:admins@example.com",
520 # "domain:google.com",
521 # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
522 # ]
523 # },
524 # {
525 # "role": "roles/viewer",
526 # "members": ["user:sean@example.com"]
527 # }
528 # ]
529 # }
530 #
531 # For a description of IAM and its features, see the
532 # [IAM developer's guide](https://cloud.google.com/iam).
533 "bindings": [ # Associates a list of `members` to a `role`.
534 # Multiple `bindings` must not be specified for the same `role`.
535 # `bindings` with no members will result in an error.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800536 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800537 "role": "A String", # Role that is assigned to `members`.
538 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
539 # Required
540 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
541 # `members` can have the following values:
542 #
543 # * `allUsers`: A special identifier that represents anyone who is
544 # on the internet; with or without a Google account.
545 #
546 # * `allAuthenticatedUsers`: A special identifier that represents anyone
547 # who is authenticated with a Google account or a service account.
548 #
549 # * `user:{emailid}`: An email address that represents a specific Google
550 # account. For example, `alice@gmail.com` or `joe@example.com`.
551 #
552 #
553 # * `serviceAccount:{emailid}`: An email address that represents a service
554 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
555 #
556 # * `group:{emailid}`: An email address that represents a Google group.
557 # For example, `admins@example.com`.
558 #
559 # * `domain:{domain}`: A Google Apps domain name that represents all the
560 # users of that domain. For example, `google.com` or `example.com`.
561 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700562 "A String",
563 ],
564 },
565 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800566 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
567 # prevent simultaneous updates of a policy from overwriting each other.
568 # It is strongly suggested that systems make use of the `etag` in the
569 # read-modify-write cycle to perform policy updates in order to avoid race
570 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
571 # systems are expected to put that etag in the request to `setIamPolicy` to
572 # ensure that their change will be applied to the same version of the policy.
573 #
574 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
575 # policy is overwritten blindly.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800576 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700577 }</pre>
578</div>
579
580<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800581 <code class="details" id="testIamPermissions">testIamPermissions(resource=None, body, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700582 <pre>Returns permissions that a caller has on the specified resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800583If the resource does not exist, this will return an empty set of
584permissions, not a NOT_FOUND error.
Takashi Matsuo06694102015-09-11 13:55:40 -0700585
586Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800587 resource: string, REQUIRED: The resource for which the policy detail is being requested.
588`resource` is usually specified as a path. For example, a Project
589resource is specified as `projects/{project}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700590 body: object, The request body. (required)
591 The object takes the form of:
592
593{ # Request message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800594 "permissions": [ # The set of permissions to check for the `resource`. Permissions with
595 # wildcards (such as '*' or 'storage.*') are not allowed. For more
596 # information see
597 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Takashi Matsuo06694102015-09-11 13:55:40 -0700598 "A String",
599 ],
600 }
601
602 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800603 Allowed values
604 1 - v1 error format
605 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700606
607Returns:
608 An object of the form:
609
610 { # Response message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800611 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
612 # allowed.
Takashi Matsuo06694102015-09-11 13:55:40 -0700613 "A String",
614 ],
615 }</pre>
616</div>
617
618</body></html>