blob: f161c02f64b7962d5d43f6fe81fd6c5810607507 [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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="pubsub_v1.html">Cloud Pub/Sub API</a> . <a href="pubsub_v1.projects.html">projects</a> . <a href="pubsub_v1.projects.subscriptions.html">subscriptions</a></h1>
Takashi Matsuo06694102015-09-11 13:55:40 -070076<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>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080079<p class="firstline">Acknowledges the messages associated with the `ack_ids` in the</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#create">create(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070082<p class="firstline">Creates a subscription to a given topic. See the [resource name rules]</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070083<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070084 <code><a href="#delete">delete(subscription, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080085<p class="firstline">Deletes an existing subscription. All messages retained in the subscription</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070086<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070087 <code><a href="#detach">detach(subscription, x__xgafv=None)</a></code></p>
88<p class="firstline">Detaches a subscription from this topic. All messages retained in the</p>
89<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070090 <code><a href="#get">get(subscription, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070091<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>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080094<p class="firstline">Gets the access control policy for a resource.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070095<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070096 <code><a href="#list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070097<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>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800103<p class="firstline">Modifies the ack deadline for a specific message. This method is useful</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700104<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>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800106<p class="firstline">Modifies the `PushConfig` for a specified subscription.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#patch">patch(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Updates an existing subscription. Note that certain properties of a</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#pull">pull(subscription, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Pulls messages from the server. The server may return `UNAVAILABLE` if</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#seek">seek(subscription, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115<p class="firstline">Seeks an existing subscription to a point in time or to a given snapshot,</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800118<p class="firstline">Sets the access control policy on the specified resource. Replaces any</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700121<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
122<h3>Method Details</h3>
123<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700124 <code class="details" id="acknowledge">acknowledge(subscription, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800125 <pre>Acknowledges the messages associated with the `ack_ids` in the
126`AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
127from the subscription.
128
129Acknowledging a message whose ack deadline has expired may succeed,
130but such a message may be redelivered later. Acknowledging a message more
131than once will not result in an error.
Takashi Matsuo06694102015-09-11 13:55:40 -0700132
133Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700134 subscription: string, Required. The subscription whose message is being acknowledged.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800135Format is `projects/{project}/subscriptions/{sub}`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700136 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700137 The object takes the form of:
138
139{ # Request for the Acknowledge method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700140 &quot;ackIds&quot;: [ # Required. The acknowledgment ID for the messages being acknowledged that was returned
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800141 # by the Pub/Sub system in the `Pull` response. Must not be empty.
Bu Sun Kim65020912020-05-20 12:08:20 -0700142 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700143 ],
144 }
145
146 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800147 Allowed values
148 1 - v1 error format
149 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700150
151Returns:
152 An object of the form:
153
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800154 { # A generic empty message that you can re-use to avoid defining duplicated
155 # empty messages in your APIs. A typical example is to use it as the request
156 # or the response type of an API method. For instance:
157 #
158 # service Foo {
159 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
160 # }
161 #
162 # The JSON representation for `Empty` is empty JSON object `{}`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700163 }</pre>
164</div>
165
166<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700167 <code class="details" id="create">create(name, body=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700168 <pre>Creates a subscription to a given topic. See the [resource name rules]
169(https://cloud.google.com/pubsub/docs/admin#resource_names).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800170If the subscription already exists, returns `ALREADY_EXISTS`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700171If the corresponding topic doesn&#x27;t exist, returns `NOT_FOUND`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800172
173If the name is not provided in the request, the server will assign a random
174name for this subscription on the same project as the topic, conforming
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700175to the [resource name format]
176(https://cloud.google.com/pubsub/docs/admin#resource_names). The generated
177name is populated in the returned Subscription object. Note that for REST
178API requests, you must specify a name in the request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700179
180Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700181 name: string, Required. The name of the subscription. It must have the format
Bu Sun Kim65020912020-05-20 12:08:20 -0700182`&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800183start with a letter, and contain only letters (`[A-Za-z]`), numbers
184(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
185plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
Bu Sun Kim65020912020-05-20 12:08:20 -0700186in length, and it must not start with `&quot;goog&quot;`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700187 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700188 The object takes the form of:
189
190{ # A subscription resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700191 &quot;topic&quot;: &quot;A String&quot;, # Required. The name of the topic from which this subscription is receiving messages.
192 # Format is `projects/{project}/topics/{topic}`.
193 # The value of this field will be `_deleted-topic_` if the topic has been
194 # deleted.
195 &quot;ackDeadlineSeconds&quot;: 42, # The approximate amount of time (on a best-effort basis) Pub/Sub waits for
196 # the subscriber to acknowledge receipt before resending the message. In the
197 # interval after the message is delivered and before it is acknowledged, it
198 # is considered to be &lt;i&gt;outstanding&lt;/i&gt;. During that time period, the
199 # message will not be redelivered (on a best-effort basis).
200 #
201 # For pull subscriptions, this value is used as the initial value for the ack
202 # deadline. To override this value for a given message, call
203 # `ModifyAckDeadline` with the corresponding `ack_id` if using
204 # non-streaming pull or send the `ack_id` in a
205 # `StreamingModifyAckDeadlineRequest` if using streaming pull.
206 # The minimum custom deadline you can specify is 10 seconds.
207 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
208 # If this parameter is 0, a default value of 10 seconds is used.
209 #
210 # For push delivery, this value is also used to set the request timeout for
211 # the call to the push endpoint.
212 #
213 # If the subscriber never acknowledges the message, the Pub/Sub
214 # system will eventually redeliver the message.
215 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
216 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700217 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700218 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700219 &quot;expirationPolicy&quot;: { # A policy that specifies the conditions for resource expiration (i.e., # A policy that specifies the conditions for this subscription&#x27;s expiration.
220 # A subscription is considered active as long as any connected subscriber is
221 # successfully consuming messages from the subscription or is issuing
222 # operations on the subscription. If `expiration_policy` is not set, a
223 # *default policy* with `ttl` of 31 days will be used. The minimum allowed
224 # value for `expiration_policy.ttl` is 1 day.
225 # automatic resource deletion).
226 &quot;ttl&quot;: &quot;A String&quot;, # Specifies the &quot;time-to-live&quot; duration for an associated resource. The
227 # resource expires if it is not active for a period of `ttl`. The definition
228 # of &quot;activity&quot; depends on the type of the associated resource. The minimum
229 # and maximum allowed values for `ttl` depend on the type of the associated
230 # resource, as well. If `ttl` is not set, the associated resource never
231 # expires.
Dan O'Mearadd494642020-05-01 07:42:23 -0700232 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700233 &quot;retryPolicy&quot;: { # A policy that specifies how Cloud Pub/Sub retries message delivery. # A policy that specifies how Pub/Sub retries message delivery for this
234 # subscription.
235 #
236 # If not set, the default retry policy is applied. This generally implies
237 # that messages will be retried as soon as possible for healthy subscribers.
238 # RetryPolicy will be triggered on NACKs or acknowledgement deadline
239 # exceeded events for a given message.
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700241 # Retry delay will be exponential based on provided minimum and maximum
242 # backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700243 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700244 # RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded
245 # events for a given message.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700246 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700247 # Retry Policy is implemented on a best effort basis. At times, the delay
248 # between consecutive deliveries may not match the configuration. That is,
249 # delay can be more or less than configured backoff.
250 &quot;minimumBackoff&quot;: &quot;A String&quot;, # The minimum delay between consecutive deliveries of a given message.
251 # Value should be between 0 and 600 seconds. Defaults to 10 seconds.
252 &quot;maximumBackoff&quot;: &quot;A String&quot;, # The maximum delay between consecutive deliveries of a given message.
253 # Value should be between 0 and 600 seconds. Defaults to 600 seconds.
254 },
255 &quot;messageRetentionDuration&quot;: &quot;A String&quot;, # How long to retain unacknowledged messages in the subscription&#x27;s backlog,
256 # from the moment a message is published.
257 # If `retain_acked_messages` is true, then this also configures the retention
258 # of acknowledged messages, and thus configures how far back in time a `Seek`
259 # can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
260 # minutes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700261 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800262 # used to configure it. An empty `pushConfig` signifies that the subscriber
263 # will pull and ack messages using API methods.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700264 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
265 # `Authorization` header in the HTTP request for every pushed message.
266 # [OpenID Connect
267 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
268 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
269 # identifies the recipients that the JWT is intended for. The audience
270 # value is a single case-sensitive string. Having multiple values (array)
271 # for the audience field is not supported. More info about the OIDC JWT
272 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
273 # Note: if not specified, the Push endpoint URL will be used.
274 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
275 # email](https://cloud.google.com/iam/docs/service-accounts)
276 # to be used for generating the OIDC token. The caller (for
277 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
278 # have the iam.serviceAccounts.actAs permission for the service account.
279 },
280 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
281 # For example, a Webhook endpoint might use `https://example.com/push`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700282 &quot;attributes&quot;: { # Endpoint configuration attributes that can be used to control different
Dan O'Mearadd494642020-05-01 07:42:23 -0700283 # aspects of the message delivery.
284 #
285 # The only currently supported attribute is `x-goog-version`, which you can
286 # use to change the format of the pushed message. This attribute
287 # indicates the version of the data expected by the endpoint. This
288 # controls the shape of the pushed message (i.e., its fields and metadata).
289 #
290 # If not present during the `CreateSubscription` call, it will default to
291 # the version of the Pub/Sub API used to make such call. If not present in a
292 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
293 # calls will always return a valid version, even if the subscription was
294 # created without this attribute.
295 #
296 # The only supported values for the `x-goog-version` attribute are:
297 #
298 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
299 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
300 #
301 # For example:
Bu Sun Kim65020912020-05-20 12:08:20 -0700302 # &lt;pre&gt;&lt;code&gt;attributes { &quot;x-goog-version&quot;: &quot;v1&quot; } &lt;/code&gt;&lt;/pre&gt;
303 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700304 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700305 },
306 &quot;deadLetterPolicy&quot;: { # Dead lettering is done on a best effort basis. The same message might be # A policy that specifies the conditions for dead lettering messages in
307 # this subscription. If dead_letter_policy is not set, dead lettering
308 # is disabled.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700309 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700310 # The Cloud Pub/Sub service account associated with this subscriptions&#x27;s
311 # parent project (i.e.,
312 # service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
313 # permission to Acknowledge() messages on this subscription.
314 # dead lettered multiple times.
315 #
316 # If validation on any of the fields fails at subscription creation/updation,
317 # the create/update subscription request will fail.
318 &quot;deadLetterTopic&quot;: &quot;A String&quot;, # The name of the topic to which dead letter messages should be published.
319 # Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
320 # account associated with the enclosing subscription&#x27;s parent project (i.e.,
Dan O'Mearadd494642020-05-01 07:42:23 -0700321 # service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700322 # permission to Publish() to this topic.
Dan O'Mearadd494642020-05-01 07:42:23 -0700323 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700324 # The operation will fail if the topic does not exist.
325 # Users should ensure that there is a subscription attached to this topic
326 # since messages published to a topic with no subscriptions are lost.
327 &quot;maxDeliveryAttempts&quot;: 42, # The maximum number of delivery attempts for any message. The value must be
328 # between 5 and 100.
Dan O'Mearadd494642020-05-01 07:42:23 -0700329 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700330 # The number of delivery attempts is defined as 1 + (the sum of number of
331 # NACKs and number of times the acknowledgement deadline has been exceeded
332 # for the message).
Dan O'Mearadd494642020-05-01 07:42:23 -0700333 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700334 # A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that
335 # client libraries may automatically extend ack_deadlines.
Dan O'Mearadd494642020-05-01 07:42:23 -0700336 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700337 # This field will be honored on a best effort basis.
338 #
339 # If this parameter is 0, a default value of 5 is used.
340 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700341 &quot;filter&quot;: &quot;A String&quot;, # An expression written in the Pub/Sub [filter
342 # language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
343 # then only `PubsubMessage`s whose `attributes` field matches the filter are
344 # delivered on this subscription. If empty, then no messages are filtered
345 # out.
346 &quot;retainAckedMessages&quot;: True or False, # Indicates whether to retain acknowledged messages. If true, then
347 # messages are not expunged from the subscription&#x27;s backlog, even if they are
348 # acknowledged, until they fall out of the `message_retention_duration`
349 # window. This must be true if you would like to [Seek to a timestamp]
350 # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700351 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the subscription. It must have the format
352 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
353 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
354 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
355 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
356 # in length, and it must not start with `&quot;goog&quot;`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700357 }
358
359 x__xgafv: string, V1 error format.
360 Allowed values
361 1 - v1 error format
362 2 - v2 error format
363
364Returns:
365 An object of the form:
366
367 { # A subscription resource.
368 &quot;topic&quot;: &quot;A String&quot;, # Required. The name of the topic from which this subscription is receiving messages.
369 # Format is `projects/{project}/topics/{topic}`.
370 # The value of this field will be `_deleted-topic_` if the topic has been
371 # deleted.
372 &quot;ackDeadlineSeconds&quot;: 42, # The approximate amount of time (on a best-effort basis) Pub/Sub waits for
373 # the subscriber to acknowledge receipt before resending the message. In the
374 # interval after the message is delivered and before it is acknowledged, it
375 # is considered to be &lt;i&gt;outstanding&lt;/i&gt;. During that time period, the
376 # message will not be redelivered (on a best-effort basis).
377 #
378 # For pull subscriptions, this value is used as the initial value for the ack
379 # deadline. To override this value for a given message, call
380 # `ModifyAckDeadline` with the corresponding `ack_id` if using
381 # non-streaming pull or send the `ack_id` in a
382 # `StreamingModifyAckDeadlineRequest` if using streaming pull.
383 # The minimum custom deadline you can specify is 10 seconds.
384 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
385 # If this parameter is 0, a default value of 10 seconds is used.
386 #
387 # For push delivery, this value is also used to set the request timeout for
388 # the call to the push endpoint.
389 #
390 # If the subscriber never acknowledges the message, the Pub/Sub
391 # system will eventually redeliver the message.
392 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
393 # managing labels&lt;/a&gt;.
394 &quot;a_key&quot;: &quot;A String&quot;,
395 },
396 &quot;expirationPolicy&quot;: { # A policy that specifies the conditions for resource expiration (i.e., # A policy that specifies the conditions for this subscription&#x27;s expiration.
397 # A subscription is considered active as long as any connected subscriber is
398 # successfully consuming messages from the subscription or is issuing
399 # operations on the subscription. If `expiration_policy` is not set, a
400 # *default policy* with `ttl` of 31 days will be used. The minimum allowed
401 # value for `expiration_policy.ttl` is 1 day.
402 # automatic resource deletion).
403 &quot;ttl&quot;: &quot;A String&quot;, # Specifies the &quot;time-to-live&quot; duration for an associated resource. The
404 # resource expires if it is not active for a period of `ttl`. The definition
405 # of &quot;activity&quot; depends on the type of the associated resource. The minimum
406 # and maximum allowed values for `ttl` depend on the type of the associated
407 # resource, as well. If `ttl` is not set, the associated resource never
408 # expires.
409 },
410 &quot;retryPolicy&quot;: { # A policy that specifies how Cloud Pub/Sub retries message delivery. # A policy that specifies how Pub/Sub retries message delivery for this
411 # subscription.
412 #
413 # If not set, the default retry policy is applied. This generally implies
414 # that messages will be retried as soon as possible for healthy subscribers.
415 # RetryPolicy will be triggered on NACKs or acknowledgement deadline
416 # exceeded events for a given message.
417 #
418 # Retry delay will be exponential based on provided minimum and maximum
419 # backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.
420 #
421 # RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded
422 # events for a given message.
423 #
424 # Retry Policy is implemented on a best effort basis. At times, the delay
425 # between consecutive deliveries may not match the configuration. That is,
426 # delay can be more or less than configured backoff.
427 &quot;minimumBackoff&quot;: &quot;A String&quot;, # The minimum delay between consecutive deliveries of a given message.
428 # Value should be between 0 and 600 seconds. Defaults to 10 seconds.
429 &quot;maximumBackoff&quot;: &quot;A String&quot;, # The maximum delay between consecutive deliveries of a given message.
430 # Value should be between 0 and 600 seconds. Defaults to 600 seconds.
431 },
432 &quot;messageRetentionDuration&quot;: &quot;A String&quot;, # How long to retain unacknowledged messages in the subscription&#x27;s backlog,
433 # from the moment a message is published.
434 # If `retain_acked_messages` is true, then this also configures the retention
435 # of acknowledged messages, and thus configures how far back in time a `Seek`
436 # can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
437 # minutes.
438 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
439 # used to configure it. An empty `pushConfig` signifies that the subscriber
440 # will pull and ack messages using API methods.
441 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
442 # `Authorization` header in the HTTP request for every pushed message.
443 # [OpenID Connect
444 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
445 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
446 # identifies the recipients that the JWT is intended for. The audience
447 # value is a single case-sensitive string. Having multiple values (array)
448 # for the audience field is not supported. More info about the OIDC JWT
449 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
450 # Note: if not specified, the Push endpoint URL will be used.
451 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
452 # email](https://cloud.google.com/iam/docs/service-accounts)
453 # to be used for generating the OIDC token. The caller (for
454 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
455 # have the iam.serviceAccounts.actAs permission for the service account.
456 },
457 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
458 # For example, a Webhook endpoint might use `https://example.com/push`.
459 &quot;attributes&quot;: { # Endpoint configuration attributes that can be used to control different
460 # aspects of the message delivery.
461 #
462 # The only currently supported attribute is `x-goog-version`, which you can
463 # use to change the format of the pushed message. This attribute
464 # indicates the version of the data expected by the endpoint. This
465 # controls the shape of the pushed message (i.e., its fields and metadata).
466 #
467 # If not present during the `CreateSubscription` call, it will default to
468 # the version of the Pub/Sub API used to make such call. If not present in a
469 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
470 # calls will always return a valid version, even if the subscription was
471 # created without this attribute.
472 #
473 # The only supported values for the `x-goog-version` attribute are:
474 #
475 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
476 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
477 #
478 # For example:
479 # &lt;pre&gt;&lt;code&gt;attributes { &quot;x-goog-version&quot;: &quot;v1&quot; } &lt;/code&gt;&lt;/pre&gt;
480 &quot;a_key&quot;: &quot;A String&quot;,
481 },
482 },
483 &quot;deadLetterPolicy&quot;: { # Dead lettering is done on a best effort basis. The same message might be # A policy that specifies the conditions for dead lettering messages in
484 # this subscription. If dead_letter_policy is not set, dead lettering
485 # is disabled.
486 #
487 # The Cloud Pub/Sub service account associated with this subscriptions&#x27;s
488 # parent project (i.e.,
489 # service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
490 # permission to Acknowledge() messages on this subscription.
491 # dead lettered multiple times.
492 #
493 # If validation on any of the fields fails at subscription creation/updation,
494 # the create/update subscription request will fail.
495 &quot;deadLetterTopic&quot;: &quot;A String&quot;, # The name of the topic to which dead letter messages should be published.
496 # Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
497 # account associated with the enclosing subscription&#x27;s parent project (i.e.,
498 # service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
499 # permission to Publish() to this topic.
500 #
501 # The operation will fail if the topic does not exist.
502 # Users should ensure that there is a subscription attached to this topic
503 # since messages published to a topic with no subscriptions are lost.
504 &quot;maxDeliveryAttempts&quot;: 42, # The maximum number of delivery attempts for any message. The value must be
505 # between 5 and 100.
506 #
507 # The number of delivery attempts is defined as 1 + (the sum of number of
508 # NACKs and number of times the acknowledgement deadline has been exceeded
509 # for the message).
510 #
511 # A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that
512 # client libraries may automatically extend ack_deadlines.
513 #
514 # This field will be honored on a best effort basis.
515 #
516 # If this parameter is 0, a default value of 5 is used.
517 },
518 &quot;filter&quot;: &quot;A String&quot;, # An expression written in the Pub/Sub [filter
519 # language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
520 # then only `PubsubMessage`s whose `attributes` field matches the filter are
521 # delivered on this subscription. If empty, then no messages are filtered
522 # out.
523 &quot;retainAckedMessages&quot;: True or False, # Indicates whether to retain acknowledged messages. If true, then
524 # messages are not expunged from the subscription&#x27;s backlog, even if they are
525 # acknowledged, until they fall out of the `message_retention_duration`
526 # window. This must be true if you would like to [Seek to a timestamp]
527 # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time).
528 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the subscription. It must have the format
529 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
530 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
531 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
532 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
533 # in length, and it must not start with `&quot;goog&quot;`.
534 }</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700535</div>
536
537<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700538 <code class="details" id="delete">delete(subscription, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800539 <pre>Deletes an existing subscription. All messages retained in the subscription
540are immediately dropped. Calls to `Pull` after deletion will return
541`NOT_FOUND`. After a subscription is deleted, a new one may be created with
542the same name, but the new one has no association with the old
543subscription or its topic unless the same topic is specified.
Takashi Matsuo06694102015-09-11 13:55:40 -0700544
545Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700546 subscription: string, Required. The subscription to delete.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800547Format is `projects/{project}/subscriptions/{sub}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700548 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800549 Allowed values
550 1 - v1 error format
551 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700552
553Returns:
554 An object of the form:
555
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800556 { # A generic empty message that you can re-use to avoid defining duplicated
557 # empty messages in your APIs. A typical example is to use it as the request
558 # or the response type of an API method. For instance:
559 #
560 # service Foo {
561 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
562 # }
563 #
564 # The JSON representation for `Empty` is empty JSON object `{}`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700565 }</pre>
566</div>
567
568<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700569 <code class="details" id="detach">detach(subscription, x__xgafv=None)</code>
570 <pre>Detaches a subscription from this topic. All messages retained in the
571subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
572will return FAILED_PRECONDITION. If the subscription is a push
573subscription, pushes to the endpoint will stop.
574
575Args:
576 subscription: string, Required. The subscription to detach.
577Format is `projects/{project}/subscriptions/{subscription}`. (required)
578 x__xgafv: string, V1 error format.
579 Allowed values
580 1 - v1 error format
581 2 - v2 error format
582
583Returns:
584 An object of the form:
585
586 { # Response for the DetachSubscription method.
587 # Reserved for future use.
588 }</pre>
589</div>
590
591<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700592 <code class="details" id="get">get(subscription, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700593 <pre>Gets the configuration details of a subscription.
594
595Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700596 subscription: string, Required. The name of the subscription to get.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800597Format is `projects/{project}/subscriptions/{sub}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700598 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800599 Allowed values
600 1 - v1 error format
601 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700602
603Returns:
604 An object of the form:
605
606 { # A subscription resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700607 &quot;topic&quot;: &quot;A String&quot;, # Required. The name of the topic from which this subscription is receiving messages.
608 # Format is `projects/{project}/topics/{topic}`.
609 # The value of this field will be `_deleted-topic_` if the topic has been
610 # deleted.
611 &quot;ackDeadlineSeconds&quot;: 42, # The approximate amount of time (on a best-effort basis) Pub/Sub waits for
612 # the subscriber to acknowledge receipt before resending the message. In the
613 # interval after the message is delivered and before it is acknowledged, it
614 # is considered to be &lt;i&gt;outstanding&lt;/i&gt;. During that time period, the
615 # message will not be redelivered (on a best-effort basis).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700616 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700617 # For pull subscriptions, this value is used as the initial value for the ack
618 # deadline. To override this value for a given message, call
619 # `ModifyAckDeadline` with the corresponding `ack_id` if using
620 # non-streaming pull or send the `ack_id` in a
621 # `StreamingModifyAckDeadlineRequest` if using streaming pull.
622 # The minimum custom deadline you can specify is 10 seconds.
623 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
624 # If this parameter is 0, a default value of 10 seconds is used.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700625 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700626 # For push delivery, this value is also used to set the request timeout for
627 # the call to the push endpoint.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700628 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700629 # If the subscriber never acknowledges the message, the Pub/Sub
630 # system will eventually redeliver the message.
631 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
632 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700633 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700634 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700635 &quot;expirationPolicy&quot;: { # A policy that specifies the conditions for resource expiration (i.e., # A policy that specifies the conditions for this subscription&#x27;s expiration.
636 # A subscription is considered active as long as any connected subscriber is
637 # successfully consuming messages from the subscription or is issuing
638 # operations on the subscription. If `expiration_policy` is not set, a
639 # *default policy* with `ttl` of 31 days will be used. The minimum allowed
640 # value for `expiration_policy.ttl` is 1 day.
641 # automatic resource deletion).
642 &quot;ttl&quot;: &quot;A String&quot;, # Specifies the &quot;time-to-live&quot; duration for an associated resource. The
643 # resource expires if it is not active for a period of `ttl`. The definition
644 # of &quot;activity&quot; depends on the type of the associated resource. The minimum
645 # and maximum allowed values for `ttl` depend on the type of the associated
646 # resource, as well. If `ttl` is not set, the associated resource never
647 # expires.
Dan O'Mearadd494642020-05-01 07:42:23 -0700648 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700649 &quot;retryPolicy&quot;: { # A policy that specifies how Cloud Pub/Sub retries message delivery. # A policy that specifies how Pub/Sub retries message delivery for this
650 # subscription.
651 #
652 # If not set, the default retry policy is applied. This generally implies
653 # that messages will be retried as soon as possible for healthy subscribers.
654 # RetryPolicy will be triggered on NACKs or acknowledgement deadline
655 # exceeded events for a given message.
656 #
657 # Retry delay will be exponential based on provided minimum and maximum
658 # backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.
659 #
660 # RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded
661 # events for a given message.
662 #
663 # Retry Policy is implemented on a best effort basis. At times, the delay
664 # between consecutive deliveries may not match the configuration. That is,
665 # delay can be more or less than configured backoff.
666 &quot;minimumBackoff&quot;: &quot;A String&quot;, # The minimum delay between consecutive deliveries of a given message.
667 # Value should be between 0 and 600 seconds. Defaults to 10 seconds.
668 &quot;maximumBackoff&quot;: &quot;A String&quot;, # The maximum delay between consecutive deliveries of a given message.
669 # Value should be between 0 and 600 seconds. Defaults to 600 seconds.
670 },
671 &quot;messageRetentionDuration&quot;: &quot;A String&quot;, # How long to retain unacknowledged messages in the subscription&#x27;s backlog,
672 # from the moment a message is published.
673 # If `retain_acked_messages` is true, then this also configures the retention
674 # of acknowledged messages, and thus configures how far back in time a `Seek`
675 # can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
676 # minutes.
677 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
678 # used to configure it. An empty `pushConfig` signifies that the subscriber
679 # will pull and ack messages using API methods.
680 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
681 # `Authorization` header in the HTTP request for every pushed message.
682 # [OpenID Connect
683 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
684 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
685 # identifies the recipients that the JWT is intended for. The audience
686 # value is a single case-sensitive string. Having multiple values (array)
687 # for the audience field is not supported. More info about the OIDC JWT
688 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
689 # Note: if not specified, the Push endpoint URL will be used.
690 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
691 # email](https://cloud.google.com/iam/docs/service-accounts)
692 # to be used for generating the OIDC token. The caller (for
693 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
694 # have the iam.serviceAccounts.actAs permission for the service account.
695 },
696 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
697 # For example, a Webhook endpoint might use `https://example.com/push`.
698 &quot;attributes&quot;: { # Endpoint configuration attributes that can be used to control different
699 # aspects of the message delivery.
700 #
701 # The only currently supported attribute is `x-goog-version`, which you can
702 # use to change the format of the pushed message. This attribute
703 # indicates the version of the data expected by the endpoint. This
704 # controls the shape of the pushed message (i.e., its fields and metadata).
705 #
706 # If not present during the `CreateSubscription` call, it will default to
707 # the version of the Pub/Sub API used to make such call. If not present in a
708 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
709 # calls will always return a valid version, even if the subscription was
710 # created without this attribute.
711 #
712 # The only supported values for the `x-goog-version` attribute are:
713 #
714 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
715 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
716 #
717 # For example:
718 # &lt;pre&gt;&lt;code&gt;attributes { &quot;x-goog-version&quot;: &quot;v1&quot; } &lt;/code&gt;&lt;/pre&gt;
719 &quot;a_key&quot;: &quot;A String&quot;,
720 },
721 },
722 &quot;deadLetterPolicy&quot;: { # Dead lettering is done on a best effort basis. The same message might be # A policy that specifies the conditions for dead lettering messages in
723 # this subscription. If dead_letter_policy is not set, dead lettering
724 # is disabled.
725 #
726 # The Cloud Pub/Sub service account associated with this subscriptions&#x27;s
727 # parent project (i.e.,
Dan O'Mearadd494642020-05-01 07:42:23 -0700728 # service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700729 # permission to Acknowledge() messages on this subscription.
730 # dead lettered multiple times.
Dan O'Mearadd494642020-05-01 07:42:23 -0700731 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700732 # If validation on any of the fields fails at subscription creation/updation,
733 # the create/update subscription request will fail.
734 &quot;deadLetterTopic&quot;: &quot;A String&quot;, # The name of the topic to which dead letter messages should be published.
735 # Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
736 # account associated with the enclosing subscription&#x27;s parent project (i.e.,
737 # service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
738 # permission to Publish() to this topic.
739 #
740 # The operation will fail if the topic does not exist.
741 # Users should ensure that there is a subscription attached to this topic
742 # since messages published to a topic with no subscriptions are lost.
743 &quot;maxDeliveryAttempts&quot;: 42, # The maximum number of delivery attempts for any message. The value must be
744 # between 5 and 100.
745 #
746 # The number of delivery attempts is defined as 1 + (the sum of number of
747 # NACKs and number of times the acknowledgement deadline has been exceeded
748 # for the message).
749 #
750 # A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that
751 # client libraries may automatically extend ack_deadlines.
752 #
753 # This field will be honored on a best effort basis.
754 #
755 # If this parameter is 0, a default value of 5 is used.
756 },
757 &quot;filter&quot;: &quot;A String&quot;, # An expression written in the Pub/Sub [filter
758 # language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
759 # then only `PubsubMessage`s whose `attributes` field matches the filter are
760 # delivered on this subscription. If empty, then no messages are filtered
761 # out.
762 &quot;retainAckedMessages&quot;: True or False, # Indicates whether to retain acknowledged messages. If true, then
763 # messages are not expunged from the subscription&#x27;s backlog, even if they are
764 # acknowledged, until they fall out of the `message_retention_duration`
765 # window. This must be true if you would like to [Seek to a timestamp]
766 # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time).
767 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the subscription. It must have the format
768 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
769 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
770 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
771 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
772 # in length, and it must not start with `&quot;goog&quot;`.
773 }</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700774</div>
775
776<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700777 <code class="details" id="getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800778 <pre>Gets the access control policy for a resource.
779Returns an empty policy if the resource exists and does not have a policy
780set.
Takashi Matsuo06694102015-09-11 13:55:40 -0700781
782Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800783 resource: string, REQUIRED: The resource for which the policy is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700784See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700785 options_requestedPolicyVersion: integer, Optional. The policy format version to be returned.
786
787Valid values are 0, 1, and 3. Requests specifying an invalid value will be
788rejected.
789
790Requests for policies with any conditional bindings must specify version 3.
791Policies without any conditional bindings may specify any valid value or
792leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700793
794To learn which resources support conditions in their IAM policies, see the
795[IAM
796documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Takashi Matsuo06694102015-09-11 13:55:40 -0700797 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800798 Allowed values
799 1 - v1 error format
800 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700801
802Returns:
803 An object of the form:
804
Dan O'Mearadd494642020-05-01 07:42:23 -0700805 { # An Identity and Access Management (IAM) policy, which specifies access
806 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800807 #
808 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700809 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
810 # `members` to a single `role`. Members can be user accounts, service accounts,
811 # Google groups, and domains (such as G Suite). A `role` is a named list of
812 # permissions; each `role` can be an IAM predefined role or a user-created
813 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800814 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700815 # For some types of Google Cloud resources, a `binding` can also specify a
816 # `condition`, which is a logical expression that allows access to a resource
817 # only if the expression evaluates to `true`. A condition can add constraints
818 # based on attributes of the request, the resource, or both. To learn which
819 # resources support conditions in their IAM policies, see the
820 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700821 #
822 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800823 #
824 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700825 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800826 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700827 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
828 # &quot;members&quot;: [
829 # &quot;user:mike@example.com&quot;,
830 # &quot;group:admins@example.com&quot;,
831 # &quot;domain:google.com&quot;,
832 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800833 # ]
834 # },
835 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700836 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
837 # &quot;members&quot;: [
838 # &quot;user:eve@example.com&quot;
839 # ],
840 # &quot;condition&quot;: {
841 # &quot;title&quot;: &quot;expirable access&quot;,
842 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
843 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700844 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800845 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700846 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700847 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
848 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800849 # }
850 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700851 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700852 #
853 # bindings:
854 # - members:
855 # - user:mike@example.com
856 # - group:admins@example.com
857 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700858 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
859 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700860 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700861 # - user:eve@example.com
862 # role: roles/resourcemanager.organizationViewer
863 # condition:
864 # title: expirable access
865 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700866 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700867 # - etag: BwWWja0YfJA=
868 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700869 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800870 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700871 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700872 &quot;version&quot;: 42, # Specifies the format of the policy.
873 #
874 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
875 # are rejected.
876 #
877 # Any operation that affects conditional role bindings must specify version
878 # `3`. This requirement applies to the following operations:
879 #
880 # * Getting a policy that includes a conditional role binding
881 # * Adding a conditional role binding to a policy
882 # * Changing a conditional role binding in a policy
883 # * Removing any role binding, with or without a condition, from a policy
884 # that includes conditions
885 #
886 # **Important:** If you use IAM Conditions, you must include the `etag` field
887 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
888 # you to overwrite a version `3` policy with a version `1` policy, and all of
889 # the conditions in the version `3` policy are lost.
890 #
891 # If a policy does not include any conditions, operations on that policy may
892 # specify any valid version or leave the field unset.
893 #
894 # To learn which resources support conditions in their IAM policies, see the
895 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
896 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
897 # prevent simultaneous updates of a policy from overwriting each other.
898 # It is strongly suggested that systems make use of the `etag` in the
899 # read-modify-write cycle to perform policy updates in order to avoid race
900 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
901 # systems are expected to put that etag in the request to `setIamPolicy` to
902 # ensure that their change will be applied to the same version of the policy.
903 #
904 # **Important:** If you use IAM Conditions, you must include the `etag` field
905 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
906 # you to overwrite a version `3` policy with a version `1` policy, and all of
907 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700908 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700909 # `condition` that determines how and when the `bindings` are applied. Each
910 # of the `bindings` must contain at least one member.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800911 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700912 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
913 #
914 # If the condition evaluates to `true`, then this binding applies to the
915 # current request.
916 #
917 # If the condition evaluates to `false`, then this binding does not apply to
918 # the current request. However, a different role binding might grant the same
919 # role to one or more of the members in this binding.
920 #
921 # To learn which resources support conditions in their IAM policies, see the
922 # [IAM
923 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
924 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
925 # are documented at https://github.com/google/cel-spec.
926 #
927 # Example (Comparison):
928 #
929 # title: &quot;Summary size limit&quot;
930 # description: &quot;Determines if a summary is less than 100 chars&quot;
931 # expression: &quot;document.summary.size() &lt; 100&quot;
932 #
933 # Example (Equality):
934 #
935 # title: &quot;Requestor is owner&quot;
936 # description: &quot;Determines if requestor is the document owner&quot;
937 # expression: &quot;document.owner == request.auth.claims.email&quot;
938 #
939 # Example (Logic):
940 #
941 # title: &quot;Public documents&quot;
942 # description: &quot;Determine whether the document should be publicly visible&quot;
943 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
944 #
945 # Example (Data Manipulation):
946 #
947 # title: &quot;Notification string&quot;
948 # description: &quot;Create a notification string with a timestamp.&quot;
949 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
950 #
951 # The exact variables and functions that may be referenced within an expression
952 # are determined by the service that evaluates it. See the service
953 # documentation for additional information.
954 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
955 # reporting, e.g. a file name and a position in the file.
956 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
957 # its purpose. This can be used e.g. in UIs which allow to enter the
958 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700959 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
960 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700961 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
962 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -0700963 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700964 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
965 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700966 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800967 # `members` can have the following values:
968 #
969 # * `allUsers`: A special identifier that represents anyone who is
970 # on the internet; with or without a Google account.
971 #
972 # * `allAuthenticatedUsers`: A special identifier that represents anyone
973 # who is authenticated with a Google account or a service account.
974 #
975 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700976 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800977 #
978 #
979 # * `serviceAccount:{emailid}`: An email address that represents a service
980 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
981 #
982 # * `group:{emailid}`: An email address that represents a Google group.
983 # For example, `admins@example.com`.
984 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700985 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
986 # identifier) representing a user that has been recently deleted. For
987 # example, `alice@example.com?uid=123456789012345678901`. If the user is
988 # recovered, this value reverts to `user:{emailid}` and the recovered user
989 # retains the role in the binding.
990 #
991 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
992 # unique identifier) representing a service account that has been recently
993 # deleted. For example,
994 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
995 # If the service account is undeleted, this value reverts to
996 # `serviceAccount:{emailid}` and the undeleted service account retains the
997 # role in the binding.
998 #
999 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1000 # identifier) representing a Google group that has been recently
1001 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1002 # the group is recovered, this value reverts to `group:{emailid}` and the
1003 # recovered group retains the role in the binding.
1004 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001005 #
1006 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001007 # users of that domain. For example, `google.com` or `example.com`.
1008 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001009 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -07001010 ],
1011 },
1012 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001013 }</pre>
1014</div>
1015
1016<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001017 <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -07001018 <pre>Lists matching subscriptions.
1019
1020Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001021 project: string, Required. The name of the project in which to list subscriptions.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001022Format is `projects/{project-id}`. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001023 pageSize: integer, Maximum number of subscriptions to return.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001024 pageToken: string, The value returned by the last `ListSubscriptionsResponse`; indicates that
1025this is a continuation of a prior `ListSubscriptions` call, and that the
1026system should return the next page of data.
Takashi Matsuo06694102015-09-11 13:55:40 -07001027 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001028 Allowed values
1029 1 - v1 error format
1030 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -07001031
1032Returns:
1033 An object of the form:
1034
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001035 { # Response for the `ListSubscriptions` method.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001036 &quot;subscriptions&quot;: [ # The subscriptions that match the request.
1037 { # A subscription resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001038 &quot;topic&quot;: &quot;A String&quot;, # Required. The name of the topic from which this subscription is receiving messages.
1039 # Format is `projects/{project}/topics/{topic}`.
1040 # The value of this field will be `_deleted-topic_` if the topic has been
1041 # deleted.
1042 &quot;ackDeadlineSeconds&quot;: 42, # The approximate amount of time (on a best-effort basis) Pub/Sub waits for
1043 # the subscriber to acknowledge receipt before resending the message. In the
1044 # interval after the message is delivered and before it is acknowledged, it
1045 # is considered to be &lt;i&gt;outstanding&lt;/i&gt;. During that time period, the
1046 # message will not be redelivered (on a best-effort basis).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001047 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001048 # For pull subscriptions, this value is used as the initial value for the ack
1049 # deadline. To override this value for a given message, call
1050 # `ModifyAckDeadline` with the corresponding `ack_id` if using
1051 # non-streaming pull or send the `ack_id` in a
1052 # `StreamingModifyAckDeadlineRequest` if using streaming pull.
1053 # The minimum custom deadline you can specify is 10 seconds.
1054 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
1055 # If this parameter is 0, a default value of 10 seconds is used.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001056 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001057 # For push delivery, this value is also used to set the request timeout for
1058 # the call to the push endpoint.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001059 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001060 # If the subscriber never acknowledges the message, the Pub/Sub
1061 # system will eventually redeliver the message.
1062 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
1063 # managing labels&lt;/a&gt;.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001064 &quot;a_key&quot;: &quot;A String&quot;,
1065 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001066 &quot;expirationPolicy&quot;: { # A policy that specifies the conditions for resource expiration (i.e., # A policy that specifies the conditions for this subscription&#x27;s expiration.
1067 # A subscription is considered active as long as any connected subscriber is
1068 # successfully consuming messages from the subscription or is issuing
1069 # operations on the subscription. If `expiration_policy` is not set, a
1070 # *default policy* with `ttl` of 31 days will be used. The minimum allowed
1071 # value for `expiration_policy.ttl` is 1 day.
1072 # automatic resource deletion).
1073 &quot;ttl&quot;: &quot;A String&quot;, # Specifies the &quot;time-to-live&quot; duration for an associated resource. The
1074 # resource expires if it is not active for a period of `ttl`. The definition
1075 # of &quot;activity&quot; depends on the type of the associated resource. The minimum
1076 # and maximum allowed values for `ttl` depend on the type of the associated
1077 # resource, as well. If `ttl` is not set, the associated resource never
1078 # expires.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001079 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001080 &quot;retryPolicy&quot;: { # A policy that specifies how Cloud Pub/Sub retries message delivery. # A policy that specifies how Pub/Sub retries message delivery for this
1081 # subscription.
1082 #
1083 # If not set, the default retry policy is applied. This generally implies
1084 # that messages will be retried as soon as possible for healthy subscribers.
1085 # RetryPolicy will be triggered on NACKs or acknowledgement deadline
1086 # exceeded events for a given message.
1087 #
1088 # Retry delay will be exponential based on provided minimum and maximum
1089 # backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.
1090 #
1091 # RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded
1092 # events for a given message.
1093 #
1094 # Retry Policy is implemented on a best effort basis. At times, the delay
1095 # between consecutive deliveries may not match the configuration. That is,
1096 # delay can be more or less than configured backoff.
1097 &quot;minimumBackoff&quot;: &quot;A String&quot;, # The minimum delay between consecutive deliveries of a given message.
1098 # Value should be between 0 and 600 seconds. Defaults to 10 seconds.
1099 &quot;maximumBackoff&quot;: &quot;A String&quot;, # The maximum delay between consecutive deliveries of a given message.
1100 # Value should be between 0 and 600 seconds. Defaults to 600 seconds.
1101 },
1102 &quot;messageRetentionDuration&quot;: &quot;A String&quot;, # How long to retain unacknowledged messages in the subscription&#x27;s backlog,
1103 # from the moment a message is published.
1104 # If `retain_acked_messages` is true, then this also configures the retention
1105 # of acknowledged messages, and thus configures how far back in time a `Seek`
1106 # can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
1107 # minutes.
1108 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
1109 # used to configure it. An empty `pushConfig` signifies that the subscriber
1110 # will pull and ack messages using API methods.
1111 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
1112 # `Authorization` header in the HTTP request for every pushed message.
1113 # [OpenID Connect
1114 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
1115 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
1116 # identifies the recipients that the JWT is intended for. The audience
1117 # value is a single case-sensitive string. Having multiple values (array)
1118 # for the audience field is not supported. More info about the OIDC JWT
1119 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
1120 # Note: if not specified, the Push endpoint URL will be used.
1121 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
1122 # email](https://cloud.google.com/iam/docs/service-accounts)
1123 # to be used for generating the OIDC token. The caller (for
1124 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
1125 # have the iam.serviceAccounts.actAs permission for the service account.
1126 },
1127 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
1128 # For example, a Webhook endpoint might use `https://example.com/push`.
1129 &quot;attributes&quot;: { # Endpoint configuration attributes that can be used to control different
1130 # aspects of the message delivery.
1131 #
1132 # The only currently supported attribute is `x-goog-version`, which you can
1133 # use to change the format of the pushed message. This attribute
1134 # indicates the version of the data expected by the endpoint. This
1135 # controls the shape of the pushed message (i.e., its fields and metadata).
1136 #
1137 # If not present during the `CreateSubscription` call, it will default to
1138 # the version of the Pub/Sub API used to make such call. If not present in a
1139 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
1140 # calls will always return a valid version, even if the subscription was
1141 # created without this attribute.
1142 #
1143 # The only supported values for the `x-goog-version` attribute are:
1144 #
1145 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
1146 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
1147 #
1148 # For example:
1149 # &lt;pre&gt;&lt;code&gt;attributes { &quot;x-goog-version&quot;: &quot;v1&quot; } &lt;/code&gt;&lt;/pre&gt;
1150 &quot;a_key&quot;: &quot;A String&quot;,
1151 },
1152 },
1153 &quot;deadLetterPolicy&quot;: { # Dead lettering is done on a best effort basis. The same message might be # A policy that specifies the conditions for dead lettering messages in
1154 # this subscription. If dead_letter_policy is not set, dead lettering
1155 # is disabled.
1156 #
1157 # The Cloud Pub/Sub service account associated with this subscriptions&#x27;s
1158 # parent project (i.e.,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001159 # service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001160 # permission to Acknowledge() messages on this subscription.
1161 # dead lettered multiple times.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001162 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001163 # If validation on any of the fields fails at subscription creation/updation,
1164 # the create/update subscription request will fail.
1165 &quot;deadLetterTopic&quot;: &quot;A String&quot;, # The name of the topic to which dead letter messages should be published.
1166 # Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
1167 # account associated with the enclosing subscription&#x27;s parent project (i.e.,
1168 # service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
1169 # permission to Publish() to this topic.
1170 #
1171 # The operation will fail if the topic does not exist.
1172 # Users should ensure that there is a subscription attached to this topic
1173 # since messages published to a topic with no subscriptions are lost.
1174 &quot;maxDeliveryAttempts&quot;: 42, # The maximum number of delivery attempts for any message. The value must be
1175 # between 5 and 100.
1176 #
1177 # The number of delivery attempts is defined as 1 + (the sum of number of
1178 # NACKs and number of times the acknowledgement deadline has been exceeded
1179 # for the message).
1180 #
1181 # A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that
1182 # client libraries may automatically extend ack_deadlines.
1183 #
1184 # This field will be honored on a best effort basis.
1185 #
1186 # If this parameter is 0, a default value of 5 is used.
1187 },
1188 &quot;filter&quot;: &quot;A String&quot;, # An expression written in the Pub/Sub [filter
1189 # language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
1190 # then only `PubsubMessage`s whose `attributes` field matches the filter are
1191 # delivered on this subscription. If empty, then no messages are filtered
1192 # out.
1193 &quot;retainAckedMessages&quot;: True or False, # Indicates whether to retain acknowledged messages. If true, then
1194 # messages are not expunged from the subscription&#x27;s backlog, even if they are
1195 # acknowledged, until they fall out of the `message_retention_duration`
1196 # window. This must be true if you would like to [Seek to a timestamp]
1197 # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time).
1198 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the subscription. It must have the format
1199 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
1200 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
1201 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
1202 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
1203 # in length, and it must not start with `&quot;goog&quot;`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001204 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001205 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001206 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more subscriptions that match
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001207 # the request; this value should be passed in a new
1208 # `ListSubscriptionsRequest` to get more subscriptions.
Takashi Matsuo06694102015-09-11 13:55:40 -07001209 }</pre>
1210</div>
1211
1212<div class="method">
1213 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1214 <pre>Retrieves the next page of results.
1215
1216Args:
1217 previous_request: The request for the previous page. (required)
1218 previous_response: The response from the request for the previous page. (required)
1219
1220Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001221 A request object that you can call &#x27;execute()&#x27; on to request the next
Takashi Matsuo06694102015-09-11 13:55:40 -07001222 page. Returns None if there are no more items in the collection.
1223 </pre>
1224</div>
1225
1226<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001227 <code class="details" id="modifyAckDeadline">modifyAckDeadline(subscription, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001228 <pre>Modifies the ack deadline for a specific message. This method is useful
1229to indicate that more time is needed to process a message by the
1230subscriber, or to make the message available for redelivery if the
1231processing was interrupted. Note that this does not modify the
1232subscription-level `ackDeadlineSeconds` used for subsequent messages.
Takashi Matsuo06694102015-09-11 13:55:40 -07001233
1234Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001235 subscription: string, Required. The name of the subscription.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001236Format is `projects/{project}/subscriptions/{sub}`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001237 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07001238 The object takes the form of:
1239
1240{ # Request for the ModifyAckDeadline method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001241 &quot;ackDeadlineSeconds&quot;: 42, # Required. The new ack deadline with respect to the time this request was sent to
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001242 # the Pub/Sub system. For example, if the value is 10, the new
1243 # ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001244 # was made. Specifying zero might immediately make the message available for
1245 # delivery to another subscriber client. This typically results in an
1246 # increase in the rate of message redeliveries (that is, duplicates).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001247 # The minimum deadline you can specify is 0 seconds.
1248 # The maximum deadline you can specify is 600 seconds (10 minutes).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001249 &quot;ackIds&quot;: [ # Required. List of acknowledgment IDs.
1250 &quot;A String&quot;,
1251 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001252 }
1253
1254 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001255 Allowed values
1256 1 - v1 error format
1257 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -07001258
1259Returns:
1260 An object of the form:
1261
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001262 { # A generic empty message that you can re-use to avoid defining duplicated
1263 # empty messages in your APIs. A typical example is to use it as the request
1264 # or the response type of an API method. For instance:
1265 #
1266 # service Foo {
1267 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1268 # }
1269 #
1270 # The JSON representation for `Empty` is empty JSON object `{}`.
Takashi Matsuo06694102015-09-11 13:55:40 -07001271 }</pre>
1272</div>
1273
1274<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001275 <code class="details" id="modifyPushConfig">modifyPushConfig(subscription, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001276 <pre>Modifies the `PushConfig` for a specified subscription.
1277
1278This may be used to change a push subscription to a pull one (signified by
1279an empty `PushConfig`) or vice versa, or change the endpoint URL and other
1280attributes of a push subscription. Messages will accumulate for delivery
1281continuously through the call regardless of changes to the `PushConfig`.
Takashi Matsuo06694102015-09-11 13:55:40 -07001282
1283Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001284 subscription: string, Required. The name of the subscription.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001285Format is `projects/{project}/subscriptions/{sub}`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001286 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07001287 The object takes the form of:
1288
1289{ # Request for the ModifyPushConfig method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001290 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # Required. The push configuration for future deliveries.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001291 #
1292 # An empty `pushConfig` indicates that the Pub/Sub system should
1293 # stop pushing messages from the given subscription and allow
1294 # messages to be pulled and acknowledged - effectively pausing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001295 # the subscription if `Pull` or `StreamingPull` is not called.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001296 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
1297 # `Authorization` header in the HTTP request for every pushed message.
1298 # [OpenID Connect
1299 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
1300 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
1301 # identifies the recipients that the JWT is intended for. The audience
1302 # value is a single case-sensitive string. Having multiple values (array)
1303 # for the audience field is not supported. More info about the OIDC JWT
1304 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
1305 # Note: if not specified, the Push endpoint URL will be used.
1306 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
1307 # email](https://cloud.google.com/iam/docs/service-accounts)
1308 # to be used for generating the OIDC token. The caller (for
1309 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
1310 # have the iam.serviceAccounts.actAs permission for the service account.
1311 },
1312 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
1313 # For example, a Webhook endpoint might use `https://example.com/push`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001314 &quot;attributes&quot;: { # Endpoint configuration attributes that can be used to control different
Dan O'Mearadd494642020-05-01 07:42:23 -07001315 # aspects of the message delivery.
1316 #
1317 # The only currently supported attribute is `x-goog-version`, which you can
1318 # use to change the format of the pushed message. This attribute
1319 # indicates the version of the data expected by the endpoint. This
1320 # controls the shape of the pushed message (i.e., its fields and metadata).
1321 #
1322 # If not present during the `CreateSubscription` call, it will default to
1323 # the version of the Pub/Sub API used to make such call. If not present in a
1324 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
1325 # calls will always return a valid version, even if the subscription was
1326 # created without this attribute.
1327 #
1328 # The only supported values for the `x-goog-version` attribute are:
1329 #
1330 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
1331 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
1332 #
1333 # For example:
Bu Sun Kim65020912020-05-20 12:08:20 -07001334 # &lt;pre&gt;&lt;code&gt;attributes { &quot;x-goog-version&quot;: &quot;v1&quot; } &lt;/code&gt;&lt;/pre&gt;
1335 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001336 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001337 },
1338 }
1339
1340 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001341 Allowed values
1342 1 - v1 error format
1343 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -07001344
1345Returns:
1346 An object of the form:
1347
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001348 { # A generic empty message that you can re-use to avoid defining duplicated
1349 # empty messages in your APIs. A typical example is to use it as the request
1350 # or the response type of an API method. For instance:
1351 #
1352 # service Foo {
1353 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1354 # }
1355 #
1356 # The JSON representation for `Empty` is empty JSON object `{}`.
Takashi Matsuo06694102015-09-11 13:55:40 -07001357 }</pre>
1358</div>
1359
1360<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001361 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001362 <pre>Updates an existing subscription. Note that certain properties of a
1363subscription, such as its topic, are not modifiable.
1364
1365Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001366 name: string, Required. The name of the subscription. It must have the format
Bu Sun Kim65020912020-05-20 12:08:20 -07001367`&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001368start with a letter, and contain only letters (`[A-Za-z]`), numbers
1369(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
1370plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
Bu Sun Kim65020912020-05-20 12:08:20 -07001371in length, and it must not start with `&quot;goog&quot;`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001372 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001373 The object takes the form of:
1374
1375{ # Request for the UpdateSubscription method.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001376 &quot;subscription&quot;: { # A subscription resource. # Required. The updated subscription object.
1377 &quot;topic&quot;: &quot;A String&quot;, # Required. The name of the topic from which this subscription is receiving messages.
1378 # Format is `projects/{project}/topics/{topic}`.
1379 # The value of this field will be `_deleted-topic_` if the topic has been
1380 # deleted.
1381 &quot;ackDeadlineSeconds&quot;: 42, # The approximate amount of time (on a best-effort basis) Pub/Sub waits for
1382 # the subscriber to acknowledge receipt before resending the message. In the
1383 # interval after the message is delivered and before it is acknowledged, it
1384 # is considered to be &lt;i&gt;outstanding&lt;/i&gt;. During that time period, the
1385 # message will not be redelivered (on a best-effort basis).
1386 #
1387 # For pull subscriptions, this value is used as the initial value for the ack
1388 # deadline. To override this value for a given message, call
1389 # `ModifyAckDeadline` with the corresponding `ack_id` if using
1390 # non-streaming pull or send the `ack_id` in a
1391 # `StreamingModifyAckDeadlineRequest` if using streaming pull.
1392 # The minimum custom deadline you can specify is 10 seconds.
1393 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
1394 # If this parameter is 0, a default value of 10 seconds is used.
1395 #
1396 # For push delivery, this value is also used to set the request timeout for
1397 # the call to the push endpoint.
1398 #
1399 # If the subscriber never acknowledges the message, the Pub/Sub
1400 # system will eventually redeliver the message.
1401 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
1402 # managing labels&lt;/a&gt;.
1403 &quot;a_key&quot;: &quot;A String&quot;,
1404 },
1405 &quot;expirationPolicy&quot;: { # A policy that specifies the conditions for resource expiration (i.e., # A policy that specifies the conditions for this subscription&#x27;s expiration.
1406 # A subscription is considered active as long as any connected subscriber is
1407 # successfully consuming messages from the subscription or is issuing
1408 # operations on the subscription. If `expiration_policy` is not set, a
1409 # *default policy* with `ttl` of 31 days will be used. The minimum allowed
1410 # value for `expiration_policy.ttl` is 1 day.
1411 # automatic resource deletion).
1412 &quot;ttl&quot;: &quot;A String&quot;, # Specifies the &quot;time-to-live&quot; duration for an associated resource. The
1413 # resource expires if it is not active for a period of `ttl`. The definition
1414 # of &quot;activity&quot; depends on the type of the associated resource. The minimum
1415 # and maximum allowed values for `ttl` depend on the type of the associated
1416 # resource, as well. If `ttl` is not set, the associated resource never
1417 # expires.
1418 },
1419 &quot;retryPolicy&quot;: { # A policy that specifies how Cloud Pub/Sub retries message delivery. # A policy that specifies how Pub/Sub retries message delivery for this
1420 # subscription.
1421 #
1422 # If not set, the default retry policy is applied. This generally implies
1423 # that messages will be retried as soon as possible for healthy subscribers.
1424 # RetryPolicy will be triggered on NACKs or acknowledgement deadline
1425 # exceeded events for a given message.
1426 #
1427 # Retry delay will be exponential based on provided minimum and maximum
1428 # backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.
1429 #
1430 # RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded
1431 # events for a given message.
1432 #
1433 # Retry Policy is implemented on a best effort basis. At times, the delay
1434 # between consecutive deliveries may not match the configuration. That is,
1435 # delay can be more or less than configured backoff.
1436 &quot;minimumBackoff&quot;: &quot;A String&quot;, # The minimum delay between consecutive deliveries of a given message.
1437 # Value should be between 0 and 600 seconds. Defaults to 10 seconds.
1438 &quot;maximumBackoff&quot;: &quot;A String&quot;, # The maximum delay between consecutive deliveries of a given message.
1439 # Value should be between 0 and 600 seconds. Defaults to 600 seconds.
1440 },
1441 &quot;messageRetentionDuration&quot;: &quot;A String&quot;, # How long to retain unacknowledged messages in the subscription&#x27;s backlog,
1442 # from the moment a message is published.
1443 # If `retain_acked_messages` is true, then this also configures the retention
1444 # of acknowledged messages, and thus configures how far back in time a `Seek`
1445 # can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
1446 # minutes.
1447 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
1448 # used to configure it. An empty `pushConfig` signifies that the subscriber
1449 # will pull and ack messages using API methods.
1450 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
1451 # `Authorization` header in the HTTP request for every pushed message.
1452 # [OpenID Connect
1453 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
1454 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
1455 # identifies the recipients that the JWT is intended for. The audience
1456 # value is a single case-sensitive string. Having multiple values (array)
1457 # for the audience field is not supported. More info about the OIDC JWT
1458 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
1459 # Note: if not specified, the Push endpoint URL will be used.
1460 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
1461 # email](https://cloud.google.com/iam/docs/service-accounts)
1462 # to be used for generating the OIDC token. The caller (for
1463 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
1464 # have the iam.serviceAccounts.actAs permission for the service account.
1465 },
1466 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
1467 # For example, a Webhook endpoint might use `https://example.com/push`.
1468 &quot;attributes&quot;: { # Endpoint configuration attributes that can be used to control different
1469 # aspects of the message delivery.
1470 #
1471 # The only currently supported attribute is `x-goog-version`, which you can
1472 # use to change the format of the pushed message. This attribute
1473 # indicates the version of the data expected by the endpoint. This
1474 # controls the shape of the pushed message (i.e., its fields and metadata).
1475 #
1476 # If not present during the `CreateSubscription` call, it will default to
1477 # the version of the Pub/Sub API used to make such call. If not present in a
1478 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
1479 # calls will always return a valid version, even if the subscription was
1480 # created without this attribute.
1481 #
1482 # The only supported values for the `x-goog-version` attribute are:
1483 #
1484 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
1485 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
1486 #
1487 # For example:
1488 # &lt;pre&gt;&lt;code&gt;attributes { &quot;x-goog-version&quot;: &quot;v1&quot; } &lt;/code&gt;&lt;/pre&gt;
1489 &quot;a_key&quot;: &quot;A String&quot;,
1490 },
1491 },
1492 &quot;deadLetterPolicy&quot;: { # Dead lettering is done on a best effort basis. The same message might be # A policy that specifies the conditions for dead lettering messages in
1493 # this subscription. If dead_letter_policy is not set, dead lettering
1494 # is disabled.
1495 #
1496 # The Cloud Pub/Sub service account associated with this subscriptions&#x27;s
1497 # parent project (i.e.,
1498 # service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
1499 # permission to Acknowledge() messages on this subscription.
1500 # dead lettered multiple times.
1501 #
1502 # If validation on any of the fields fails at subscription creation/updation,
1503 # the create/update subscription request will fail.
1504 &quot;deadLetterTopic&quot;: &quot;A String&quot;, # The name of the topic to which dead letter messages should be published.
1505 # Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
1506 # account associated with the enclosing subscription&#x27;s parent project (i.e.,
1507 # service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
1508 # permission to Publish() to this topic.
1509 #
1510 # The operation will fail if the topic does not exist.
1511 # Users should ensure that there is a subscription attached to this topic
1512 # since messages published to a topic with no subscriptions are lost.
1513 &quot;maxDeliveryAttempts&quot;: 42, # The maximum number of delivery attempts for any message. The value must be
1514 # between 5 and 100.
1515 #
1516 # The number of delivery attempts is defined as 1 + (the sum of number of
1517 # NACKs and number of times the acknowledgement deadline has been exceeded
1518 # for the message).
1519 #
1520 # A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that
1521 # client libraries may automatically extend ack_deadlines.
1522 #
1523 # This field will be honored on a best effort basis.
1524 #
1525 # If this parameter is 0, a default value of 5 is used.
1526 },
1527 &quot;filter&quot;: &quot;A String&quot;, # An expression written in the Pub/Sub [filter
1528 # language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
1529 # then only `PubsubMessage`s whose `attributes` field matches the filter are
1530 # delivered on this subscription. If empty, then no messages are filtered
1531 # out.
1532 &quot;retainAckedMessages&quot;: True or False, # Indicates whether to retain acknowledged messages. If true, then
1533 # messages are not expunged from the subscription&#x27;s backlog, even if they are
1534 # acknowledged, until they fall out of the `message_retention_duration`
1535 # window. This must be true if you would like to [Seek to a timestamp]
1536 # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time).
1537 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the subscription. It must have the format
1538 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
1539 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
1540 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
1541 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
1542 # in length, and it must not start with `&quot;goog&quot;`.
1543 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001544 &quot;updateMask&quot;: &quot;A String&quot;, # Required. Indicates which fields in the provided subscription to update.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001545 # Must be specified and non-empty.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001546 }
1547
1548 x__xgafv: string, V1 error format.
1549 Allowed values
1550 1 - v1 error format
1551 2 - v2 error format
1552
1553Returns:
1554 An object of the form:
1555
1556 { # A subscription resource.
1557 &quot;topic&quot;: &quot;A String&quot;, # Required. The name of the topic from which this subscription is receiving messages.
1558 # Format is `projects/{project}/topics/{topic}`.
1559 # The value of this field will be `_deleted-topic_` if the topic has been
1560 # deleted.
1561 &quot;ackDeadlineSeconds&quot;: 42, # The approximate amount of time (on a best-effort basis) Pub/Sub waits for
1562 # the subscriber to acknowledge receipt before resending the message. In the
1563 # interval after the message is delivered and before it is acknowledged, it
1564 # is considered to be &lt;i&gt;outstanding&lt;/i&gt;. During that time period, the
1565 # message will not be redelivered (on a best-effort basis).
1566 #
1567 # For pull subscriptions, this value is used as the initial value for the ack
1568 # deadline. To override this value for a given message, call
1569 # `ModifyAckDeadline` with the corresponding `ack_id` if using
1570 # non-streaming pull or send the `ack_id` in a
1571 # `StreamingModifyAckDeadlineRequest` if using streaming pull.
1572 # The minimum custom deadline you can specify is 10 seconds.
1573 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
1574 # If this parameter is 0, a default value of 10 seconds is used.
1575 #
1576 # For push delivery, this value is also used to set the request timeout for
1577 # the call to the push endpoint.
1578 #
1579 # If the subscriber never acknowledges the message, the Pub/Sub
1580 # system will eventually redeliver the message.
1581 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
1582 # managing labels&lt;/a&gt;.
1583 &quot;a_key&quot;: &quot;A String&quot;,
1584 },
1585 &quot;expirationPolicy&quot;: { # A policy that specifies the conditions for resource expiration (i.e., # A policy that specifies the conditions for this subscription&#x27;s expiration.
1586 # A subscription is considered active as long as any connected subscriber is
1587 # successfully consuming messages from the subscription or is issuing
1588 # operations on the subscription. If `expiration_policy` is not set, a
1589 # *default policy* with `ttl` of 31 days will be used. The minimum allowed
1590 # value for `expiration_policy.ttl` is 1 day.
1591 # automatic resource deletion).
1592 &quot;ttl&quot;: &quot;A String&quot;, # Specifies the &quot;time-to-live&quot; duration for an associated resource. The
1593 # resource expires if it is not active for a period of `ttl`. The definition
1594 # of &quot;activity&quot; depends on the type of the associated resource. The minimum
1595 # and maximum allowed values for `ttl` depend on the type of the associated
1596 # resource, as well. If `ttl` is not set, the associated resource never
1597 # expires.
1598 },
1599 &quot;retryPolicy&quot;: { # A policy that specifies how Cloud Pub/Sub retries message delivery. # A policy that specifies how Pub/Sub retries message delivery for this
1600 # subscription.
1601 #
1602 # If not set, the default retry policy is applied. This generally implies
1603 # that messages will be retried as soon as possible for healthy subscribers.
1604 # RetryPolicy will be triggered on NACKs or acknowledgement deadline
1605 # exceeded events for a given message.
1606 #
1607 # Retry delay will be exponential based on provided minimum and maximum
1608 # backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.
1609 #
1610 # RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded
1611 # events for a given message.
1612 #
1613 # Retry Policy is implemented on a best effort basis. At times, the delay
1614 # between consecutive deliveries may not match the configuration. That is,
1615 # delay can be more or less than configured backoff.
1616 &quot;minimumBackoff&quot;: &quot;A String&quot;, # The minimum delay between consecutive deliveries of a given message.
1617 # Value should be between 0 and 600 seconds. Defaults to 10 seconds.
1618 &quot;maximumBackoff&quot;: &quot;A String&quot;, # The maximum delay between consecutive deliveries of a given message.
1619 # Value should be between 0 and 600 seconds. Defaults to 600 seconds.
1620 },
1621 &quot;messageRetentionDuration&quot;: &quot;A String&quot;, # How long to retain unacknowledged messages in the subscription&#x27;s backlog,
1622 # from the moment a message is published.
1623 # If `retain_acked_messages` is true, then this also configures the retention
1624 # of acknowledged messages, and thus configures how far back in time a `Seek`
1625 # can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
1626 # minutes.
Bu Sun Kim65020912020-05-20 12:08:20 -07001627 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001628 # used to configure it. An empty `pushConfig` signifies that the subscriber
1629 # will pull and ack messages using API methods.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001630 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
1631 # `Authorization` header in the HTTP request for every pushed message.
1632 # [OpenID Connect
1633 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
1634 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
1635 # identifies the recipients that the JWT is intended for. The audience
1636 # value is a single case-sensitive string. Having multiple values (array)
1637 # for the audience field is not supported. More info about the OIDC JWT
1638 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
1639 # Note: if not specified, the Push endpoint URL will be used.
1640 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
1641 # email](https://cloud.google.com/iam/docs/service-accounts)
1642 # to be used for generating the OIDC token. The caller (for
1643 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
1644 # have the iam.serviceAccounts.actAs permission for the service account.
1645 },
1646 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
1647 # For example, a Webhook endpoint might use `https://example.com/push`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001648 &quot;attributes&quot;: { # Endpoint configuration attributes that can be used to control different
Dan O'Mearadd494642020-05-01 07:42:23 -07001649 # aspects of the message delivery.
1650 #
1651 # The only currently supported attribute is `x-goog-version`, which you can
1652 # use to change the format of the pushed message. This attribute
1653 # indicates the version of the data expected by the endpoint. This
1654 # controls the shape of the pushed message (i.e., its fields and metadata).
1655 #
1656 # If not present during the `CreateSubscription` call, it will default to
1657 # the version of the Pub/Sub API used to make such call. If not present in a
1658 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
1659 # calls will always return a valid version, even if the subscription was
1660 # created without this attribute.
1661 #
1662 # The only supported values for the `x-goog-version` attribute are:
1663 #
1664 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
1665 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
1666 #
1667 # For example:
Bu Sun Kim65020912020-05-20 12:08:20 -07001668 # &lt;pre&gt;&lt;code&gt;attributes { &quot;x-goog-version&quot;: &quot;v1&quot; } &lt;/code&gt;&lt;/pre&gt;
1669 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001670 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001671 },
1672 &quot;deadLetterPolicy&quot;: { # Dead lettering is done on a best effort basis. The same message might be # A policy that specifies the conditions for dead lettering messages in
1673 # this subscription. If dead_letter_policy is not set, dead lettering
1674 # is disabled.
1675 #
1676 # The Cloud Pub/Sub service account associated with this subscriptions&#x27;s
1677 # parent project (i.e.,
1678 # service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
1679 # permission to Acknowledge() messages on this subscription.
1680 # dead lettered multiple times.
1681 #
1682 # If validation on any of the fields fails at subscription creation/updation,
1683 # the create/update subscription request will fail.
1684 &quot;deadLetterTopic&quot;: &quot;A String&quot;, # The name of the topic to which dead letter messages should be published.
1685 # Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
1686 # account associated with the enclosing subscription&#x27;s parent project (i.e.,
1687 # service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
1688 # permission to Publish() to this topic.
1689 #
1690 # The operation will fail if the topic does not exist.
1691 # Users should ensure that there is a subscription attached to this topic
1692 # since messages published to a topic with no subscriptions are lost.
1693 &quot;maxDeliveryAttempts&quot;: 42, # The maximum number of delivery attempts for any message. The value must be
1694 # between 5 and 100.
1695 #
1696 # The number of delivery attempts is defined as 1 + (the sum of number of
1697 # NACKs and number of times the acknowledgement deadline has been exceeded
1698 # for the message).
1699 #
1700 # A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that
1701 # client libraries may automatically extend ack_deadlines.
1702 #
1703 # This field will be honored on a best effort basis.
1704 #
1705 # If this parameter is 0, a default value of 5 is used.
1706 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001707 &quot;filter&quot;: &quot;A String&quot;, # An expression written in the Pub/Sub [filter
1708 # language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
1709 # then only `PubsubMessage`s whose `attributes` field matches the filter are
1710 # delivered on this subscription. If empty, then no messages are filtered
1711 # out.
1712 &quot;retainAckedMessages&quot;: True or False, # Indicates whether to retain acknowledged messages. If true, then
1713 # messages are not expunged from the subscription&#x27;s backlog, even if they are
1714 # acknowledged, until they fall out of the `message_retention_duration`
1715 # window. This must be true if you would like to [Seek to a timestamp]
1716 # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001717 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the subscription. It must have the format
1718 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
1719 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
1720 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
1721 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
1722 # in length, and it must not start with `&quot;goog&quot;`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001723 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001724</div>
1725
1726<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001727 <code class="details" id="pull">pull(subscription, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001728 <pre>Pulls messages from the server. The server may return `UNAVAILABLE` if
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001729there are too many concurrent pull requests pending for the given
1730subscription.
Takashi Matsuo06694102015-09-11 13:55:40 -07001731
1732Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001733 subscription: string, Required. The subscription from which messages should be pulled.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001734Format is `projects/{project}/subscriptions/{sub}`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001735 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07001736 The object takes the form of:
1737
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001738{ # Request for the `Pull` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001739 &quot;returnImmediately&quot;: True or False, # Optional. If this field set to true, the system will respond immediately even if
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001740 # it there are no messages available to return in the `Pull` response.
1741 # Otherwise, the system may wait (for a bounded amount of time) until at
Dan O'Mearadd494642020-05-01 07:42:23 -07001742 # least one message is available, rather than returning no messages. Warning:
1743 # setting this field to `true` is discouraged because it adversely impacts
1744 # the performance of `Pull` operations. We recommend that users do not set
1745 # this field.
Bu Sun Kim65020912020-05-20 12:08:20 -07001746 &quot;maxMessages&quot;: 42, # Required. The maximum number of messages to return for this request. Must be a
Dan O'Mearadd494642020-05-01 07:42:23 -07001747 # positive integer. The Pub/Sub system may return fewer than the number
1748 # specified.
Takashi Matsuo06694102015-09-11 13:55:40 -07001749 }
1750
1751 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001752 Allowed values
1753 1 - v1 error format
1754 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -07001755
1756Returns:
1757 An object of the form:
1758
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001759 { # Response for the `Pull` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001760 &quot;receivedMessages&quot;: [ # Received Pub/Sub messages. The list will be empty if there are no more
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001761 # messages available in the backlog. For JSON, the response can be entirely
1762 # empty. The Pub/Sub system may return fewer than the `maxMessages` requested
1763 # even if there are more messages available in the backlog.
Takashi Matsuo06694102015-09-11 13:55:40 -07001764 { # A message and its corresponding acknowledgment ID.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001765 &quot;message&quot;: { # A message that is published by publishers and consumed by subscribers. The # The message.
1766 # message must contain either a non-empty data field or at least one attribute.
1767 # Note that client libraries represent this object differently
1768 # depending on the language. See the corresponding [client library
1769 # documentation](https://cloud.google.com/pubsub/docs/reference/libraries) for
1770 # more information. See [quotas and limits]
1771 # (https://cloud.google.com/pubsub/quotas) for more information about message
1772 # limits.
1773 &quot;data&quot;: &quot;A String&quot;, # The message data field. If this field is empty, the message must contain
1774 # at least one attribute.
1775 &quot;publishTime&quot;: &quot;A String&quot;, # The time at which the message was published, populated by the server when
1776 # it receives the `Publish` call. It must not be populated by the
1777 # publisher in a `Publish` call.
1778 &quot;messageId&quot;: &quot;A String&quot;, # ID of this message, assigned by the server when the message is published.
1779 # Guaranteed to be unique within the topic. This value may be read by a
1780 # subscriber that receives a `PubsubMessage` via a `Pull` call or a push
1781 # delivery. It must not be populated by the publisher in a `Publish` call.
1782 &quot;attributes&quot;: { # Attributes for this message. If this field is empty, the message must
1783 # contain non-empty data. This can be used to filter messages on the
1784 # subscription.
1785 &quot;a_key&quot;: &quot;A String&quot;,
1786 },
1787 },
1788 &quot;ackId&quot;: &quot;A String&quot;, # This ID can be used to acknowledge the received message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001789 &quot;deliveryAttempt&quot;: 42, # The approximate number of times that Cloud Pub/Sub has attempted to deliver
1790 # the associated message to a subscriber.
1791 #
1792 # More precisely, this is 1 + (number of NACKs) +
1793 # (number of ack_deadline exceeds) for this message.
Dan O'Mearadd494642020-05-01 07:42:23 -07001794 #
1795 # A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
1796 # exceeds event is whenever a message is not acknowledged within
1797 # ack_deadline. Note that ack_deadline is initially
1798 # Subscription.ackDeadlineSeconds, but may get extended automatically by
1799 # the client library.
1800 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001801 # Upon the first delivery of a given message, `delivery_attempt` will have a
1802 # value of 1. The value is calculated at best effort and is approximate.
Dan O'Mearadd494642020-05-01 07:42:23 -07001803 #
1804 # If a DeadLetterPolicy is not set on the subscription, this will be 0.
Takashi Matsuo06694102015-09-11 13:55:40 -07001805 },
1806 ],
1807 }</pre>
1808</div>
1809
1810<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001811 <code class="details" id="seek">seek(subscription, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001812 <pre>Seeks an existing subscription to a point in time or to a given snapshot,
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001813whichever is provided in the request. Snapshots are used in [Seek](
1814https://cloud.google.com/pubsub/docs/replay-overview) operations, which
1815allow you to manage message acknowledgments in bulk. That is, you can set
1816the acknowledgment state of messages in an existing subscription to the
1817state captured by a snapshot. Note that both the subscription and the
1818snapshot must be on the same topic.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001819
1820Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001821 subscription: string, Required. The subscription to affect. (required)
1822 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001823 The object takes the form of:
1824
1825{ # Request for the `Seek` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001826 &quot;time&quot;: &quot;A String&quot;, # The time to seek to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001827 # Messages retained in the subscription that were published before this
1828 # time are marked as acknowledged, and messages retained in the
1829 # subscription that were published after this time are marked as
1830 # unacknowledged. Note that this operation affects only those messages
1831 # retained in the subscription (configured by the combination of
1832 # `message_retention_duration` and `retain_acked_messages`). For example,
1833 # if `time` corresponds to a point before the message retention
Bu Sun Kim65020912020-05-20 12:08:20 -07001834 # window (or to a point before the system&#x27;s notion of the subscription
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001835 # creation time), only retained messages will be marked as unacknowledged,
1836 # and already-expunged messages will not be restored.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001837 &quot;snapshot&quot;: &quot;A String&quot;, # The snapshot to seek to. The snapshot&#x27;s topic must be the same as that of
1838 # the provided subscription.
1839 # Format is `projects/{project}/snapshots/{snap}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001840 }
1841
1842 x__xgafv: string, V1 error format.
1843 Allowed values
1844 1 - v1 error format
1845 2 - v2 error format
1846
1847Returns:
1848 An object of the form:
1849
1850 { # Response for the `Seek` method (this response is empty).
1851 }</pre>
1852</div>
1853
1854<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001855 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001856 <pre>Sets the access control policy on the specified resource. Replaces any
1857existing policy.
Takashi Matsuo06694102015-09-11 13:55:40 -07001858
Bu Sun Kim65020912020-05-20 12:08:20 -07001859Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
Dan O'Mearadd494642020-05-01 07:42:23 -07001860
Takashi Matsuo06694102015-09-11 13:55:40 -07001861Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001862 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001863See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001864 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07001865 The object takes the form of:
1866
1867{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001868 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001869 # the policy is limited to a few 10s of KB. An empty policy is a
1870 # valid policy but certain Cloud Platform services (such as Projects)
1871 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07001872 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001873 #
1874 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001875 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1876 # `members` to a single `role`. Members can be user accounts, service accounts,
1877 # Google groups, and domains (such as G Suite). A `role` is a named list of
1878 # permissions; each `role` can be an IAM predefined role or a user-created
1879 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001880 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001881 # For some types of Google Cloud resources, a `binding` can also specify a
1882 # `condition`, which is a logical expression that allows access to a resource
1883 # only if the expression evaluates to `true`. A condition can add constraints
1884 # based on attributes of the request, the resource, or both. To learn which
1885 # resources support conditions in their IAM policies, see the
1886 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001887 #
1888 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001889 #
1890 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001891 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001892 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001893 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1894 # &quot;members&quot;: [
1895 # &quot;user:mike@example.com&quot;,
1896 # &quot;group:admins@example.com&quot;,
1897 # &quot;domain:google.com&quot;,
1898 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001899 # ]
1900 # },
1901 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001902 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1903 # &quot;members&quot;: [
1904 # &quot;user:eve@example.com&quot;
1905 # ],
1906 # &quot;condition&quot;: {
1907 # &quot;title&quot;: &quot;expirable access&quot;,
1908 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1909 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001910 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001911 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001912 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001913 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1914 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001915 # }
1916 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001917 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001918 #
1919 # bindings:
1920 # - members:
1921 # - user:mike@example.com
1922 # - group:admins@example.com
1923 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001924 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1925 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001926 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001927 # - user:eve@example.com
1928 # role: roles/resourcemanager.organizationViewer
1929 # condition:
1930 # title: expirable access
1931 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001932 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001933 # - etag: BwWWja0YfJA=
1934 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001935 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001936 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001937 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001938 &quot;version&quot;: 42, # Specifies the format of the policy.
1939 #
1940 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1941 # are rejected.
1942 #
1943 # Any operation that affects conditional role bindings must specify version
1944 # `3`. This requirement applies to the following operations:
1945 #
1946 # * Getting a policy that includes a conditional role binding
1947 # * Adding a conditional role binding to a policy
1948 # * Changing a conditional role binding in a policy
1949 # * Removing any role binding, with or without a condition, from a policy
1950 # that includes conditions
1951 #
1952 # **Important:** If you use IAM Conditions, you must include the `etag` field
1953 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1954 # you to overwrite a version `3` policy with a version `1` policy, and all of
1955 # the conditions in the version `3` policy are lost.
1956 #
1957 # If a policy does not include any conditions, operations on that policy may
1958 # specify any valid version or leave the field unset.
1959 #
1960 # To learn which resources support conditions in their IAM policies, see the
1961 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1962 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1963 # prevent simultaneous updates of a policy from overwriting each other.
1964 # It is strongly suggested that systems make use of the `etag` in the
1965 # read-modify-write cycle to perform policy updates in order to avoid race
1966 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1967 # systems are expected to put that etag in the request to `setIamPolicy` to
1968 # ensure that their change will be applied to the same version of the policy.
1969 #
1970 # **Important:** If you use IAM Conditions, you must include the `etag` field
1971 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1972 # you to overwrite a version `3` policy with a version `1` policy, and all of
1973 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -07001974 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001975 # `condition` that determines how and when the `bindings` are applied. Each
1976 # of the `bindings` must contain at least one member.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001977 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001978 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1979 #
1980 # If the condition evaluates to `true`, then this binding applies to the
1981 # current request.
1982 #
1983 # If the condition evaluates to `false`, then this binding does not apply to
1984 # the current request. However, a different role binding might grant the same
1985 # role to one or more of the members in this binding.
1986 #
1987 # To learn which resources support conditions in their IAM policies, see the
1988 # [IAM
1989 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1990 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1991 # are documented at https://github.com/google/cel-spec.
1992 #
1993 # Example (Comparison):
1994 #
1995 # title: &quot;Summary size limit&quot;
1996 # description: &quot;Determines if a summary is less than 100 chars&quot;
1997 # expression: &quot;document.summary.size() &lt; 100&quot;
1998 #
1999 # Example (Equality):
2000 #
2001 # title: &quot;Requestor is owner&quot;
2002 # description: &quot;Determines if requestor is the document owner&quot;
2003 # expression: &quot;document.owner == request.auth.claims.email&quot;
2004 #
2005 # Example (Logic):
2006 #
2007 # title: &quot;Public documents&quot;
2008 # description: &quot;Determine whether the document should be publicly visible&quot;
2009 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2010 #
2011 # Example (Data Manipulation):
2012 #
2013 # title: &quot;Notification string&quot;
2014 # description: &quot;Create a notification string with a timestamp.&quot;
2015 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2016 #
2017 # The exact variables and functions that may be referenced within an expression
2018 # are determined by the service that evaluates it. See the service
2019 # documentation for additional information.
2020 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2021 # reporting, e.g. a file name and a position in the file.
2022 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2023 # its purpose. This can be used e.g. in UIs which allow to enter the
2024 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07002025 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2026 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002027 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2028 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07002029 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002030 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
2031 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002032 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002033 # `members` can have the following values:
2034 #
2035 # * `allUsers`: A special identifier that represents anyone who is
2036 # on the internet; with or without a Google account.
2037 #
2038 # * `allAuthenticatedUsers`: A special identifier that represents anyone
2039 # who is authenticated with a Google account or a service account.
2040 #
2041 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07002042 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002043 #
2044 #
2045 # * `serviceAccount:{emailid}`: An email address that represents a service
2046 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
2047 #
2048 # * `group:{emailid}`: An email address that represents a Google group.
2049 # For example, `admins@example.com`.
2050 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002051 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
2052 # identifier) representing a user that has been recently deleted. For
2053 # example, `alice@example.com?uid=123456789012345678901`. If the user is
2054 # recovered, this value reverts to `user:{emailid}` and the recovered user
2055 # retains the role in the binding.
2056 #
2057 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
2058 # unique identifier) representing a service account that has been recently
2059 # deleted. For example,
2060 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
2061 # If the service account is undeleted, this value reverts to
2062 # `serviceAccount:{emailid}` and the undeleted service account retains the
2063 # role in the binding.
2064 #
2065 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
2066 # identifier) representing a Google group that has been recently
2067 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
2068 # the group is recovered, this value reverts to `group:{emailid}` and the
2069 # recovered group retains the role in the binding.
2070 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002071 #
2072 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002073 # users of that domain. For example, `google.com` or `example.com`.
2074 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002075 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -07002076 ],
2077 },
2078 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07002079 },
2080 }
2081
2082 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002083 Allowed values
2084 1 - v1 error format
2085 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -07002086
2087Returns:
2088 An object of the form:
2089
Dan O'Mearadd494642020-05-01 07:42:23 -07002090 { # An Identity and Access Management (IAM) policy, which specifies access
2091 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002092 #
2093 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002094 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
2095 # `members` to a single `role`. Members can be user accounts, service accounts,
2096 # Google groups, and domains (such as G Suite). A `role` is a named list of
2097 # permissions; each `role` can be an IAM predefined role or a user-created
2098 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002099 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002100 # For some types of Google Cloud resources, a `binding` can also specify a
2101 # `condition`, which is a logical expression that allows access to a resource
2102 # only if the expression evaluates to `true`. A condition can add constraints
2103 # based on attributes of the request, the resource, or both. To learn which
2104 # resources support conditions in their IAM policies, see the
2105 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07002106 #
2107 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002108 #
2109 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07002110 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002111 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07002112 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
2113 # &quot;members&quot;: [
2114 # &quot;user:mike@example.com&quot;,
2115 # &quot;group:admins@example.com&quot;,
2116 # &quot;domain:google.com&quot;,
2117 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002118 # ]
2119 # },
2120 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07002121 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
2122 # &quot;members&quot;: [
2123 # &quot;user:eve@example.com&quot;
2124 # ],
2125 # &quot;condition&quot;: {
2126 # &quot;title&quot;: &quot;expirable access&quot;,
2127 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
2128 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002129 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002130 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07002131 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002132 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
2133 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002134 # }
2135 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002136 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002137 #
2138 # bindings:
2139 # - members:
2140 # - user:mike@example.com
2141 # - group:admins@example.com
2142 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07002143 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
2144 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002145 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07002146 # - user:eve@example.com
2147 # role: roles/resourcemanager.organizationViewer
2148 # condition:
2149 # title: expirable access
2150 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07002151 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07002152 # - etag: BwWWja0YfJA=
2153 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002154 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002155 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07002156 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002157 &quot;version&quot;: 42, # Specifies the format of the policy.
2158 #
2159 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
2160 # are rejected.
2161 #
2162 # Any operation that affects conditional role bindings must specify version
2163 # `3`. This requirement applies to the following operations:
2164 #
2165 # * Getting a policy that includes a conditional role binding
2166 # * Adding a conditional role binding to a policy
2167 # * Changing a conditional role binding in a policy
2168 # * Removing any role binding, with or without a condition, from a policy
2169 # that includes conditions
2170 #
2171 # **Important:** If you use IAM Conditions, you must include the `etag` field
2172 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2173 # you to overwrite a version `3` policy with a version `1` policy, and all of
2174 # the conditions in the version `3` policy are lost.
2175 #
2176 # If a policy does not include any conditions, operations on that policy may
2177 # specify any valid version or leave the field unset.
2178 #
2179 # To learn which resources support conditions in their IAM policies, see the
2180 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2181 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
2182 # prevent simultaneous updates of a policy from overwriting each other.
2183 # It is strongly suggested that systems make use of the `etag` in the
2184 # read-modify-write cycle to perform policy updates in order to avoid race
2185 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
2186 # systems are expected to put that etag in the request to `setIamPolicy` to
2187 # ensure that their change will be applied to the same version of the policy.
2188 #
2189 # **Important:** If you use IAM Conditions, you must include the `etag` field
2190 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2191 # you to overwrite a version `3` policy with a version `1` policy, and all of
2192 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -07002193 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07002194 # `condition` that determines how and when the `bindings` are applied. Each
2195 # of the `bindings` must contain at least one member.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002196 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002197 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
2198 #
2199 # If the condition evaluates to `true`, then this binding applies to the
2200 # current request.
2201 #
2202 # If the condition evaluates to `false`, then this binding does not apply to
2203 # the current request. However, a different role binding might grant the same
2204 # role to one or more of the members in this binding.
2205 #
2206 # To learn which resources support conditions in their IAM policies, see the
2207 # [IAM
2208 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2209 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2210 # are documented at https://github.com/google/cel-spec.
2211 #
2212 # Example (Comparison):
2213 #
2214 # title: &quot;Summary size limit&quot;
2215 # description: &quot;Determines if a summary is less than 100 chars&quot;
2216 # expression: &quot;document.summary.size() &lt; 100&quot;
2217 #
2218 # Example (Equality):
2219 #
2220 # title: &quot;Requestor is owner&quot;
2221 # description: &quot;Determines if requestor is the document owner&quot;
2222 # expression: &quot;document.owner == request.auth.claims.email&quot;
2223 #
2224 # Example (Logic):
2225 #
2226 # title: &quot;Public documents&quot;
2227 # description: &quot;Determine whether the document should be publicly visible&quot;
2228 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2229 #
2230 # Example (Data Manipulation):
2231 #
2232 # title: &quot;Notification string&quot;
2233 # description: &quot;Create a notification string with a timestamp.&quot;
2234 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2235 #
2236 # The exact variables and functions that may be referenced within an expression
2237 # are determined by the service that evaluates it. See the service
2238 # documentation for additional information.
2239 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2240 # reporting, e.g. a file name and a position in the file.
2241 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2242 # its purpose. This can be used e.g. in UIs which allow to enter the
2243 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07002244 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2245 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002246 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2247 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07002248 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002249 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
2250 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002251 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002252 # `members` can have the following values:
2253 #
2254 # * `allUsers`: A special identifier that represents anyone who is
2255 # on the internet; with or without a Google account.
2256 #
2257 # * `allAuthenticatedUsers`: A special identifier that represents anyone
2258 # who is authenticated with a Google account or a service account.
2259 #
2260 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07002261 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002262 #
2263 #
2264 # * `serviceAccount:{emailid}`: An email address that represents a service
2265 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
2266 #
2267 # * `group:{emailid}`: An email address that represents a Google group.
2268 # For example, `admins@example.com`.
2269 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002270 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
2271 # identifier) representing a user that has been recently deleted. For
2272 # example, `alice@example.com?uid=123456789012345678901`. If the user is
2273 # recovered, this value reverts to `user:{emailid}` and the recovered user
2274 # retains the role in the binding.
2275 #
2276 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
2277 # unique identifier) representing a service account that has been recently
2278 # deleted. For example,
2279 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
2280 # If the service account is undeleted, this value reverts to
2281 # `serviceAccount:{emailid}` and the undeleted service account retains the
2282 # role in the binding.
2283 #
2284 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
2285 # identifier) representing a Google group that has been recently
2286 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
2287 # the group is recovered, this value reverts to `group:{emailid}` and the
2288 # recovered group retains the role in the binding.
2289 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002290 #
2291 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002292 # users of that domain. For example, `google.com` or `example.com`.
2293 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002294 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -07002295 ],
2296 },
2297 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07002298 }</pre>
2299</div>
2300
2301<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002302 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -07002303 <pre>Returns permissions that a caller has on the specified resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002304If the resource does not exist, this will return an empty set of
Bu Sun Kim65020912020-05-20 12:08:20 -07002305permissions, not a `NOT_FOUND` error.
Takashi Matsuo06694102015-09-11 13:55:40 -07002306
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002307Note: This operation is designed to be used for building permission-aware
2308UIs and command-line tools, not for authorization checking. This operation
Bu Sun Kim65020912020-05-20 12:08:20 -07002309may &quot;fail open&quot; without warning.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002310
Takashi Matsuo06694102015-09-11 13:55:40 -07002311Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002312 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002313See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002314 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07002315 The object takes the form of:
2316
2317{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07002318 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
2319 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002320 # information see
2321 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07002322 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -07002323 ],
2324 }
2325
2326 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002327 Allowed values
2328 1 - v1 error format
2329 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -07002330
2331Returns:
2332 An object of the form:
2333
2334 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07002335 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002336 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07002337 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -07002338 ],
2339 }</pre>
2340</div>
2341
2342</body></html>