blob: 8bde119d222d287db902bf70568dae8a847cfd4b [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="pubsub_v1beta2.html">Cloud Pub/Sub API</a> . <a href="pubsub_v1beta2.projects.html">projects</a> . <a href="pubsub_v1beta2.projects.subscriptions.html">subscriptions</a></h1>
Craig Citroe633be12015-03-02 13:40:36 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#acknowledge">acknowledge(subscription, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070079<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>
80<p class="toc_element">
81 <code><a href="#close">close()</a></code></p>
82<p class="firstline">Close httplib2 connections.</p>
Craig Citroe633be12015-03-02 13:40:36 -080083<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#create">create(name, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085<p class="firstline">Creates a subscription to a given topic. 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. Note that for REST API requests, you must specify a name.</p>
Craig Citroe633be12015-03-02 13:40:36 -080086<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000087 <code><a href="#delete">delete(subscription, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088<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>
Craig Citroe633be12015-03-02 13:40:36 -080089<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000090 <code><a href="#get">get(subscription, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080091<p class="firstline">Gets the configuration details of a subscription.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070094<p class="firstline">Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000095<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080096 <code><a href="#list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080097<p class="firstline">Lists matching subscriptions.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#modifyAckDeadline">modifyAckDeadline(subscription, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103<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. Note that this does not modify the subscription-level `ackDeadlineSeconds` used for subsequent messages.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#modifyPushConfig">modifyPushConfig(subscription, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106<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>
Craig Citroe633be12015-03-02 13:40:36 -0800107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#pull">pull(subscription, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700109<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>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700112<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700115<p class="firstline">Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800116<h3>Method Details</h3>
117<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 <code class="details" id="acknowledge">acknowledge(subscription, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700119 <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.
Craig Citroe633be12015-03-02 13:40:36 -0800120
121Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000122 subscription: string, The subscription whose message is being acknowledged. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800124 The object takes the form of:
125
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000126{ # Request for the Acknowledge method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800127 &quot;ackIds&quot;: [ # The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the `Pull` response. Must not be empty.
128 &quot;A String&quot;,
129 ],
130}
Craig Citroe633be12015-03-02 13:40:36 -0800131
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000132 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800133 Allowed values
134 1 - v1 error format
135 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800136
137Returns:
138 An object of the form:
139
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700140 { # 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 `{}`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800141}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800142</div>
143
144<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700145 <code class="details" id="close">close()</code>
146 <pre>Close httplib2 connections.</pre>
147</div>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800148
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700149<div class="method">
150 <code class="details" id="create">create(name, body=None, x__xgafv=None)</code>
151 <pre>Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn&#x27;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. Note that for REST API requests, you must specify a name.
Craig Citroe633be12015-03-02 13:40:36 -0800152
153Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700154 name: string, The name of the subscription. It must have the format `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{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 `&quot;goog&quot;`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700155 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800156 The object takes the form of:
157
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000158{ # A subscription resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800159 &quot;ackDeadlineSeconds&quot;: 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 subscriptions, 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` if using pull. The maximum custom deadline you can specify is 600 seconds (10 minutes). 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 0, a default value of 10 seconds is used.
160 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{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 `&quot;goog&quot;`.
161 &quot;pushConfig&quot;: { # 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.
162 &quot;attributes&quot;: { # 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.
163 &quot;a_key&quot;: &quot;A String&quot;,
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700164 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800165 &quot;oidcToken&quot;: { # Contains information needed for generating an [OpenID Connect token](https://developers.google.com/identity/protocols/OpenIDConnect). # If specified, Pub/Sub will generate and attach an OIDC JWT token as an `Authorization` header in the HTTP request for every pushed message.
166 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.
167 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts) to be used for generating the OIDC token. The caller (for CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account.
168 },
169 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
170 },
171 &quot;topic&quot;: &quot;A String&quot;, # 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.
172}
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800173
174 x__xgafv: string, V1 error format.
175 Allowed values
176 1 - v1 error format
177 2 - v2 error format
178
179Returns:
180 An object of the form:
181
182 { # A subscription resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800183 &quot;ackDeadlineSeconds&quot;: 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 subscriptions, 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` if using pull. The maximum custom deadline you can specify is 600 seconds (10 minutes). 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 0, a default value of 10 seconds is used.
184 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{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 `&quot;goog&quot;`.
185 &quot;pushConfig&quot;: { # 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.
186 &quot;attributes&quot;: { # 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.
187 &quot;a_key&quot;: &quot;A String&quot;,
188 },
189 &quot;oidcToken&quot;: { # Contains information needed for generating an [OpenID Connect token](https://developers.google.com/identity/protocols/OpenIDConnect). # If specified, Pub/Sub will generate and attach an OIDC JWT token as an `Authorization` header in the HTTP request for every pushed message.
190 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.
191 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts) to be used for generating the OIDC token. The caller (for CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account.
192 },
193 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
194 },
195 &quot;topic&quot;: &quot;A String&quot;, # 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.
196}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800197</div>
198
199<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000200 <code class="details" id="delete">delete(subscription, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700201 <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.
Craig Citroe633be12015-03-02 13:40:36 -0800202
203Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000204 subscription: string, The subscription to delete. (required)
205 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800206 Allowed values
207 1 - v1 error format
208 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800209
210Returns:
211 An object of the form:
212
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700213 { # 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 `{}`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800214}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800215</div>
216
217<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000218 <code class="details" id="get">get(subscription, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800219 <pre>Gets the configuration details of a subscription.
220
221Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000222 subscription: string, The name of the subscription to get. (required)
223 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800224 Allowed values
225 1 - v1 error format
226 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800227
228Returns:
229 An object of the form:
230
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000231 { # A subscription resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800232 &quot;ackDeadlineSeconds&quot;: 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 subscriptions, 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` if using pull. The maximum custom deadline you can specify is 600 seconds (10 minutes). 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 0, a default value of 10 seconds is used.
233 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{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 `&quot;goog&quot;`.
234 &quot;pushConfig&quot;: { # 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.
235 &quot;attributes&quot;: { # 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.
236 &quot;a_key&quot;: &quot;A String&quot;,
237 },
238 &quot;oidcToken&quot;: { # Contains information needed for generating an [OpenID Connect token](https://developers.google.com/identity/protocols/OpenIDConnect). # If specified, Pub/Sub will generate and attach an OIDC JWT token as an `Authorization` header in the HTTP request for every pushed message.
239 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.
240 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts) to be used for generating the OIDC token. The caller (for CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account.
241 },
242 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
243 },
244 &quot;topic&quot;: &quot;A String&quot;, # 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.
245}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800246</div>
247
248<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700249 <code class="details" id="getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700250 <pre>Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Craig Citroe633be12015-03-02 13:40:36 -0800251
252Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700253 resource: string, REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. (required)
254 options_requestedPolicyVersion: integer, Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000255 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800256 Allowed values
257 1 - v1 error format
258 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800259
260Returns:
261 An object of the form:
262
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700263 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800264 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
265 { # Associates `members` with a `role`.
266 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
267 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
268 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
269 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
270 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000271 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800272 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `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@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`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
273 &quot;A String&quot;,
274 ],
275 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
276 },
277 ],
278 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
279 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
280}</pre>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000281</div>
282
283<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800284 <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000285 <pre>Lists matching subscriptions.
286
287Args:
288 project: string, The name of the cloud project that subscriptions belong to. (required)
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800289 pageSize: integer, Maximum number of subscriptions to return.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800290 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.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000291 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800292 Allowed values
293 1 - v1 error format
294 2 - v2 error format
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000295
296Returns:
297 An object of the form:
298
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700299 { # Response for the `ListSubscriptions` method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800300 &quot;nextPageToken&quot;: &quot;A String&quot;, # 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.
301 &quot;subscriptions&quot;: [ # The subscriptions that match the request.
302 { # A subscription resource.
303 &quot;ackDeadlineSeconds&quot;: 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 subscriptions, 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` if using pull. The maximum custom deadline you can specify is 600 seconds (10 minutes). 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 0, a default value of 10 seconds is used.
304 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{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 `&quot;goog&quot;`.
305 &quot;pushConfig&quot;: { # 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.
306 &quot;attributes&quot;: { # 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.
307 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700308 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800309 &quot;oidcToken&quot;: { # Contains information needed for generating an [OpenID Connect token](https://developers.google.com/identity/protocols/OpenIDConnect). # If specified, Pub/Sub will generate and attach an OIDC JWT token as an `Authorization` header in the HTTP request for every pushed message.
310 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.
311 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts) to be used for generating the OIDC token. The caller (for CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account.
312 },
313 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
314 },
315 &quot;topic&quot;: &quot;A String&quot;, # 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.
316 },
317 ],
318}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800319</div>
320
321<div class="method">
322 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
323 <pre>Retrieves the next page of results.
324
325Args:
326 previous_request: The request for the previous page. (required)
327 previous_response: The response from the request for the previous page. (required)
328
329Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700330 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citroe633be12015-03-02 13:40:36 -0800331 page. Returns None if there are no more items in the collection.
332 </pre>
333</div>
334
335<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700336 <code class="details" id="modifyAckDeadline">modifyAckDeadline(subscription, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700337 <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. Note that this does not modify the subscription-level `ackDeadlineSeconds` used for subsequent messages.
Craig Citroe633be12015-03-02 13:40:36 -0800338
339Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000340 subscription: string, The name of the subscription. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700341 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800342 The object takes the form of:
343
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000344{ # Request for the ModifyAckDeadline method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800345 &quot;ackDeadlineSeconds&quot;: 42, # The new ack deadline with respect to the time this request was sent to the Pub/Sub system. Must be &gt;= 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.
346 &quot;ackId&quot;: &quot;A String&quot;, # The acknowledgment ID. Either this or ack_ids must be populated, but not both.
347 &quot;ackIds&quot;: [ # List of acknowledgment IDs.
348 &quot;A String&quot;,
349 ],
350}
Craig Citroe633be12015-03-02 13:40:36 -0800351
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000352 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800353 Allowed values
354 1 - v1 error format
355 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800356
357Returns:
358 An object of the form:
359
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700360 { # 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 `{}`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800361}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800362</div>
363
364<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700365 <code class="details" id="modifyPushConfig">modifyPushConfig(subscription, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700366 <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`.
Craig Citroe633be12015-03-02 13:40:36 -0800367
368Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000369 subscription: string, The name of the subscription. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700370 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800371 The object takes the form of:
372
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000373{ # Request for the ModifyPushConfig method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800374 &quot;pushConfig&quot;: { # 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.
375 &quot;attributes&quot;: { # 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.
376 &quot;a_key&quot;: &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800377 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800378 &quot;oidcToken&quot;: { # Contains information needed for generating an [OpenID Connect token](https://developers.google.com/identity/protocols/OpenIDConnect). # If specified, Pub/Sub will generate and attach an OIDC JWT token as an `Authorization` header in the HTTP request for every pushed message.
379 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.
380 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts) to be used for generating the OIDC token. The caller (for CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account.
381 },
382 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
383 },
384}
Craig Citroe633be12015-03-02 13:40:36 -0800385
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000386 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800387 Allowed values
388 1 - v1 error format
389 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800390
391Returns:
392 An object of the form:
393
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700394 { # 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 `{}`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800395}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800396</div>
397
398<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700399 <code class="details" id="pull">pull(subscription, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700400 <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.
Craig Citroe633be12015-03-02 13:40:36 -0800401
402Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000403 subscription: string, The subscription from which messages should be pulled. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700404 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800405 The object takes the form of:
406
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700407{ # Request for the `Pull` method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800408 &quot;maxMessages&quot;: 42, # The maximum number of messages returned for this request. The Pub/Sub system may return fewer than the number specified.
409 &quot;returnImmediately&quot;: True or False, # Optional. 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. Warning: setting this field to `true` is discouraged because it adversely impacts the performance of `Pull` operations. We recommend that users do not set this field.
410}
Craig Citroe633be12015-03-02 13:40:36 -0800411
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000412 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800413 Allowed values
414 1 - v1 error format
415 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800416
417Returns:
418 An object of the form:
419
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700420 { # Response for the `Pull` method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800421 &quot;receivedMessages&quot;: [ # 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.
422 { # A message and its corresponding acknowledgment ID.
423 &quot;ackId&quot;: &quot;A String&quot;, # This ID can be used to acknowledge the received message.
424 &quot;message&quot;: { # 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.
425 &quot;attributes&quot;: { # Optional attributes for this message.
426 &quot;a_key&quot;: &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800427 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800428 &quot;data&quot;: &quot;A String&quot;, # The message payload. For JSON requests, the value of this field must be [base64-encoded](https://tools.ietf.org/html/rfc4648).
429 &quot;messageId&quot;: &quot;A String&quot;, # 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.
430 &quot;publishTime&quot;: &quot;A String&quot;, # 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.
Craig Citroe633be12015-03-02 13:40:36 -0800431 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800432 },
433 ],
434}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800435</div>
436
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000437<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700438 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700439 <pre>Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
Dan O'Mearadd494642020-05-01 07:42:23 -0700440
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000441Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700442 resource: string, REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700443 body: object, The request body.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000444 The object takes the form of:
445
446{ # Request message for `SetIamPolicy` method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800447 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # 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.
448 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
449 { # Associates `members` with a `role`.
450 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
451 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
452 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
453 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
454 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000455 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800456 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `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@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`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
457 &quot;A String&quot;,
458 ],
459 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
460 },
461 ],
462 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
463 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
464 },
465}
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000466
467 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800468 Allowed values
469 1 - v1 error format
470 2 - v2 error format
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000471
472Returns:
473 An object of the form:
474
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700475 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800476 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
477 { # Associates `members` with a `role`.
478 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
479 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
480 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
481 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
482 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000483 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800484 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `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@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`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
485 &quot;A String&quot;,
486 ],
487 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
488 },
489 ],
490 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
491 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
492}</pre>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000493</div>
494
495<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700496 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700497 <pre>Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may &quot;fail open&quot; without warning.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400498
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000499Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700500 resource: string, REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700501 body: object, The request body.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000502 The object takes the form of:
503
504{ # Request message for `TestIamPermissions` method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800505 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
506 &quot;A String&quot;,
507 ],
508}
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000509
510 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800511 Allowed values
512 1 - v1 error format
513 2 - v2 error format
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000514
515Returns:
516 An object of the form:
517
518 { # Response message for `TestIamPermissions` method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800519 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
520 &quot;A String&quot;,
521 ],
522}</pre>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000523</div>
524
Craig Citroe633be12015-03-02 13:40:36 -0800525</body></html>