blob: 1aa540b5bacbd69630372eae1c3cc373f4b9ac17 [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">
78 <code><a href="#acknowledge">acknowledge(subscription, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080079<p class="firstline">Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070080<p class="toc_element">
81 <code><a href="#create">create(name, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080082<p class="firstline">Creates a subscription to a given topic for a given subscriber. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070083<p class="toc_element">
84 <code><a href="#delete">delete(subscription, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080085<p class="firstline">Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070086<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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080091<p class="firstline">Gets the access control policy for a `resource`. Is empty if the policy or the resource does not exist.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070092<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 to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.</p>
101<p class="toc_element">
102 <code><a href="#modifyPushConfig">modifyPushConfig(subscription, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800103<p class="firstline">Modifies the `PushConfig` for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the `PushConfig`.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700104<p class="toc_element">
105 <code><a href="#pull">pull(subscription, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800106<p class="firstline">Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return `UNAVAILABLE` if there are too many concurrent pull requests pending for the given subscription.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700107<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 existing policy.</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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800116 <pre>Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error.
Takashi Matsuo06694102015-09-11 13:55:40 -0700117
118Args:
119 subscription: string, The subscription whose message is being acknowledged. (required)
120 body: object, The request body. (required)
121 The object takes the form of:
122
123{ # Request for the Acknowledge method.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800124 "ackIds": [ # The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the `Pull` response. Must not be empty.
Takashi Matsuo06694102015-09-11 13:55:40 -0700125 "A String",
126 ],
127 }
128
129 x__xgafv: string, V1 error format.
130
131Returns:
132 An object of the form:
133
134 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
135 }</pre>
136</div>
137
138<div class="method">
139 <code class="details" id="create">create(name, body, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800140 <pre>Creates a subscription to a given topic for a given subscriber. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.
Takashi Matsuo06694102015-09-11 13:55:40 -0700141
142Args:
143 name: string, The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. (required)
144 body: object, The request body. (required)
145 The object takes the form of:
146
147{ # A subscription resource.
148 "topic": "A String", # The name of the topic from which this subscription is receiving messages. The value of this field will be `_deleted-topic_` if the topic has been deleted.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800149 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull delivery this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id`. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 10 seconds is used.
150 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it. An empty `pushConfig` signifies that the subscriber will pull and ack messages using API methods.
151 "attributes": { # Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the `CreateSubscription` call, it will default to the version of the API used to make such call. If not present during a `ModifyPushConfig` call, its value will not be changed. `GetSubscription` calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Takashi Matsuo06694102015-09-11 13:55:40 -0700152 "a_key": "A String",
153 },
154 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
155 },
156 "name": "A String", # The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
157}
158
159 x__xgafv: string, V1 error format.
160
161Returns:
162 An object of the form:
163
164 { # A subscription resource.
165 "topic": "A String", # The name of the topic from which this subscription is receiving messages. The value of this field will be `_deleted-topic_` if the topic has been deleted.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800166 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull delivery this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id`. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 10 seconds is used.
167 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it. An empty `pushConfig` signifies that the subscriber will pull and ack messages using API methods.
168 "attributes": { # Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the `CreateSubscription` call, it will default to the version of the API used to make such call. If not present during a `ModifyPushConfig` call, its value will not be changed. `GetSubscription` calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Takashi Matsuo06694102015-09-11 13:55:40 -0700169 "a_key": "A String",
170 },
171 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
172 },
173 "name": "A String", # The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
174 }</pre>
175</div>
176
177<div class="method">
178 <code class="details" id="delete">delete(subscription, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800179 <pre>Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified.
Takashi Matsuo06694102015-09-11 13:55:40 -0700180
181Args:
182 subscription: string, The subscription to delete. (required)
183 x__xgafv: string, V1 error format.
184
185Returns:
186 An object of the form:
187
188 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
189 }</pre>
190</div>
191
192<div class="method">
193 <code class="details" id="get">get(subscription, x__xgafv=None)</code>
194 <pre>Gets the configuration details of a subscription.
195
196Args:
197 subscription: string, The name of the subscription to get. (required)
198 x__xgafv: string, V1 error format.
199
200Returns:
201 An object of the form:
202
203 { # A subscription resource.
204 "topic": "A String", # The name of the topic from which this subscription is receiving messages. The value of this field will be `_deleted-topic_` if the topic has been deleted.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800205 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull delivery this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id`. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 10 seconds is used.
206 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it. An empty `pushConfig` signifies that the subscriber will pull and ack messages using API methods.
207 "attributes": { # Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the `CreateSubscription` call, it will default to the version of the API used to make such call. If not present during a `ModifyPushConfig` call, its value will not be changed. `GetSubscription` calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Takashi Matsuo06694102015-09-11 13:55:40 -0700208 "a_key": "A String",
209 },
210 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
211 },
212 "name": "A String", # The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
213 }</pre>
214</div>
215
216<div class="method">
217 <code class="details" id="getIamPolicy">getIamPolicy(resource, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800218 <pre>Gets the access control policy for a `resource`. Is empty if the policy or the resource does not exist.
Takashi Matsuo06694102015-09-11 13:55:40 -0700219
220Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800221 resource: string, REQUIRED: The resource for which policy is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective GetIamPolicy rpc. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700222 x__xgafv: string, V1 error format.
223
224Returns:
225 An object of the form:
226
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800227 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
228 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
229 { # Associates `members` with a `role`.
230 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required
231 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following formats: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700232 "A String",
233 ],
234 },
235 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800236 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700237 "etag": "A String", # Can be used to perform a read-modify-write.
238 }</pre>
239</div>
240
241<div class="method">
242 <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code>
243 <pre>Lists matching subscriptions.
244
245Args:
246 project: string, The name of the cloud project that subscriptions belong to. (required)
247 pageSize: integer, Maximum number of subscriptions to return.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800248 pageToken: string, The value returned by the last `ListSubscriptionsResponse`; indicates that this is a continuation of a prior `ListSubscriptions` call, and that the system should return the next page of data.
Takashi Matsuo06694102015-09-11 13:55:40 -0700249 x__xgafv: string, V1 error format.
250
251Returns:
252 An object of the form:
253
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800254 { # Response for the `ListSubscriptions` method.
255 "nextPageToken": "A String", # If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new `ListSubscriptionsRequest` to get more subscriptions.
Takashi Matsuo06694102015-09-11 13:55:40 -0700256 "subscriptions": [ # The subscriptions that match the request.
257 { # A subscription resource.
258 "topic": "A String", # The name of the topic from which this subscription is receiving messages. The value of this field will be `_deleted-topic_` if the topic has been deleted.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800259 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull delivery this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id`. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 10 seconds is used.
260 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it. An empty `pushConfig` signifies that the subscriber will pull and ack messages using API methods.
261 "attributes": { # Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the `CreateSubscription` call, it will default to the version of the API used to make such call. If not present during a `ModifyPushConfig` call, its value will not be changed. `GetSubscription` calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Takashi Matsuo06694102015-09-11 13:55:40 -0700262 "a_key": "A String",
263 },
264 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
265 },
266 "name": "A String", # The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
267 },
268 ],
269 }</pre>
270</div>
271
272<div class="method">
273 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
274 <pre>Retrieves the next page of results.
275
276Args:
277 previous_request: The request for the previous page. (required)
278 previous_response: The response from the request for the previous page. (required)
279
280Returns:
281 A request object that you can call 'execute()' on to request the next
282 page. Returns None if there are no more items in the collection.
283 </pre>
284</div>
285
286<div class="method">
287 <code class="details" id="modifyAckDeadline">modifyAckDeadline(subscription, body, x__xgafv=None)</code>
288 <pre>Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.
289
290Args:
291 subscription: string, The name of the subscription. (required)
292 body: object, The request body. (required)
293 The object takes the form of:
294
295{ # Request for the ModifyAckDeadline method.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800296 "ackDeadlineSeconds": 42, # The new ack deadline with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after the `ModifyAckDeadline` call was made. Specifying zero may immediately make the message available for another pull request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700297 "ackIds": [ # List of acknowledgment IDs.
298 "A String",
299 ],
300 }
301
302 x__xgafv: string, V1 error format.
303
304Returns:
305 An object of the form:
306
307 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
308 }</pre>
309</div>
310
311<div class="method">
312 <code class="details" id="modifyPushConfig">modifyPushConfig(subscription, body, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800313 <pre>Modifies the `PushConfig` for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the `PushConfig`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700314
315Args:
316 subscription: string, The name of the subscription. (required)
317 body: object, The request body. (required)
318 The object takes the form of:
319
320{ # Request for the ModifyPushConfig method.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800321 "pushConfig": { # Configuration for a push delivery endpoint. # The push configuration for future deliveries. An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages from the given subscription and allow messages to be pulled and acknowledged - effectively pausing the subscription if `Pull` is not called.
322 "attributes": { # Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the `CreateSubscription` call, it will default to the version of the API used to make such call. If not present during a `ModifyPushConfig` call, its value will not be changed. `GetSubscription` calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Takashi Matsuo06694102015-09-11 13:55:40 -0700323 "a_key": "A String",
324 },
325 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
326 },
327 }
328
329 x__xgafv: string, V1 error format.
330
331Returns:
332 An object of the form:
333
334 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
335 }</pre>
336</div>
337
338<div class="method">
339 <code class="details" id="pull">pull(subscription, body, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800340 <pre>Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return `UNAVAILABLE` if there are too many concurrent pull requests pending for the given subscription.
Takashi Matsuo06694102015-09-11 13:55:40 -0700341
342Args:
343 subscription: string, The subscription from which messages should be pulled. (required)
344 body: object, The request body. (required)
345 The object takes the form of:
346
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800347{ # Request for the `Pull` method.
348 "returnImmediately": True or False, # If this is specified as true the system will respond immediately even if it is not able to return a message in the `Pull` response. Otherwise the system is allowed to wait until at least one message is available rather than returning no messages. The client may cancel the request if it does not wish to wait any longer for the response.
Takashi Matsuo06694102015-09-11 13:55:40 -0700349 "maxMessages": 42, # The maximum number of messages returned for this request. The Pub/Sub system may return fewer than the number specified.
350 }
351
352 x__xgafv: string, V1 error format.
353
354Returns:
355 An object of the form:
356
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800357 { # Response for the `Pull` method.
358 "receivedMessages": [ # Received Pub/Sub messages. The Pub/Sub system will return zero messages if there are no more available in the backlog. The Pub/Sub system may return fewer than the `maxMessages` requested even if there are more messages available in the backlog.
Takashi Matsuo06694102015-09-11 13:55:40 -0700359 { # A message and its corresponding acknowledgment ID.
360 "ackId": "A String", # This ID can be used to acknowledge the received message.
361 "message": { # A message data and its attributes. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute. # The message.
362 "attributes": { # Optional attributes for this message.
363 "a_key": "A String",
364 },
365 "data": "A String", # The message payload. For JSON requests, the value of this field must be base64-encoded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800366 "publishTime": "A String", # The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.
367 "messageId": "A String", # ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.
Takashi Matsuo06694102015-09-11 13:55:40 -0700368 },
369 },
370 ],
371 }</pre>
372</div>
373
374<div class="method">
375 <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
376 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
377
378Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800379 resource: string, REQUIRED: The resource for which policy is being specified. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective SetIamPolicy rpc. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700380 body: object, The request body. (required)
381 The object takes the form of:
382
383{ # Request message for `SetIamPolicy` method.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800384 "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). # REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
385 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
386 { # Associates `members` with a `role`.
387 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required
388 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following formats: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700389 "A String",
390 ],
391 },
392 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800393 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700394 "etag": "A String", # Can be used to perform a read-modify-write.
395 },
396 }
397
398 x__xgafv: string, V1 error format.
399
400Returns:
401 An object of the form:
402
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800403 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
404 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
405 { # Associates `members` with a `role`.
406 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required
407 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following formats: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700408 "A String",
409 ],
410 },
411 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800412 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700413 "etag": "A String", # Can be used to perform a read-modify-write.
414 }</pre>
415</div>
416
417<div class="method">
418 <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
419 <pre>Returns permissions that a caller has on the specified resource.
420
421Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800422 resource: string, REQUIRED: The resource for which policy detail is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective TestIamPermissions rpc. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700423 body: object, The request body. (required)
424 The object takes the form of:
425
426{ # Request message for `TestIamPermissions` method.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800427 "permissions": [ # The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
Takashi Matsuo06694102015-09-11 13:55:40 -0700428 "A String",
429 ],
430 }
431
432 x__xgafv: string, V1 error format.
433
434Returns:
435 An object of the form:
436
437 { # Response message for `TestIamPermissions` method.
438 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
439 "A String",
440 ],
441 }</pre>
442</div>
443
444</body></html>