• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<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_v1beta2.html">Google Cloud Pub/Sub API</a> . <a href="pubsub_v1beta2.projects.html">projects</a> . <a href="pubsub_v1beta2.projects.subscriptions.html">subscriptions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#acknowledge">acknowledge(subscription, body, x__xgafv=None)</a></code></p>
79<p class="firstline">Acknowledges the messages associated with the `ack_ids` in the</p>
80<p class="toc_element">
81  <code><a href="#create">create(name, body, x__xgafv=None)</a></code></p>
82<p class="firstline">Creates a subscription to a given topic.</p>
83<p class="toc_element">
84  <code><a href="#delete">delete(subscription, x__xgafv=None)</a></code></p>
85<p class="firstline">Deletes an existing subscription. All pending messages in the subscription</p>
86<p class="toc_element">
87  <code><a href="#get">get(subscription, x__xgafv=None)</a></code></p>
88<p class="firstline">Gets the configuration details of a subscription.</p>
89<p class="toc_element">
90  <code><a href="#getIamPolicy">getIamPolicy(resource, x__xgafv=None)</a></code></p>
91<p class="firstline">Gets the access control policy for a resource.</p>
92<p class="toc_element">
93  <code><a href="#list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
94<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">
99  <code><a href="#modifyAckDeadline">modifyAckDeadline(subscription, body, x__xgafv=None)</a></code></p>
100<p class="firstline">Modifies the ack deadline for a specific message. This method is useful</p>
101<p class="toc_element">
102  <code><a href="#modifyPushConfig">modifyPushConfig(subscription, body, x__xgafv=None)</a></code></p>
103<p class="firstline">Modifies the `PushConfig` for a specified subscription.</p>
104<p class="toc_element">
105  <code><a href="#pull">pull(subscription, body, x__xgafv=None)</a></code></p>
106<p class="firstline">Pulls messages from the server. Returns an empty list if there are no</p>
107<p class="toc_element">
108  <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p>
109<p class="firstline">Sets the access control policy on the specified resource. Replaces any</p>
110<p class="toc_element">
111  <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p>
112<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
113<h3>Method Details</h3>
114<div class="method">
115    <code class="details" id="acknowledge">acknowledge(subscription, body, x__xgafv=None)</code>
116  <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.
123
124Args:
125  subscription: string, The subscription whose message is being acknowledged. (required)
126  body: object, The request body. (required)
127    The object takes the form of:
128
129{ # Request for the Acknowledge method.
130    "ackIds": [ # The acknowledgment ID for the messages being acknowledged that was returned
131        # by the Pub/Sub system in the `Pull` response. Must not be empty.
132      "A String",
133    ],
134  }
135
136  x__xgafv: string, V1 error format.
137    Allowed values
138      1 - v1 error format
139      2 - v2 error format
140
141Returns:
142  An object of the form:
143
144    { # A generic empty message that you can re-use to avoid defining duplicated
145      # empty messages in your APIs. A typical example is to use it as the request
146      # or the response type of an API method. For instance:
147      #
148      #     service Foo {
149      #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
150      #     }
151      #
152      # The JSON representation for `Empty` is empty JSON object `{}`.
153  }</pre>
154</div>
155
156<div class="method">
157    <code class="details" id="create">create(name, body, x__xgafv=None)</code>
158  <pre>Creates a subscription to a given topic.
159If the subscription already exists, returns `ALREADY_EXISTS`.
160If the corresponding topic doesn't exist, returns `NOT_FOUND`.
161
162If the name is not provided in the request, the server will assign a random
163name for this subscription on the same project as the topic. Note that
164for REST API requests, you must specify a name.
165
166Args:
167  name: string, The name of the subscription. It must have the format
168`"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
169start with a letter, and contain only letters (`[A-Za-z]`), numbers
170(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
171plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
172in length, and it must not start with `"goog"`. (required)
173  body: object, The request body. (required)
174    The object takes the form of:
175
176{ # A subscription resource.
177  "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message
178      # before the subscriber should acknowledge the message. After message
179      # delivery but before the ack deadline expires and before the message is
180      # acknowledged, it is an outstanding message and will not be delivered
181      # again during that time (on a best-effort basis).
182      #
183      # For pull subscriptions, this value is used as the initial value for the ack
184      # deadline. To override this value for a given message, call
185      # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
186      # The maximum custom deadline you can specify is 600 seconds (10 minutes).
187      #
188      # For push delivery, this value is also used to set the request timeout for
189      # the call to the push endpoint.
190      #
191      # If the subscriber never acknowledges the message, the Pub/Sub
192      # system will eventually redeliver the message.
193      #
194      # If this parameter is 0, a default value of 10 seconds is used.
195  "topic": "A String", # The name of the topic from which this subscription is receiving messages.
196      # The value of this field will be `_deleted-topic_` if the topic has been
197      # deleted.
198  "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
199      # used to configure it. An empty `pushConfig` signifies that the subscriber
200      # will pull and ack messages using API methods.
201    "attributes": { # Endpoint configuration attributes.
202        #
203        # Every endpoint has a set of API supported attributes that can be used to
204        # control different aspects of the message delivery.
205        #
206        # The currently supported attribute is `x-goog-version`, which you can
207        # use to change the format of the push message. This attribute
208        # indicates the version of the data expected by the endpoint. This
209        # controls the shape of the envelope (i.e. its fields and metadata).
210        # The endpoint version is based on the version of the Pub/Sub
211        # API.
212        #
213        # If not present during the `CreateSubscription` call, it will default to
214        # the version of the API used to make such call. If not present during a
215        # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
216        # calls will always return a valid version, even if the subscription was
217        # created without this attribute.
218        #
219        # The possible values for this attribute are:
220        #
221        # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
222        # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
223      "a_key": "A String",
224    },
225    "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
226        # For example, a Webhook endpoint might use "https://example.com/push".
227  },
228  "name": "A String", # The name of the subscription. It must have the format
229      # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
230      # start with a letter, and contain only letters (`[A-Za-z]`), numbers
231      # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
232      # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
233      # in length, and it must not start with `"goog"`.
234}
235
236  x__xgafv: string, V1 error format.
237    Allowed values
238      1 - v1 error format
239      2 - v2 error format
240
241Returns:
242  An object of the form:
243
244    { # A subscription resource.
245    "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message
246        # before the subscriber should acknowledge the message. After message
247        # delivery but before the ack deadline expires and before the message is
248        # acknowledged, it is an outstanding message and will not be delivered
249        # again during that time (on a best-effort basis).
250        #
251        # For pull subscriptions, this value is used as the initial value for the ack
252        # deadline. To override this value for a given message, call
253        # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
254        # The maximum custom deadline you can specify is 600 seconds (10 minutes).
255        #
256        # For push delivery, this value is also used to set the request timeout for
257        # the call to the push endpoint.
258        #
259        # If the subscriber never acknowledges the message, the Pub/Sub
260        # system will eventually redeliver the message.
261        #
262        # If this parameter is 0, a default value of 10 seconds is used.
263    "topic": "A String", # The name of the topic from which this subscription is receiving messages.
264        # The value of this field will be `_deleted-topic_` if the topic has been
265        # deleted.
266    "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
267        # used to configure it. An empty `pushConfig` signifies that the subscriber
268        # will pull and ack messages using API methods.
269      "attributes": { # Endpoint configuration attributes.
270          #
271          # Every endpoint has a set of API supported attributes that can be used to
272          # control different aspects of the message delivery.
273          #
274          # The currently supported attribute is `x-goog-version`, which you can
275          # use to change the format of the push message. This attribute
276          # indicates the version of the data expected by the endpoint. This
277          # controls the shape of the envelope (i.e. its fields and metadata).
278          # The endpoint version is based on the version of the Pub/Sub
279          # API.
280          #
281          # If not present during the `CreateSubscription` call, it will default to
282          # the version of the API used to make such call. If not present during a
283          # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
284          # calls will always return a valid version, even if the subscription was
285          # created without this attribute.
286          #
287          # The possible values for this attribute are:
288          #
289          # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
290          # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
291        "a_key": "A String",
292      },
293      "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
294          # For example, a Webhook endpoint might use "https://example.com/push".
295    },
296    "name": "A String", # The name of the subscription. It must have the format
297        # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
298        # start with a letter, and contain only letters (`[A-Za-z]`), numbers
299        # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
300        # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
301        # in length, and it must not start with `"goog"`.
302  }</pre>
303</div>
304
305<div class="method">
306    <code class="details" id="delete">delete(subscription, x__xgafv=None)</code>
307  <pre>Deletes an existing subscription. All pending messages in the subscription
308are immediately dropped. Calls to `Pull` after deletion will return
309`NOT_FOUND`. After a subscription is deleted, a new one may be created with
310the same name, but the new one has no association with the old
311subscription, or its topic unless the same topic is specified.
312
313Args:
314  subscription: string, The subscription to delete. (required)
315  x__xgafv: string, V1 error format.
316    Allowed values
317      1 - v1 error format
318      2 - v2 error format
319
320Returns:
321  An object of the form:
322
323    { # A generic empty message that you can re-use to avoid defining duplicated
324      # empty messages in your APIs. A typical example is to use it as the request
325      # or the response type of an API method. For instance:
326      #
327      #     service Foo {
328      #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
329      #     }
330      #
331      # The JSON representation for `Empty` is empty JSON object `{}`.
332  }</pre>
333</div>
334
335<div class="method">
336    <code class="details" id="get">get(subscription, x__xgafv=None)</code>
337  <pre>Gets the configuration details of a subscription.
338
339Args:
340  subscription: string, The name of the subscription to get. (required)
341  x__xgafv: string, V1 error format.
342    Allowed values
343      1 - v1 error format
344      2 - v2 error format
345
346Returns:
347  An object of the form:
348
349    { # A subscription resource.
350    "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message
351        # before the subscriber should acknowledge the message. After message
352        # delivery but before the ack deadline expires and before the message is
353        # acknowledged, it is an outstanding message and will not be delivered
354        # again during that time (on a best-effort basis).
355        #
356        # For pull subscriptions, this value is used as the initial value for the ack
357        # deadline. To override this value for a given message, call
358        # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
359        # The maximum custom deadline you can specify is 600 seconds (10 minutes).
360        #
361        # For push delivery, this value is also used to set the request timeout for
362        # the call to the push endpoint.
363        #
364        # If the subscriber never acknowledges the message, the Pub/Sub
365        # system will eventually redeliver the message.
366        #
367        # If this parameter is 0, a default value of 10 seconds is used.
368    "topic": "A String", # The name of the topic from which this subscription is receiving messages.
369        # The value of this field will be `_deleted-topic_` if the topic has been
370        # deleted.
371    "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
372        # used to configure it. An empty `pushConfig` signifies that the subscriber
373        # will pull and ack messages using API methods.
374      "attributes": { # Endpoint configuration attributes.
375          #
376          # Every endpoint has a set of API supported attributes that can be used to
377          # control different aspects of the message delivery.
378          #
379          # The currently supported attribute is `x-goog-version`, which you can
380          # use to change the format of the push message. This attribute
381          # indicates the version of the data expected by the endpoint. This
382          # controls the shape of the envelope (i.e. its fields and metadata).
383          # The endpoint version is based on the version of the Pub/Sub
384          # API.
385          #
386          # If not present during the `CreateSubscription` call, it will default to
387          # the version of the API used to make such call. If not present during a
388          # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
389          # calls will always return a valid version, even if the subscription was
390          # created without this attribute.
391          #
392          # The possible values for this attribute are:
393          #
394          # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
395          # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
396        "a_key": "A String",
397      },
398      "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
399          # For example, a Webhook endpoint might use "https://example.com/push".
400    },
401    "name": "A String", # The name of the subscription. It must have the format
402        # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
403        # start with a letter, and contain only letters (`[A-Za-z]`), numbers
404        # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
405        # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
406        # in length, and it must not start with `"goog"`.
407  }</pre>
408</div>
409
410<div class="method">
411    <code class="details" id="getIamPolicy">getIamPolicy(resource, x__xgafv=None)</code>
412  <pre>Gets the access control policy for a resource.
413Returns an empty policy if the resource exists and does not have a policy
414set.
415
416Args:
417  resource: string, REQUIRED: The resource for which the policy is being requested.
418See the operation documentation for the appropriate value for this field. (required)
419  x__xgafv: string, V1 error format.
420    Allowed values
421      1 - v1 error format
422      2 - v2 error format
423
424Returns:
425  An object of the form:
426
427    { # Defines an Identity and Access Management (IAM) policy. It is used to
428      # specify access control policies for Cloud Platform resources.
429      #
430      #
431      # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
432      # `members` to a `role`, where the members can be user accounts, Google groups,
433      # Google domains, and service accounts. A `role` is a named list of permissions
434      # defined by IAM.
435      #
436      # **Example**
437      #
438      #     {
439      #       "bindings": [
440      #         {
441      #           "role": "roles/owner",
442      #           "members": [
443      #             "user:mike@example.com",
444      #             "group:admins@example.com",
445      #             "domain:google.com",
446      #             "serviceAccount:my-other-app@appspot.gserviceaccount.com",
447      #           ]
448      #         },
449      #         {
450      #           "role": "roles/viewer",
451      #           "members": ["user:sean@example.com"]
452      #         }
453      #       ]
454      #     }
455      #
456      # For a description of IAM and its features, see the
457      # [IAM developer's guide](https://cloud.google.com/iam).
458    "bindings": [ # Associates a list of `members` to a `role`.
459        # Multiple `bindings` must not be specified for the same `role`.
460        # `bindings` with no members will result in an error.
461      { # Associates `members` with a `role`.
462        "role": "A String", # Role that is assigned to `members`.
463            # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
464            # Required
465        "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
466            # `members` can have the following values:
467            #
468            # * `allUsers`: A special identifier that represents anyone who is
469            #    on the internet; with or without a Google account.
470            #
471            # * `allAuthenticatedUsers`: A special identifier that represents anyone
472            #    who is authenticated with a Google account or a service account.
473            #
474            # * `user:{emailid}`: An email address that represents a specific Google
475            #    account. For example, `alice@gmail.com` or `joe@example.com`.
476            #
477            #
478            # * `serviceAccount:{emailid}`: An email address that represents a service
479            #    account. For example, `my-other-app@appspot.gserviceaccount.com`.
480            #
481            # * `group:{emailid}`: An email address that represents a Google group.
482            #    For example, `admins@example.com`.
483            #
484            # * `domain:{domain}`: A Google Apps domain name that represents all the
485            #    users of that domain. For example, `google.com` or `example.com`.
486            #
487          "A String",
488        ],
489      },
490    ],
491    "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
492        # prevent simultaneous updates of a policy from overwriting each other.
493        # It is strongly suggested that systems make use of the `etag` in the
494        # read-modify-write cycle to perform policy updates in order to avoid race
495        # conditions: An `etag` is returned in the response to `getIamPolicy`, and
496        # systems are expected to put that etag in the request to `setIamPolicy` to
497        # ensure that their change will be applied to the same version of the policy.
498        #
499        # If no `etag` is provided in the call to `setIamPolicy`, then the existing
500        # policy is overwritten blindly.
501    "version": 42, # Version of the `Policy`. The default version is 0.
502  }</pre>
503</div>
504
505<div class="method">
506    <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code>
507  <pre>Lists matching subscriptions.
508
509Args:
510  project: string, The name of the cloud project that subscriptions belong to. (required)
511  pageSize: integer, Maximum number of subscriptions to return.
512  pageToken: string, The value returned by the last `ListSubscriptionsResponse`; indicates that
513this is a continuation of a prior `ListSubscriptions` call, and that the
514system should return the next page of data.
515  x__xgafv: string, V1 error format.
516    Allowed values
517      1 - v1 error format
518      2 - v2 error format
519
520Returns:
521  An object of the form:
522
523    { # Response for the `ListSubscriptions` method.
524    "nextPageToken": "A String", # If not empty, indicates that there may be more subscriptions that match
525        # the request; this value should be passed in a new
526        # `ListSubscriptionsRequest` to get more subscriptions.
527    "subscriptions": [ # The subscriptions that match the request.
528      { # A subscription resource.
529        "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message
530            # before the subscriber should acknowledge the message. After message
531            # delivery but before the ack deadline expires and before the message is
532            # acknowledged, it is an outstanding message and will not be delivered
533            # again during that time (on a best-effort basis).
534            #
535            # For pull subscriptions, this value is used as the initial value for the ack
536            # deadline. To override this value for a given message, call
537            # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
538            # The maximum custom deadline you can specify is 600 seconds (10 minutes).
539            #
540            # For push delivery, this value is also used to set the request timeout for
541            # the call to the push endpoint.
542            #
543            # If the subscriber never acknowledges the message, the Pub/Sub
544            # system will eventually redeliver the message.
545            #
546            # If this parameter is 0, a default value of 10 seconds is used.
547        "topic": "A String", # The name of the topic from which this subscription is receiving messages.
548            # The value of this field will be `_deleted-topic_` if the topic has been
549            # deleted.
550        "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
551            # used to configure it. An empty `pushConfig` signifies that the subscriber
552            # will pull and ack messages using API methods.
553          "attributes": { # Endpoint configuration attributes.
554              #
555              # Every endpoint has a set of API supported attributes that can be used to
556              # control different aspects of the message delivery.
557              #
558              # The currently supported attribute is `x-goog-version`, which you can
559              # use to change the format of the push message. This attribute
560              # indicates the version of the data expected by the endpoint. This
561              # controls the shape of the envelope (i.e. its fields and metadata).
562              # The endpoint version is based on the version of the Pub/Sub
563              # API.
564              #
565              # If not present during the `CreateSubscription` call, it will default to
566              # the version of the API used to make such call. If not present during a
567              # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
568              # calls will always return a valid version, even if the subscription was
569              # created without this attribute.
570              #
571              # The possible values for this attribute are:
572              #
573              # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
574              # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
575            "a_key": "A String",
576          },
577          "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
578              # For example, a Webhook endpoint might use "https://example.com/push".
579        },
580        "name": "A String", # The name of the subscription. It must have the format
581            # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
582            # start with a letter, and contain only letters (`[A-Za-z]`), numbers
583            # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
584            # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
585            # in length, and it must not start with `"goog"`.
586      },
587    ],
588  }</pre>
589</div>
590
591<div class="method">
592    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
593  <pre>Retrieves the next page of results.
594
595Args:
596  previous_request: The request for the previous page. (required)
597  previous_response: The response from the request for the previous page. (required)
598
599Returns:
600  A request object that you can call 'execute()' on to request the next
601  page. Returns None if there are no more items in the collection.
602    </pre>
603</div>
604
605<div class="method">
606    <code class="details" id="modifyAckDeadline">modifyAckDeadline(subscription, body, x__xgafv=None)</code>
607  <pre>Modifies the ack deadline for a specific message. This method is useful
608to indicate that more time is needed to process a message by the
609subscriber, or to make the message available for redelivery if the
610processing was interrupted. Note that this does not modify the
611subscription-level `ackDeadlineSeconds` used for subsequent messages.
612
613Args:
614  subscription: string, The name of the subscription. (required)
615  body: object, The request body. (required)
616    The object takes the form of:
617
618{ # Request for the ModifyAckDeadline method.
619    "ackDeadlineSeconds": 42, # The new ack deadline with respect to the time this request was sent to
620        # the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new
621        # ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
622        # was made. Specifying zero may immediately make the message available for
623        # another pull request.
624    "ackIds": [ # List of acknowledgment IDs.
625      "A String",
626    ],
627    "ackId": "A String", # The acknowledgment ID. Either this or ack_ids must be populated, but not
628        # both.
629  }
630
631  x__xgafv: string, V1 error format.
632    Allowed values
633      1 - v1 error format
634      2 - v2 error format
635
636Returns:
637  An object of the form:
638
639    { # A generic empty message that you can re-use to avoid defining duplicated
640      # empty messages in your APIs. A typical example is to use it as the request
641      # or the response type of an API method. For instance:
642      #
643      #     service Foo {
644      #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
645      #     }
646      #
647      # The JSON representation for `Empty` is empty JSON object `{}`.
648  }</pre>
649</div>
650
651<div class="method">
652    <code class="details" id="modifyPushConfig">modifyPushConfig(subscription, body, x__xgafv=None)</code>
653  <pre>Modifies the `PushConfig` for a specified subscription.
654
655This may be used to change a push subscription to a pull one (signified by
656an empty `PushConfig`) or vice versa, or change the endpoint URL and other
657attributes of a push subscription. Messages will accumulate for delivery
658continuously through the call regardless of changes to the `PushConfig`.
659
660Args:
661  subscription: string, The name of the subscription. (required)
662  body: object, The request body. (required)
663    The object takes the form of:
664
665{ # Request for the ModifyPushConfig method.
666    "pushConfig": { # Configuration for a push delivery endpoint. # The push configuration for future deliveries.
667        #
668        # An empty `pushConfig` indicates that the Pub/Sub system should
669        # stop pushing messages from the given subscription and allow
670        # messages to be pulled and acknowledged - effectively pausing
671        # the subscription if `Pull` is not called.
672      "attributes": { # Endpoint configuration attributes.
673          #
674          # Every endpoint has a set of API supported attributes that can be used to
675          # control different aspects of the message delivery.
676          #
677          # The currently supported attribute is `x-goog-version`, which you can
678          # use to change the format of the push message. This attribute
679          # indicates the version of the data expected by the endpoint. This
680          # controls the shape of the envelope (i.e. its fields and metadata).
681          # The endpoint version is based on the version of the Pub/Sub
682          # API.
683          #
684          # If not present during the `CreateSubscription` call, it will default to
685          # the version of the API used to make such call. If not present during a
686          # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
687          # calls will always return a valid version, even if the subscription was
688          # created without this attribute.
689          #
690          # The possible values for this attribute are:
691          #
692          # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
693          # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
694        "a_key": "A String",
695      },
696      "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
697          # For example, a Webhook endpoint might use "https://example.com/push".
698    },
699  }
700
701  x__xgafv: string, V1 error format.
702    Allowed values
703      1 - v1 error format
704      2 - v2 error format
705
706Returns:
707  An object of the form:
708
709    { # A generic empty message that you can re-use to avoid defining duplicated
710      # empty messages in your APIs. A typical example is to use it as the request
711      # or the response type of an API method. For instance:
712      #
713      #     service Foo {
714      #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
715      #     }
716      #
717      # The JSON representation for `Empty` is empty JSON object `{}`.
718  }</pre>
719</div>
720
721<div class="method">
722    <code class="details" id="pull">pull(subscription, body, x__xgafv=None)</code>
723  <pre>Pulls messages from the server. Returns an empty list if there are no
724messages available in the backlog. The server may return `UNAVAILABLE` if
725there are too many concurrent pull requests pending for the given
726subscription.
727
728Args:
729  subscription: string, The subscription from which messages should be pulled. (required)
730  body: object, The request body. (required)
731    The object takes the form of:
732
733{ # Request for the `Pull` method.
734    "returnImmediately": True or False, # If this is specified as true the system will respond immediately even if
735        # it is not able to return a message in the `Pull` response. Otherwise the
736        # system is allowed to wait until at least one message is available rather
737        # than returning no messages. The client may cancel the request if it does
738        # not wish to wait any longer for the response.
739    "maxMessages": 42, # The maximum number of messages returned for this request. The Pub/Sub
740        # system may return fewer than the number specified.
741  }
742
743  x__xgafv: string, V1 error format.
744    Allowed values
745      1 - v1 error format
746      2 - v2 error format
747
748Returns:
749  An object of the form:
750
751    { # Response for the `Pull` method.
752    "receivedMessages": [ # Received Pub/Sub messages. The Pub/Sub system will return zero messages if
753        # there are no more available in the backlog. The Pub/Sub system may return
754        # fewer than the `maxMessages` requested even if there are more messages
755        # available in the backlog.
756      { # A message and its corresponding acknowledgment ID.
757        "ackId": "A String", # This ID can be used to acknowledge the received message.
758        "message": { # A message data and its attributes. The message payload must not be empty; # The message.
759            # it must contain either a non-empty data field, or at least one attribute.
760          "attributes": { # Optional attributes for this message.
761            "a_key": "A String",
762          },
763          "data": "A String", # The message payload. For JSON requests, the value of this field must be
764              # [base64-encoded](https://tools.ietf.org/html/rfc4648).
765          "publishTime": "A String", # The time at which the message was published, populated by the server when
766              # it receives the `Publish` call. It must not be populated by the
767              # publisher in a `Publish` call.
768          "messageId": "A String", # ID of this message, assigned by the server when the message is published.
769              # Guaranteed to be unique within the topic. This value may be read by a
770              # subscriber that receives a `PubsubMessage` via a `Pull` call or a push
771              # delivery. It must not be populated by the publisher in a `Publish` call.
772        },
773      },
774    ],
775  }</pre>
776</div>
777
778<div class="method">
779    <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
780  <pre>Sets the access control policy on the specified resource. Replaces any
781existing policy.
782
783Args:
784  resource: string, REQUIRED: The resource for which the policy is being specified.
785See the operation documentation for the appropriate value for this field. (required)
786  body: object, The request body. (required)
787    The object takes the form of:
788
789{ # Request message for `SetIamPolicy` method.
790    "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
791        # the policy is limited to a few 10s of KB. An empty policy is a
792        # valid policy but certain Cloud Platform services (such as Projects)
793        # might reject them.
794        # specify access control policies for Cloud Platform resources.
795        #
796        #
797        # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
798        # `members` to a `role`, where the members can be user accounts, Google groups,
799        # Google domains, and service accounts. A `role` is a named list of permissions
800        # defined by IAM.
801        #
802        # **Example**
803        #
804        #     {
805        #       "bindings": [
806        #         {
807        #           "role": "roles/owner",
808        #           "members": [
809        #             "user:mike@example.com",
810        #             "group:admins@example.com",
811        #             "domain:google.com",
812        #             "serviceAccount:my-other-app@appspot.gserviceaccount.com",
813        #           ]
814        #         },
815        #         {
816        #           "role": "roles/viewer",
817        #           "members": ["user:sean@example.com"]
818        #         }
819        #       ]
820        #     }
821        #
822        # For a description of IAM and its features, see the
823        # [IAM developer's guide](https://cloud.google.com/iam).
824      "bindings": [ # Associates a list of `members` to a `role`.
825          # Multiple `bindings` must not be specified for the same `role`.
826          # `bindings` with no members will result in an error.
827        { # Associates `members` with a `role`.
828          "role": "A String", # Role that is assigned to `members`.
829              # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
830              # Required
831          "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
832              # `members` can have the following values:
833              #
834              # * `allUsers`: A special identifier that represents anyone who is
835              #    on the internet; with or without a Google account.
836              #
837              # * `allAuthenticatedUsers`: A special identifier that represents anyone
838              #    who is authenticated with a Google account or a service account.
839              #
840              # * `user:{emailid}`: An email address that represents a specific Google
841              #    account. For example, `alice@gmail.com` or `joe@example.com`.
842              #
843              #
844              # * `serviceAccount:{emailid}`: An email address that represents a service
845              #    account. For example, `my-other-app@appspot.gserviceaccount.com`.
846              #
847              # * `group:{emailid}`: An email address that represents a Google group.
848              #    For example, `admins@example.com`.
849              #
850              # * `domain:{domain}`: A Google Apps domain name that represents all the
851              #    users of that domain. For example, `google.com` or `example.com`.
852              #
853            "A String",
854          ],
855        },
856      ],
857      "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
858          # prevent simultaneous updates of a policy from overwriting each other.
859          # It is strongly suggested that systems make use of the `etag` in the
860          # read-modify-write cycle to perform policy updates in order to avoid race
861          # conditions: An `etag` is returned in the response to `getIamPolicy`, and
862          # systems are expected to put that etag in the request to `setIamPolicy` to
863          # ensure that their change will be applied to the same version of the policy.
864          #
865          # If no `etag` is provided in the call to `setIamPolicy`, then the existing
866          # policy is overwritten blindly.
867      "version": 42, # Version of the `Policy`. The default version is 0.
868    },
869  }
870
871  x__xgafv: string, V1 error format.
872    Allowed values
873      1 - v1 error format
874      2 - v2 error format
875
876Returns:
877  An object of the form:
878
879    { # Defines an Identity and Access Management (IAM) policy. It is used to
880      # specify access control policies for Cloud Platform resources.
881      #
882      #
883      # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
884      # `members` to a `role`, where the members can be user accounts, Google groups,
885      # Google domains, and service accounts. A `role` is a named list of permissions
886      # defined by IAM.
887      #
888      # **Example**
889      #
890      #     {
891      #       "bindings": [
892      #         {
893      #           "role": "roles/owner",
894      #           "members": [
895      #             "user:mike@example.com",
896      #             "group:admins@example.com",
897      #             "domain:google.com",
898      #             "serviceAccount:my-other-app@appspot.gserviceaccount.com",
899      #           ]
900      #         },
901      #         {
902      #           "role": "roles/viewer",
903      #           "members": ["user:sean@example.com"]
904      #         }
905      #       ]
906      #     }
907      #
908      # For a description of IAM and its features, see the
909      # [IAM developer's guide](https://cloud.google.com/iam).
910    "bindings": [ # Associates a list of `members` to a `role`.
911        # Multiple `bindings` must not be specified for the same `role`.
912        # `bindings` with no members will result in an error.
913      { # Associates `members` with a `role`.
914        "role": "A String", # Role that is assigned to `members`.
915            # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
916            # Required
917        "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
918            # `members` can have the following values:
919            #
920            # * `allUsers`: A special identifier that represents anyone who is
921            #    on the internet; with or without a Google account.
922            #
923            # * `allAuthenticatedUsers`: A special identifier that represents anyone
924            #    who is authenticated with a Google account or a service account.
925            #
926            # * `user:{emailid}`: An email address that represents a specific Google
927            #    account. For example, `alice@gmail.com` or `joe@example.com`.
928            #
929            #
930            # * `serviceAccount:{emailid}`: An email address that represents a service
931            #    account. For example, `my-other-app@appspot.gserviceaccount.com`.
932            #
933            # * `group:{emailid}`: An email address that represents a Google group.
934            #    For example, `admins@example.com`.
935            #
936            # * `domain:{domain}`: A Google Apps domain name that represents all the
937            #    users of that domain. For example, `google.com` or `example.com`.
938            #
939          "A String",
940        ],
941      },
942    ],
943    "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
944        # prevent simultaneous updates of a policy from overwriting each other.
945        # It is strongly suggested that systems make use of the `etag` in the
946        # read-modify-write cycle to perform policy updates in order to avoid race
947        # conditions: An `etag` is returned in the response to `getIamPolicy`, and
948        # systems are expected to put that etag in the request to `setIamPolicy` to
949        # ensure that their change will be applied to the same version of the policy.
950        #
951        # If no `etag` is provided in the call to `setIamPolicy`, then the existing
952        # policy is overwritten blindly.
953    "version": 42, # Version of the `Policy`. The default version is 0.
954  }</pre>
955</div>
956
957<div class="method">
958    <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
959  <pre>Returns permissions that a caller has on the specified resource.
960If the resource does not exist, this will return an empty set of
961permissions, not a NOT_FOUND error.
962
963Note: This operation is designed to be used for building permission-aware
964UIs and command-line tools, not for authorization checking. This operation
965may "fail open" without warning.
966
967Args:
968  resource: string, REQUIRED: The resource for which the policy detail is being requested.
969See the operation documentation for the appropriate value for this field. (required)
970  body: object, The request body. (required)
971    The object takes the form of:
972
973{ # Request message for `TestIamPermissions` method.
974    "permissions": [ # The set of permissions to check for the `resource`. Permissions with
975        # wildcards (such as '*' or 'storage.*') are not allowed. For more
976        # information see
977        # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
978      "A String",
979    ],
980  }
981
982  x__xgafv: string, V1 error format.
983    Allowed values
984      1 - v1 error format
985      2 - v2 error format
986
987Returns:
988  An object of the form:
989
990    { # Response message for `TestIamPermissions` method.
991    "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
992        # allowed.
993      "A String",
994    ],
995  }</pre>
996</div>
997
998</body></html>