blob: 76d6de0a8aee1ae41768376eb816565e7177beba [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>
79<p class="firstline">Acknowledges the messages associated with the ack tokens 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>
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 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>
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 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>
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. Is empty if the policy or the resource does not exist.</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 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>
103<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>
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 messages available in the backlog. The server may return UNAVAILABLE if there are too many concurrent pull requests pending for the given subscription.</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 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>
116 <pre>Acknowledges the messages associated with the ack tokens 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.
117
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.
124 "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.
125 "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>
140 <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.
141
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.
149 "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.
152 "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.
166 "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.
169 "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>
179 <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.
180
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.
205 "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.
208 "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>
218 <pre>Gets the access control policy for a resource. Is empty if the policy or the resource does not exist.
219
220Args:
221 resource: string, REQUIRED: The resource for which policy is being requested. Resource is usually specified as a path, such as, projects/{project}. (required)
222 x__xgafv: string, V1 error format.
223
224Returns:
225 An object of the form:
226
227 { # # Overview The `Policy` defines an access control policy language. It is used to define policies that are attached to resources like files, folders, VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding` binds a set of members to a role, where the members include user accounts, user groups, user domains, and service accounts. A 'role' is a named set of permissions, defined by IAM. The definition of a role is outside the policy. A permission check first determines the roles that include the specified permission, and then determines if the principal specified is a member of a binding to at least one of these roles. The membership check is recursive when a group is bound to a role. Policy examples: ``` { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } ```
228 "bindings": [ # It is an error to specify multiple bindings for the same role. It is an error to specify a binding with no members.
229 { # Associates members with roles. See below for allowed formats of members.
230 "role": "A String", # The name of the role to which the members should be bound. Examples: "roles/viewer", "roles/editor", "roles/owner". Required
231 "members": [ # Format of member entries: 1. allUsers Matches any requesting principal (users, service accounts or anonymous). 2. allAuthenticatedUsers Matches any requesting authenticated principal (users or service accounts). 3. user:{emailid} A google user account using an email address. For example alice@gmail.com, joe@example.com 4. serviceAccount:{emailid} An service account email. 5. group:{emailid} A google group with an email address. For example auth-ti-cloud@google.com 6. domain:{domain} A Google Apps domain name. For example google.com, example.com
232 "A String",
233 ],
234 },
235 ],
236 "version": 42, # The policy language version. The version of the policy is represented by the etag. The default version is 0.
237 "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.
248 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.
249 x__xgafv: string, V1 error format.
250
251Returns:
252 An object of the form:
253
254 { # 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.
256 "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.
259 "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.
262 "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.
296 "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.
297 "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>
313 <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.
314
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.
321 "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.
323 "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>
340 <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.
341
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
347{ # 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.
349 "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
357 { # 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.
359 { # 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.
366 "messageId": "A String", # ID of this message assigned by the server at publication time. 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 a publisher in a Publish call.
367 },
368 },
369 ],
370 }</pre>
371</div>
372
373<div class="method">
374 <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
375 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
376
377Args:
378 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}. (required)
379 body: object, The request body. (required)
380 The object takes the form of:
381
382{ # Request message for `SetIamPolicy` method.
383 "policy": { # # Overview The `Policy` defines an access control policy language. It is used to define policies that are attached to resources like files, folders, VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding` binds a set of members to a role, where the members include user accounts, user groups, user domains, and service accounts. A 'role' is a named set of permissions, defined by IAM. The definition of a role is outside the policy. A permission check first determines the roles that include the specified permission, and then determines if the principal specified is a member of a binding to at least one of these roles. The membership check is recursive when a group is bound to a role. Policy examples: ``` { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } ``` # 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 in general a valid policy but certain services (like Projects) might reject them.
384 "bindings": [ # It is an error to specify multiple bindings for the same role. It is an error to specify a binding with no members.
385 { # Associates members with roles. See below for allowed formats of members.
386 "role": "A String", # The name of the role to which the members should be bound. Examples: "roles/viewer", "roles/editor", "roles/owner". Required
387 "members": [ # Format of member entries: 1. allUsers Matches any requesting principal (users, service accounts or anonymous). 2. allAuthenticatedUsers Matches any requesting authenticated principal (users or service accounts). 3. user:{emailid} A google user account using an email address. For example alice@gmail.com, joe@example.com 4. serviceAccount:{emailid} An service account email. 5. group:{emailid} A google group with an email address. For example auth-ti-cloud@google.com 6. domain:{domain} A Google Apps domain name. For example google.com, example.com
388 "A String",
389 ],
390 },
391 ],
392 "version": 42, # The policy language version. The version of the policy is represented by the etag. The default version is 0.
393 "etag": "A String", # Can be used to perform a read-modify-write.
394 },
395 }
396
397 x__xgafv: string, V1 error format.
398
399Returns:
400 An object of the form:
401
402 { # # Overview The `Policy` defines an access control policy language. It is used to define policies that are attached to resources like files, folders, VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding` binds a set of members to a role, where the members include user accounts, user groups, user domains, and service accounts. A 'role' is a named set of permissions, defined by IAM. The definition of a role is outside the policy. A permission check first determines the roles that include the specified permission, and then determines if the principal specified is a member of a binding to at least one of these roles. The membership check is recursive when a group is bound to a role. Policy examples: ``` { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } ```
403 "bindings": [ # It is an error to specify multiple bindings for the same role. It is an error to specify a binding with no members.
404 { # Associates members with roles. See below for allowed formats of members.
405 "role": "A String", # The name of the role to which the members should be bound. Examples: "roles/viewer", "roles/editor", "roles/owner". Required
406 "members": [ # Format of member entries: 1. allUsers Matches any requesting principal (users, service accounts or anonymous). 2. allAuthenticatedUsers Matches any requesting authenticated principal (users or service accounts). 3. user:{emailid} A google user account using an email address. For example alice@gmail.com, joe@example.com 4. serviceAccount:{emailid} An service account email. 5. group:{emailid} A google group with an email address. For example auth-ti-cloud@google.com 6. domain:{domain} A Google Apps domain name. For example google.com, example.com
407 "A String",
408 ],
409 },
410 ],
411 "version": 42, # The policy language version. The version of the policy is represented by the etag. The default version is 0.
412 "etag": "A String", # Can be used to perform a read-modify-write.
413 }</pre>
414</div>
415
416<div class="method">
417 <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
418 <pre>Returns permissions that a caller has on the specified resource.
419
420Args:
421 resource: string, REQUIRED: The resource for which policy detail is being requested. Resource is usually specified as a path, such as, projects/{project}. (required)
422 body: object, The request body. (required)
423 The object takes the form of:
424
425{ # Request message for `TestIamPermissions` method.
426 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
427 "A String",
428 ],
429 }
430
431 x__xgafv: string, V1 error format.
432
433Returns:
434 An object of the form:
435
436 { # Response message for `TestIamPermissions` method.
437 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
438 "A String",
439 ],
440 }</pre>
441</div>
442
443</body></html>