blob: 0f262fb2beb139104b627de5c866f58de688530d [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.subscriptions.html">subscriptions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070078 <code><a href="#acknowledge">acknowledge(subscription, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080079<p class="firstline">Acknowledges the messages associated with the `ack_ids` in the</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070080<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070081 <code><a href="#create">create(name, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080082<p class="firstline">Creates a subscription to a given topic.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070083<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070084 <code><a href="#delete">delete(subscription, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080085<p class="firstline">Deletes an existing subscription. All messages retained in the subscription</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070086<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070087 <code><a href="#get">get(subscription, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070088<p class="firstline">Gets the configuration details of a subscription.</p>
89<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070090 <code><a href="#getIamPolicy">getIamPolicy(resource, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080091<p class="firstline">Gets the access control policy for a resource.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070092<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070093 <code><a href="#list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070094<p class="firstline">Lists matching subscriptions.</p>
95<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070099 <code><a href="#modifyAckDeadline">modifyAckDeadline(subscription, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800100<p class="firstline">Modifies the ack deadline for a specific message. This method is useful</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700101<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -0700102 <code><a href="#modifyPushConfig">modifyPushConfig(subscription, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800103<p class="firstline">Modifies the `PushConfig` for a specified subscription.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700104<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -0700105 <code><a href="#pull">pull(subscription, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800106<p class="firstline">Pulls messages from the server. Returns an empty list if there are no</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700107<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -0700108 <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800109<p class="firstline">Sets the access control policy on the specified resource. Replaces any</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700110<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -0700111 <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700112<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
113<h3>Method Details</h3>
114<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700115 <code class="details" id="acknowledge">acknowledge(subscription, body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800116 <pre>Acknowledges the messages associated with the `ack_ids` in the
117`AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
118from the subscription.
119
120Acknowledging a message whose ack deadline has expired may succeed,
121but such a message may be redelivered later. Acknowledging a message more
122than once will not result in an error.
Takashi Matsuo06694102015-09-11 13:55:40 -0700123
124Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800125 subscription: string, The subscription whose message is being acknowledged.
126Format is `projects/{project}/subscriptions/{sub}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700127 body: object, The request body. (required)
128 The object takes the form of:
129
130{ # Request for the Acknowledge method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800131 "ackIds": [ # The acknowledgment ID for the messages being acknowledged that was returned
132 # by the Pub/Sub system in the `Pull` response. Must not be empty.
Takashi Matsuo06694102015-09-11 13:55:40 -0700133 "A String",
134 ],
135 }
136
137 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800138 Allowed values
139 1 - v1 error format
140 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700141
142Returns:
143 An object of the form:
144
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800145 { # A generic empty message that you can re-use to avoid defining duplicated
146 # empty messages in your APIs. A typical example is to use it as the request
147 # or the response type of an API method. For instance:
148 #
149 # service Foo {
150 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
151 # }
152 #
153 # The JSON representation for `Empty` is empty JSON object `{}`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700154 }</pre>
155</div>
156
157<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700158 <code class="details" id="create">create(name, body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800159 <pre>Creates a subscription to a given topic.
160If the subscription already exists, returns `ALREADY_EXISTS`.
161If the corresponding topic doesn't exist, returns `NOT_FOUND`.
162
163If the name is not provided in the request, the server will assign a random
164name for this subscription on the same project as the topic, conforming
165to the
166[resource name format](https://cloud.google.com/pubsub/docs/overview#names).
167The generated name is populated in the returned Subscription object.
168Note that for REST API requests, you must specify a name in the request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700169
170Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800171 name: string, The name of the subscription. It must have the format
172`"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
173start with a letter, and contain only letters (`[A-Za-z]`), numbers
174(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
175plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
176in length, and it must not start with `"goog"`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700177 body: object, The request body. (required)
178 The object takes the form of:
179
180{ # A subscription resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800181 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message
182 # before the subscriber should acknowledge the message. After message
183 # delivery but before the ack deadline expires and before the message is
184 # acknowledged, it is an outstanding message and will not be delivered
185 # again during that time (on a best-effort basis).
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700186 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800187 # For pull subscriptions, this value is used as the initial value for the ack
188 # deadline. To override this value for a given message, call
189 # `ModifyAckDeadline` with the corresponding `ack_id` if using
190 # pull.
191 # The minimum custom deadline you can specify is 10 seconds.
192 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
193 # If this parameter is 0, a default value of 10 seconds is used.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700194 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800195 # For push delivery, this value is also used to set the request timeout for
196 # the call to the push endpoint.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700197 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800198 # If the subscriber never acknowledges the message, the Pub/Sub
199 # system will eventually redeliver the message.
Thomas Coffee2f245372017-03-27 10:39:26 -0700200 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
201 # Format is `projects/{project}/topics/{topic}`.
202 # The value of this field will be `_deleted-topic_` if the topic has been
203 # deleted.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800204 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
205 # used to configure it. An empty `pushConfig` signifies that the subscriber
206 # will pull and ack messages using API methods.
207 "attributes": { # Endpoint configuration attributes.
208 #
209 # Every endpoint has a set of API supported attributes that can be used to
210 # control different aspects of the message delivery.
211 #
212 # The currently supported attribute is `x-goog-version`, which you can
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700213 # use to change the format of the pushed message. This attribute
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800214 # indicates the version of the data expected by the endpoint. This
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700215 # controls the shape of the pushed message (i.e., its fields and metadata).
216 # The endpoint version is based on the version of the Pub/Sub API.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800217 #
218 # If not present during the `CreateSubscription` call, it will default to
219 # the version of the API used to make such call. If not present during a
220 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
221 # calls will always return a valid version, even if the subscription was
222 # created without this attribute.
223 #
224 # The possible values for this attribute are:
225 #
226 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
227 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Takashi Matsuo06694102015-09-11 13:55:40 -0700228 "a_key": "A String",
229 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800230 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
231 # For example, a Webhook endpoint might use "https://example.com/push".
Takashi Matsuo06694102015-09-11 13:55:40 -0700232 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800233 "name": "A String", # The name of the subscription. It must have the format
234 # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
235 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
236 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
237 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
238 # in length, and it must not start with `"goog"`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700239 }
240
241 x__xgafv: string, V1 error format.
242 Allowed values
243 1 - v1 error format
244 2 - v2 error format
245
246Returns:
247 An object of the form:
248
249 { # A subscription resource.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700250 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message
251 # before the subscriber should acknowledge the message. After message
252 # delivery but before the ack deadline expires and before the message is
253 # acknowledged, it is an outstanding message and will not be delivered
254 # again during that time (on a best-effort basis).
255 #
256 # For pull subscriptions, this value is used as the initial value for the ack
257 # deadline. To override this value for a given message, call
258 # `ModifyAckDeadline` with the corresponding `ack_id` if using
259 # pull.
260 # The minimum custom deadline you can specify is 10 seconds.
261 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
262 # If this parameter is 0, a default value of 10 seconds is used.
263 #
264 # For push delivery, this value is also used to set the request timeout for
265 # the call to the push endpoint.
266 #
267 # If the subscriber never acknowledges the message, the Pub/Sub
268 # system will eventually redeliver the message.
Thomas Coffee2f245372017-03-27 10:39:26 -0700269 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
270 # Format is `projects/{project}/topics/{topic}`.
271 # The value of this field will be `_deleted-topic_` if the topic has been
272 # deleted.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700273 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
274 # used to configure it. An empty `pushConfig` signifies that the subscriber
275 # will pull and ack messages using API methods.
276 "attributes": { # Endpoint configuration attributes.
277 #
278 # Every endpoint has a set of API supported attributes that can be used to
279 # control different aspects of the message delivery.
280 #
281 # The currently supported attribute is `x-goog-version`, which you can
282 # use to change the format of the pushed message. This attribute
283 # indicates the version of the data expected by the endpoint. This
284 # controls the shape of the pushed message (i.e., its fields and metadata).
285 # The endpoint version is based on the version of the Pub/Sub API.
286 #
287 # If not present during the `CreateSubscription` call, it will default to
288 # the version of the API used to make such call. If not present during a
289 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
290 # calls will always return a valid version, even if the subscription was
291 # created without this attribute.
292 #
293 # The possible values for this attribute are:
294 #
295 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
296 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
297 "a_key": "A String",
298 },
299 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
300 # For example, a Webhook endpoint might use "https://example.com/push".
301 },
302 "name": "A String", # The name of the subscription. It must have the format
303 # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
304 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
305 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
306 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
307 # in length, and it must not start with `"goog"`.
308 }</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700309</div>
310
311<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700312 <code class="details" id="delete">delete(subscription, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800313 <pre>Deletes an existing subscription. All messages retained in the subscription
314are immediately dropped. Calls to `Pull` after deletion will return
315`NOT_FOUND`. After a subscription is deleted, a new one may be created with
316the same name, but the new one has no association with the old
317subscription or its topic unless the same topic is specified.
Takashi Matsuo06694102015-09-11 13:55:40 -0700318
319Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800320 subscription: string, The subscription to delete.
321Format is `projects/{project}/subscriptions/{sub}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700322 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800323 Allowed values
324 1 - v1 error format
325 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700326
327Returns:
328 An object of the form:
329
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800330 { # A generic empty message that you can re-use to avoid defining duplicated
331 # empty messages in your APIs. A typical example is to use it as the request
332 # or the response type of an API method. For instance:
333 #
334 # service Foo {
335 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
336 # }
337 #
338 # The JSON representation for `Empty` is empty JSON object `{}`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700339 }</pre>
340</div>
341
342<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700343 <code class="details" id="get">get(subscription, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700344 <pre>Gets the configuration details of a subscription.
345
346Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800347 subscription: string, The name of the subscription to get.
348Format is `projects/{project}/subscriptions/{sub}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700349 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800350 Allowed values
351 1 - v1 error format
352 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700353
354Returns:
355 An object of the form:
356
357 { # A subscription resource.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700358 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message
359 # before the subscriber should acknowledge the message. After message
360 # delivery but before the ack deadline expires and before the message is
361 # acknowledged, it is an outstanding message and will not be delivered
362 # again during that time (on a best-effort basis).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800363 #
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700364 # For pull subscriptions, this value is used as the initial value for the ack
365 # deadline. To override this value for a given message, call
366 # `ModifyAckDeadline` with the corresponding `ack_id` if using
367 # pull.
368 # The minimum custom deadline you can specify is 10 seconds.
369 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
370 # If this parameter is 0, a default value of 10 seconds is used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800371 #
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700372 # For push delivery, this value is also used to set the request timeout for
373 # the call to the push endpoint.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800374 #
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700375 # If the subscriber never acknowledges the message, the Pub/Sub
376 # system will eventually redeliver the message.
Thomas Coffee2f245372017-03-27 10:39:26 -0700377 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
378 # Format is `projects/{project}/topics/{topic}`.
379 # The value of this field will be `_deleted-topic_` if the topic has been
380 # deleted.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700381 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
382 # used to configure it. An empty `pushConfig` signifies that the subscriber
383 # will pull and ack messages using API methods.
384 "attributes": { # Endpoint configuration attributes.
385 #
386 # Every endpoint has a set of API supported attributes that can be used to
387 # control different aspects of the message delivery.
388 #
389 # The currently supported attribute is `x-goog-version`, which you can
390 # use to change the format of the pushed message. This attribute
391 # indicates the version of the data expected by the endpoint. This
392 # controls the shape of the pushed message (i.e., its fields and metadata).
393 # The endpoint version is based on the version of the Pub/Sub API.
394 #
395 # If not present during the `CreateSubscription` call, it will default to
396 # the version of the API used to make such call. If not present during a
397 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
398 # calls will always return a valid version, even if the subscription was
399 # created without this attribute.
400 #
401 # The possible values for this attribute are:
402 #
403 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
404 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
405 "a_key": "A String",
406 },
407 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
408 # For example, a Webhook endpoint might use "https://example.com/push".
Takashi Matsuo06694102015-09-11 13:55:40 -0700409 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700410 "name": "A String", # The name of the subscription. It must have the format
411 # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
412 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
413 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
414 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
415 # in length, and it must not start with `"goog"`.
416 }</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700417</div>
418
419<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700420 <code class="details" id="getIamPolicy">getIamPolicy(resource, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800421 <pre>Gets the access control policy for a resource.
422Returns an empty policy if the resource exists and does not have a policy
423set.
Takashi Matsuo06694102015-09-11 13:55:40 -0700424
425Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800426 resource: string, REQUIRED: The resource for which the policy is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700427See the operation documentation for the appropriate value for this field. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700428 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800429 Allowed values
430 1 - v1 error format
431 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700432
433Returns:
434 An object of the form:
435
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800436 { # Defines an Identity and Access Management (IAM) policy. It is used to
437 # specify access control policies for Cloud Platform resources.
438 #
439 #
440 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
441 # `members` to a `role`, where the members can be user accounts, Google groups,
442 # Google domains, and service accounts. A `role` is a named list of permissions
443 # defined by IAM.
444 #
445 # **Example**
446 #
447 # {
448 # "bindings": [
449 # {
450 # "role": "roles/owner",
451 # "members": [
452 # "user:mike@example.com",
453 # "group:admins@example.com",
454 # "domain:google.com",
455 # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
456 # ]
457 # },
458 # {
459 # "role": "roles/viewer",
460 # "members": ["user:sean@example.com"]
461 # }
462 # ]
463 # }
464 #
465 # For a description of IAM and its features, see the
466 # [IAM developer's guide](https://cloud.google.com/iam).
467 "bindings": [ # Associates a list of `members` to a `role`.
468 # Multiple `bindings` must not be specified for the same `role`.
469 # `bindings` with no members will result in an error.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800470 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800471 "role": "A String", # Role that is assigned to `members`.
472 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
473 # Required
474 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
475 # `members` can have the following values:
476 #
477 # * `allUsers`: A special identifier that represents anyone who is
478 # on the internet; with or without a Google account.
479 #
480 # * `allAuthenticatedUsers`: A special identifier that represents anyone
481 # who is authenticated with a Google account or a service account.
482 #
483 # * `user:{emailid}`: An email address that represents a specific Google
484 # account. For example, `alice@gmail.com` or `joe@example.com`.
485 #
486 #
487 # * `serviceAccount:{emailid}`: An email address that represents a service
488 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
489 #
490 # * `group:{emailid}`: An email address that represents a Google group.
491 # For example, `admins@example.com`.
492 #
493 # * `domain:{domain}`: A Google Apps domain name that represents all the
494 # users of that domain. For example, `google.com` or `example.com`.
495 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700496 "A String",
497 ],
498 },
499 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800500 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
501 # prevent simultaneous updates of a policy from overwriting each other.
502 # It is strongly suggested that systems make use of the `etag` in the
503 # read-modify-write cycle to perform policy updates in order to avoid race
504 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
505 # systems are expected to put that etag in the request to `setIamPolicy` to
506 # ensure that their change will be applied to the same version of the policy.
507 #
508 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
509 # policy is overwritten blindly.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800510 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700511 }</pre>
512</div>
513
514<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700515 <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700516 <pre>Lists matching subscriptions.
517
518Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800519 project: string, The name of the cloud project that subscriptions belong to.
520Format is `projects/{project}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700521 pageSize: integer, Maximum number of subscriptions to return.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800522 pageToken: string, The value returned by the last `ListSubscriptionsResponse`; indicates that
523this is a continuation of a prior `ListSubscriptions` call, and that the
524system should return the next page of data.
Takashi Matsuo06694102015-09-11 13:55:40 -0700525 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800526 Allowed values
527 1 - v1 error format
528 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700529
530Returns:
531 An object of the form:
532
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800533 { # Response for the `ListSubscriptions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800534 "nextPageToken": "A String", # If not empty, indicates that there may be more subscriptions that match
535 # the request; this value should be passed in a new
536 # `ListSubscriptionsRequest` to get more subscriptions.
Takashi Matsuo06694102015-09-11 13:55:40 -0700537 "subscriptions": [ # The subscriptions that match the request.
538 { # A subscription resource.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700539 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message
540 # before the subscriber should acknowledge the message. After message
541 # delivery but before the ack deadline expires and before the message is
542 # acknowledged, it is an outstanding message and will not be delivered
543 # again during that time (on a best-effort basis).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800544 #
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700545 # For pull subscriptions, this value is used as the initial value for the ack
546 # deadline. To override this value for a given message, call
547 # `ModifyAckDeadline` with the corresponding `ack_id` if using
548 # pull.
549 # The minimum custom deadline you can specify is 10 seconds.
550 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
551 # If this parameter is 0, a default value of 10 seconds is used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800552 #
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700553 # For push delivery, this value is also used to set the request timeout for
554 # the call to the push endpoint.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800555 #
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700556 # If the subscriber never acknowledges the message, the Pub/Sub
557 # system will eventually redeliver the message.
Thomas Coffee2f245372017-03-27 10:39:26 -0700558 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
559 # Format is `projects/{project}/topics/{topic}`.
560 # The value of this field will be `_deleted-topic_` if the topic has been
561 # deleted.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700562 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
563 # used to configure it. An empty `pushConfig` signifies that the subscriber
564 # will pull and ack messages using API methods.
565 "attributes": { # Endpoint configuration attributes.
566 #
567 # Every endpoint has a set of API supported attributes that can be used to
568 # control different aspects of the message delivery.
569 #
570 # The currently supported attribute is `x-goog-version`, which you can
571 # use to change the format of the pushed message. This attribute
572 # indicates the version of the data expected by the endpoint. This
573 # controls the shape of the pushed message (i.e., its fields and metadata).
574 # The endpoint version is based on the version of the Pub/Sub API.
575 #
576 # If not present during the `CreateSubscription` call, it will default to
577 # the version of the API used to make such call. If not present during a
578 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
579 # calls will always return a valid version, even if the subscription was
580 # created without this attribute.
581 #
582 # The possible values for this attribute are:
583 #
584 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
585 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
586 "a_key": "A String",
587 },
588 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
589 # For example, a Webhook endpoint might use "https://example.com/push".
Takashi Matsuo06694102015-09-11 13:55:40 -0700590 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700591 "name": "A String", # The name of the subscription. It must have the format
592 # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
593 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
594 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
595 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
596 # in length, and it must not start with `"goog"`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700597 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700598 ],
599 }</pre>
600</div>
601
602<div class="method">
603 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
604 <pre>Retrieves the next page of results.
605
606Args:
607 previous_request: The request for the previous page. (required)
608 previous_response: The response from the request for the previous page. (required)
609
610Returns:
611 A request object that you can call 'execute()' on to request the next
612 page. Returns None if there are no more items in the collection.
613 </pre>
614</div>
615
616<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700617 <code class="details" id="modifyAckDeadline">modifyAckDeadline(subscription, body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800618 <pre>Modifies the ack deadline for a specific message. This method is useful
619to indicate that more time is needed to process a message by the
620subscriber, or to make the message available for redelivery if the
621processing was interrupted. Note that this does not modify the
622subscription-level `ackDeadlineSeconds` used for subsequent messages.
Takashi Matsuo06694102015-09-11 13:55:40 -0700623
624Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800625 subscription: string, The name of the subscription.
626Format is `projects/{project}/subscriptions/{sub}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700627 body: object, The request body. (required)
628 The object takes the form of:
629
630{ # Request for the ModifyAckDeadline method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800631 "ackDeadlineSeconds": 42, # The new ack deadline with respect to the time this request was sent to
632 # the Pub/Sub system. For example, if the value is 10, the new
633 # ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
634 # was made. Specifying zero may immediately make the message available for
635 # another pull request.
636 # The minimum deadline you can specify is 0 seconds.
637 # The maximum deadline you can specify is 600 seconds (10 minutes).
Takashi Matsuo06694102015-09-11 13:55:40 -0700638 "ackIds": [ # List of acknowledgment IDs.
639 "A String",
640 ],
641 }
642
643 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800644 Allowed values
645 1 - v1 error format
646 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700647
648Returns:
649 An object of the form:
650
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800651 { # A generic empty message that you can re-use to avoid defining duplicated
652 # empty messages in your APIs. A typical example is to use it as the request
653 # or the response type of an API method. For instance:
654 #
655 # service Foo {
656 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
657 # }
658 #
659 # The JSON representation for `Empty` is empty JSON object `{}`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700660 }</pre>
661</div>
662
663<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700664 <code class="details" id="modifyPushConfig">modifyPushConfig(subscription, body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800665 <pre>Modifies the `PushConfig` for a specified subscription.
666
667This may be used to change a push subscription to a pull one (signified by
668an empty `PushConfig`) or vice versa, or change the endpoint URL and other
669attributes of a push subscription. Messages will accumulate for delivery
670continuously through the call regardless of changes to the `PushConfig`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700671
672Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800673 subscription: string, The name of the subscription.
674Format is `projects/{project}/subscriptions/{sub}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700675 body: object, The request body. (required)
676 The object takes the form of:
677
678{ # Request for the ModifyPushConfig method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800679 "pushConfig": { # Configuration for a push delivery endpoint. # The push configuration for future deliveries.
680 #
681 # An empty `pushConfig` indicates that the Pub/Sub system should
682 # stop pushing messages from the given subscription and allow
683 # messages to be pulled and acknowledged - effectively pausing
684 # the subscription if `Pull` is not called.
685 "attributes": { # Endpoint configuration attributes.
686 #
687 # Every endpoint has a set of API supported attributes that can be used to
688 # control different aspects of the message delivery.
689 #
690 # The currently supported attribute is `x-goog-version`, which you can
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700691 # use to change the format of the pushed message. This attribute
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800692 # indicates the version of the data expected by the endpoint. This
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700693 # controls the shape of the pushed message (i.e., its fields and metadata).
694 # The endpoint version is based on the version of the Pub/Sub API.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800695 #
696 # If not present during the `CreateSubscription` call, it will default to
697 # the version of the API used to make such call. If not present during a
698 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
699 # calls will always return a valid version, even if the subscription was
700 # created without this attribute.
701 #
702 # The possible values for this attribute are:
703 #
704 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
705 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Takashi Matsuo06694102015-09-11 13:55:40 -0700706 "a_key": "A String",
707 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800708 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
709 # For example, a Webhook endpoint might use "https://example.com/push".
Takashi Matsuo06694102015-09-11 13:55:40 -0700710 },
711 }
712
713 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800714 Allowed values
715 1 - v1 error format
716 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700717
718Returns:
719 An object of the form:
720
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800721 { # A generic empty message that you can re-use to avoid defining duplicated
722 # empty messages in your APIs. A typical example is to use it as the request
723 # or the response type of an API method. For instance:
724 #
725 # service Foo {
726 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
727 # }
728 #
729 # The JSON representation for `Empty` is empty JSON object `{}`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700730 }</pre>
731</div>
732
733<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700734 <code class="details" id="pull">pull(subscription, body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800735 <pre>Pulls messages from the server. Returns an empty list if there are no
736messages available in the backlog. The server may return `UNAVAILABLE` if
737there are too many concurrent pull requests pending for the given
738subscription.
Takashi Matsuo06694102015-09-11 13:55:40 -0700739
740Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800741 subscription: string, The subscription from which messages should be pulled.
742Format is `projects/{project}/subscriptions/{sub}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700743 body: object, The request body. (required)
744 The object takes the form of:
745
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800746{ # Request for the `Pull` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800747 "returnImmediately": True or False, # If this field set to true, the system will respond immediately even if
748 # it there are no messages available to return in the `Pull` response.
749 # Otherwise, the system may wait (for a bounded amount of time) until at
750 # least one message is available, rather than returning no messages. The
751 # client may cancel the request if it does not wish to wait any longer for
752 # the response.
753 "maxMessages": 42, # The maximum number of messages returned for this request. The Pub/Sub
754 # system may return fewer than the number specified.
Takashi Matsuo06694102015-09-11 13:55:40 -0700755 }
756
757 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800758 Allowed values
759 1 - v1 error format
760 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700761
762Returns:
763 An object of the form:
764
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800765 { # Response for the `Pull` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800766 "receivedMessages": [ # Received Pub/Sub messages. The Pub/Sub system will return zero messages if
767 # there are no more available in the backlog. The Pub/Sub system may return
768 # fewer than the `maxMessages` requested even if there are more messages
769 # available in the backlog.
Takashi Matsuo06694102015-09-11 13:55:40 -0700770 { # A message and its corresponding acknowledgment ID.
771 "ackId": "A String", # This ID can be used to acknowledge the received message.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800772 "message": { # A message data and its attributes. The message payload must not be empty; # The message.
773 # it must contain either a non-empty data field, or at least one attribute.
Takashi Matsuo06694102015-09-11 13:55:40 -0700774 "attributes": { # Optional attributes for this message.
775 "a_key": "A String",
776 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800777 "data": "A String", # The message payload.
778 "publishTime": "A String", # The time at which the message was published, populated by the server when
779 # it receives the `Publish` call. It must not be populated by the
780 # publisher in a `Publish` call.
781 "messageId": "A String", # ID of this message, assigned by the server when the message is published.
782 # Guaranteed to be unique within the topic. This value may be read by a
783 # subscriber that receives a `PubsubMessage` via a `Pull` call or a push
784 # delivery. It must not be populated by the publisher in a `Publish` call.
Takashi Matsuo06694102015-09-11 13:55:40 -0700785 },
786 },
787 ],
788 }</pre>
789</div>
790
791<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700792 <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800793 <pre>Sets the access control policy on the specified resource. Replaces any
794existing policy.
Takashi Matsuo06694102015-09-11 13:55:40 -0700795
796Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800797 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700798See the operation documentation for the appropriate value for this field. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700799 body: object, The request body. (required)
800 The object takes the form of:
801
802{ # Request message for `SetIamPolicy` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800803 "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
804 # the policy is limited to a few 10s of KB. An empty policy is a
805 # valid policy but certain Cloud Platform services (such as Projects)
806 # might reject them.
807 # specify access control policies for Cloud Platform resources.
808 #
809 #
810 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
811 # `members` to a `role`, where the members can be user accounts, Google groups,
812 # Google domains, and service accounts. A `role` is a named list of permissions
813 # defined by IAM.
814 #
815 # **Example**
816 #
817 # {
818 # "bindings": [
819 # {
820 # "role": "roles/owner",
821 # "members": [
822 # "user:mike@example.com",
823 # "group:admins@example.com",
824 # "domain:google.com",
825 # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
826 # ]
827 # },
828 # {
829 # "role": "roles/viewer",
830 # "members": ["user:sean@example.com"]
831 # }
832 # ]
833 # }
834 #
835 # For a description of IAM and its features, see the
836 # [IAM developer's guide](https://cloud.google.com/iam).
837 "bindings": [ # Associates a list of `members` to a `role`.
838 # Multiple `bindings` must not be specified for the same `role`.
839 # `bindings` with no members will result in an error.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800840 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800841 "role": "A String", # Role that is assigned to `members`.
842 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
843 # Required
844 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
845 # `members` can have the following values:
846 #
847 # * `allUsers`: A special identifier that represents anyone who is
848 # on the internet; with or without a Google account.
849 #
850 # * `allAuthenticatedUsers`: A special identifier that represents anyone
851 # who is authenticated with a Google account or a service account.
852 #
853 # * `user:{emailid}`: An email address that represents a specific Google
854 # account. For example, `alice@gmail.com` or `joe@example.com`.
855 #
856 #
857 # * `serviceAccount:{emailid}`: An email address that represents a service
858 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
859 #
860 # * `group:{emailid}`: An email address that represents a Google group.
861 # For example, `admins@example.com`.
862 #
863 # * `domain:{domain}`: A Google Apps domain name that represents all the
864 # users of that domain. For example, `google.com` or `example.com`.
865 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700866 "A String",
867 ],
868 },
869 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800870 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
871 # prevent simultaneous updates of a policy from overwriting each other.
872 # It is strongly suggested that systems make use of the `etag` in the
873 # read-modify-write cycle to perform policy updates in order to avoid race
874 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
875 # systems are expected to put that etag in the request to `setIamPolicy` to
876 # ensure that their change will be applied to the same version of the policy.
877 #
878 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
879 # policy is overwritten blindly.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800880 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700881 },
882 }
883
884 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800885 Allowed values
886 1 - v1 error format
887 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700888
889Returns:
890 An object of the form:
891
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800892 { # Defines an Identity and Access Management (IAM) policy. It is used to
893 # specify access control policies for Cloud Platform resources.
894 #
895 #
896 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
897 # `members` to a `role`, where the members can be user accounts, Google groups,
898 # Google domains, and service accounts. A `role` is a named list of permissions
899 # defined by IAM.
900 #
901 # **Example**
902 #
903 # {
904 # "bindings": [
905 # {
906 # "role": "roles/owner",
907 # "members": [
908 # "user:mike@example.com",
909 # "group:admins@example.com",
910 # "domain:google.com",
911 # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
912 # ]
913 # },
914 # {
915 # "role": "roles/viewer",
916 # "members": ["user:sean@example.com"]
917 # }
918 # ]
919 # }
920 #
921 # For a description of IAM and its features, see the
922 # [IAM developer's guide](https://cloud.google.com/iam).
923 "bindings": [ # Associates a list of `members` to a `role`.
924 # Multiple `bindings` must not be specified for the same `role`.
925 # `bindings` with no members will result in an error.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800926 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800927 "role": "A String", # Role that is assigned to `members`.
928 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
929 # Required
930 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
931 # `members` can have the following values:
932 #
933 # * `allUsers`: A special identifier that represents anyone who is
934 # on the internet; with or without a Google account.
935 #
936 # * `allAuthenticatedUsers`: A special identifier that represents anyone
937 # who is authenticated with a Google account or a service account.
938 #
939 # * `user:{emailid}`: An email address that represents a specific Google
940 # account. For example, `alice@gmail.com` or `joe@example.com`.
941 #
942 #
943 # * `serviceAccount:{emailid}`: An email address that represents a service
944 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
945 #
946 # * `group:{emailid}`: An email address that represents a Google group.
947 # For example, `admins@example.com`.
948 #
949 # * `domain:{domain}`: A Google Apps domain name that represents all the
950 # users of that domain. For example, `google.com` or `example.com`.
951 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700952 "A String",
953 ],
954 },
955 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800956 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
957 # prevent simultaneous updates of a policy from overwriting each other.
958 # It is strongly suggested that systems make use of the `etag` in the
959 # read-modify-write cycle to perform policy updates in order to avoid race
960 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
961 # systems are expected to put that etag in the request to `setIamPolicy` to
962 # ensure that their change will be applied to the same version of the policy.
963 #
964 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
965 # policy is overwritten blindly.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800966 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700967 }</pre>
968</div>
969
970<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700971 <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700972 <pre>Returns permissions that a caller has on the specified resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800973If the resource does not exist, this will return an empty set of
974permissions, not a NOT_FOUND error.
Takashi Matsuo06694102015-09-11 13:55:40 -0700975
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400976Note: This operation is designed to be used for building permission-aware
977UIs and command-line tools, not for authorization checking. This operation
978may "fail open" without warning.
979
Takashi Matsuo06694102015-09-11 13:55:40 -0700980Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800981 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700982See the operation documentation for the appropriate value for this field. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700983 body: object, The request body. (required)
984 The object takes the form of:
985
986{ # Request message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800987 "permissions": [ # The set of permissions to check for the `resource`. Permissions with
988 # wildcards (such as '*' or 'storage.*') are not allowed. For more
989 # information see
990 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Takashi Matsuo06694102015-09-11 13:55:40 -0700991 "A String",
992 ],
993 }
994
995 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800996 Allowed values
997 1 - v1 error format
998 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700999
1000Returns:
1001 An object of the form:
1002
1003 { # Response message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001004 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
1005 # allowed.
Takashi Matsuo06694102015-09-11 13:55:40 -07001006 "A String",
1007 ],
1008 }</pre>
1009</div>
1010
1011</body></html>