Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 75 | <h1><a href="pubsub_v1beta2.html">Cloud Pub/Sub API</a> . <a href="pubsub_v1beta2.projects.html">projects</a> . <a href="pubsub_v1beta2.projects.subscriptions.html">subscriptions</a></h1> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 78 | <code><a href="#acknowledge">acknowledge(subscription, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 79 | <p class="firstline">Acknowledges the messages associated with the `ack_ids` in the</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 | <code><a href="#create">create(name, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 82 | <p class="firstline">Creates a subscription to a given topic.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 83 | <p class="toc_element"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 84 | <code><a href="#delete">delete(subscription, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 85 | <p class="firstline">Deletes an existing subscription. All pending messages in the subscription</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 86 | <p class="toc_element"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 87 | <code><a href="#get">get(subscription, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 88 | <p class="firstline">Gets the configuration details of a subscription.</p> |
| 89 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 90 | <code><a href="#getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 91 | <p class="firstline">Gets the access control policy for a resource.</p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 92 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 93 | <code><a href="#list">list(project, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 94 | <p class="firstline">Lists matching subscriptions.</p> |
| 95 | <p class="toc_element"> |
| 96 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 97 | <p class="firstline">Retrieves the next page of results.</p> |
| 98 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 99 | <code><a href="#modifyAckDeadline">modifyAckDeadline(subscription, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 100 | <p class="firstline">Modifies the ack deadline for a specific message. This method is useful</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 101 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 102 | <code><a href="#modifyPushConfig">modifyPushConfig(subscription, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 103 | <p class="firstline">Modifies the `PushConfig` for a specified subscription.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 104 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 105 | <code><a href="#pull">pull(subscription, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 106 | <p class="firstline">Pulls messages from the server. Returns an empty list if there are no</p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 107 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 108 | <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 109 | <p class="firstline">Sets the access control policy on the specified resource. Replaces any</p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 110 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 111 | <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 112 | <p class="firstline">Returns permissions that a caller has on the specified resource.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 113 | <h3>Method Details</h3> |
| 114 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 115 | <code class="details" id="acknowledge">acknowledge(subscription, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 116 | <pre>Acknowledges the messages associated with the `ack_ids` in the |
| 117 | `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages |
| 118 | from the subscription. |
| 119 | |
| 120 | Acknowledging a message whose ack deadline has expired may succeed, |
| 121 | but such a message may be redelivered later. Acknowledging a message more |
| 122 | than once will not result in an error. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 123 | |
| 124 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 125 | subscription: string, The subscription whose message is being acknowledged. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 126 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 127 | The object takes the form of: |
| 128 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 129 | { # Request for the Acknowledge method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 130 | "ackIds": [ # The acknowledgment ID for the messages being acknowledged that was returned |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 131 | # by the Pub/Sub system in the `Pull` response. Must not be empty. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 132 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 133 | ], |
| 134 | } |
| 135 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 136 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 137 | Allowed values |
| 138 | 1 - v1 error format |
| 139 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 140 | |
| 141 | Returns: |
| 142 | An object of the form: |
| 143 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 144 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 145 | # empty messages in your APIs. A typical example is to use it as the request |
| 146 | # or the response type of an API method. For instance: |
| 147 | # |
| 148 | # service Foo { |
| 149 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 150 | # } |
| 151 | # |
| 152 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 153 | }</pre> |
| 154 | </div> |
| 155 | |
| 156 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 157 | <code class="details" id="create">create(name, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 158 | <pre>Creates a subscription to a given topic. |
| 159 | If the subscription already exists, returns `ALREADY_EXISTS`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 160 | If the corresponding topic doesn't exist, returns `NOT_FOUND`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 161 | |
| 162 | If the name is not provided in the request, the server will assign a random |
| 163 | name for this subscription on the same project as the topic. Note that |
| 164 | for REST API requests, you must specify a name. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 165 | |
| 166 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 167 | name: string, The name of the subscription. It must have the format |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 168 | `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 169 | start with a letter, and contain only letters (`[A-Za-z]`), numbers |
| 170 | (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), |
| 171 | plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 172 | in length, and it must not start with `"goog"`. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 173 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 174 | The object takes the form of: |
| 175 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 176 | { # A subscription resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 177 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 178 | # The value of this field will be `_deleted-topic_` if the topic has been |
| 179 | # deleted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 180 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 181 | # used to configure it. An empty `pushConfig` signifies that the subscriber |
| 182 | # will pull and ack messages using API methods. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 183 | "attributes": { # Endpoint configuration attributes. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 184 | # |
| 185 | # Every endpoint has a set of API supported attributes that can be used to |
| 186 | # control different aspects of the message delivery. |
| 187 | # |
| 188 | # The currently supported attribute is `x-goog-version`, which you can |
| 189 | # use to change the format of the push message. This attribute |
| 190 | # indicates the version of the data expected by the endpoint. This |
| 191 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 192 | # The endpoint version is based on the version of the Pub/Sub |
| 193 | # API. |
| 194 | # |
| 195 | # If not present during the `CreateSubscription` call, it will default to |
| 196 | # the version of the API used to make such call. If not present during a |
| 197 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 198 | # calls will always return a valid version, even if the subscription was |
| 199 | # created without this attribute. |
| 200 | # |
| 201 | # The possible values for this attribute are: |
| 202 | # |
| 203 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 204 | # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 205 | "a_key": "A String", |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 206 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 207 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 208 | # For example, a Webhook endpoint might use "https://example.com/push". |
| 209 | "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an |
| 210 | # `Authorization` header in the HTTP request for every pushed message. |
| 211 | # [OpenID Connect |
| 212 | # token](https://developers.google.com/identity/protocols/OpenIDConnect). |
| 213 | "audience": "A String", # Audience to be used when generating OIDC token. The audience claim |
| 214 | # identifies the recipients that the JWT is intended for. The audience |
| 215 | # value is a single case-sensitive string. Having multiple values (array) |
| 216 | # for the audience field is not supported. More info about the OIDC JWT |
| 217 | # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 |
| 218 | # Note: if not specified, the Push endpoint URL will be used. |
| 219 | "serviceAccountEmail": "A String", # [Service account |
| 220 | # email](https://cloud.google.com/iam/docs/service-accounts) |
| 221 | # to be used for generating the OIDC token. The caller (for |
| 222 | # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must |
| 223 | # have the iam.serviceAccounts.actAs permission for the service account. |
| 224 | }, |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 225 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 226 | "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message |
| 227 | # before the subscriber should acknowledge the message. After message |
| 228 | # delivery but before the ack deadline expires and before the message is |
| 229 | # acknowledged, it is an outstanding message and will not be delivered |
| 230 | # again during that time (on a best-effort basis). |
| 231 | # |
| 232 | # For pull subscriptions, this value is used as the initial value for the ack |
| 233 | # deadline. To override this value for a given message, call |
| 234 | # `ModifyAckDeadline` with the corresponding `ack_id` if using pull. |
| 235 | # The maximum custom deadline you can specify is 600 seconds (10 minutes). |
| 236 | # |
| 237 | # For push delivery, this value is also used to set the request timeout for |
| 238 | # the call to the push endpoint. |
| 239 | # |
| 240 | # If the subscriber never acknowledges the message, the Pub/Sub |
| 241 | # system will eventually redeliver the message. |
| 242 | # |
| 243 | # If this parameter is 0, a default value of 10 seconds is used. |
| 244 | "name": "A String", # The name of the subscription. It must have the format |
| 245 | # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
| 246 | # start with a letter, and contain only letters (`[A-Za-z]`), numbers |
| 247 | # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), |
| 248 | # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters |
| 249 | # in length, and it must not start with `"goog"`. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 250 | } |
| 251 | |
| 252 | x__xgafv: string, V1 error format. |
| 253 | Allowed values |
| 254 | 1 - v1 error format |
| 255 | 2 - v2 error format |
| 256 | |
| 257 | Returns: |
| 258 | An object of the form: |
| 259 | |
| 260 | { # A subscription resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 261 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 262 | # The value of this field will be `_deleted-topic_` if the topic has been |
| 263 | # deleted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 264 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 265 | # used to configure it. An empty `pushConfig` signifies that the subscriber |
| 266 | # will pull and ack messages using API methods. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 267 | "attributes": { # Endpoint configuration attributes. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 268 | # |
| 269 | # Every endpoint has a set of API supported attributes that can be used to |
| 270 | # control different aspects of the message delivery. |
| 271 | # |
| 272 | # The currently supported attribute is `x-goog-version`, which you can |
| 273 | # use to change the format of the push message. This attribute |
| 274 | # indicates the version of the data expected by the endpoint. This |
| 275 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 276 | # The endpoint version is based on the version of the Pub/Sub |
| 277 | # API. |
| 278 | # |
| 279 | # If not present during the `CreateSubscription` call, it will default to |
| 280 | # the version of the API used to make such call. If not present during a |
| 281 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 282 | # calls will always return a valid version, even if the subscription was |
| 283 | # created without this attribute. |
| 284 | # |
| 285 | # The possible values for this attribute are: |
| 286 | # |
| 287 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 288 | # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 289 | "a_key": "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 290 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 291 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 292 | # For example, a Webhook endpoint might use "https://example.com/push". |
| 293 | "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an |
| 294 | # `Authorization` header in the HTTP request for every pushed message. |
| 295 | # [OpenID Connect |
| 296 | # token](https://developers.google.com/identity/protocols/OpenIDConnect). |
| 297 | "audience": "A String", # Audience to be used when generating OIDC token. The audience claim |
| 298 | # identifies the recipients that the JWT is intended for. The audience |
| 299 | # value is a single case-sensitive string. Having multiple values (array) |
| 300 | # for the audience field is not supported. More info about the OIDC JWT |
| 301 | # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 |
| 302 | # Note: if not specified, the Push endpoint URL will be used. |
| 303 | "serviceAccountEmail": "A String", # [Service account |
| 304 | # email](https://cloud.google.com/iam/docs/service-accounts) |
| 305 | # to be used for generating the OIDC token. The caller (for |
| 306 | # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must |
| 307 | # have the iam.serviceAccounts.actAs permission for the service account. |
| 308 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 309 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 310 | "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message |
| 311 | # before the subscriber should acknowledge the message. After message |
| 312 | # delivery but before the ack deadline expires and before the message is |
| 313 | # acknowledged, it is an outstanding message and will not be delivered |
| 314 | # again during that time (on a best-effort basis). |
| 315 | # |
| 316 | # For pull subscriptions, this value is used as the initial value for the ack |
| 317 | # deadline. To override this value for a given message, call |
| 318 | # `ModifyAckDeadline` with the corresponding `ack_id` if using pull. |
| 319 | # The maximum custom deadline you can specify is 600 seconds (10 minutes). |
| 320 | # |
| 321 | # For push delivery, this value is also used to set the request timeout for |
| 322 | # the call to the push endpoint. |
| 323 | # |
| 324 | # If the subscriber never acknowledges the message, the Pub/Sub |
| 325 | # system will eventually redeliver the message. |
| 326 | # |
| 327 | # If this parameter is 0, a default value of 10 seconds is used. |
| 328 | "name": "A String", # The name of the subscription. It must have the format |
| 329 | # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
| 330 | # start with a letter, and contain only letters (`[A-Za-z]`), numbers |
| 331 | # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), |
| 332 | # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters |
| 333 | # in length, and it must not start with `"goog"`. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 334 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 335 | </div> |
| 336 | |
| 337 | <div class="method"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 338 | <code class="details" id="delete">delete(subscription, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 339 | <pre>Deletes an existing subscription. All pending messages in the subscription |
| 340 | are immediately dropped. Calls to `Pull` after deletion will return |
| 341 | `NOT_FOUND`. After a subscription is deleted, a new one may be created with |
| 342 | the same name, but the new one has no association with the old |
| 343 | subscription, or its topic unless the same topic is specified. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 344 | |
| 345 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 346 | subscription: string, The subscription to delete. (required) |
| 347 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 348 | Allowed values |
| 349 | 1 - v1 error format |
| 350 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 351 | |
| 352 | Returns: |
| 353 | An object of the form: |
| 354 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 355 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 356 | # empty messages in your APIs. A typical example is to use it as the request |
| 357 | # or the response type of an API method. For instance: |
| 358 | # |
| 359 | # service Foo { |
| 360 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 361 | # } |
| 362 | # |
| 363 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 364 | }</pre> |
| 365 | </div> |
| 366 | |
| 367 | <div class="method"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 368 | <code class="details" id="get">get(subscription, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 369 | <pre>Gets the configuration details of a subscription. |
| 370 | |
| 371 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 372 | subscription: string, The name of the subscription to get. (required) |
| 373 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 374 | Allowed values |
| 375 | 1 - v1 error format |
| 376 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 377 | |
| 378 | Returns: |
| 379 | An object of the form: |
| 380 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 381 | { # A subscription resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 382 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 383 | # The value of this field will be `_deleted-topic_` if the topic has been |
| 384 | # deleted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 385 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 386 | # used to configure it. An empty `pushConfig` signifies that the subscriber |
| 387 | # will pull and ack messages using API methods. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 388 | "attributes": { # Endpoint configuration attributes. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 389 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 390 | # Every endpoint has a set of API supported attributes that can be used to |
| 391 | # control different aspects of the message delivery. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 392 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 393 | # The currently supported attribute is `x-goog-version`, which you can |
| 394 | # use to change the format of the push message. This attribute |
| 395 | # indicates the version of the data expected by the endpoint. This |
| 396 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 397 | # The endpoint version is based on the version of the Pub/Sub |
| 398 | # API. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 399 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 400 | # If not present during the `CreateSubscription` call, it will default to |
| 401 | # the version of the API used to make such call. If not present during a |
| 402 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 403 | # calls will always return a valid version, even if the subscription was |
| 404 | # created without this attribute. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 405 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 406 | # The possible values for this attribute are: |
| 407 | # |
| 408 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 409 | # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 410 | "a_key": "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 411 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 412 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 413 | # For example, a Webhook endpoint might use "https://example.com/push". |
| 414 | "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an |
| 415 | # `Authorization` header in the HTTP request for every pushed message. |
| 416 | # [OpenID Connect |
| 417 | # token](https://developers.google.com/identity/protocols/OpenIDConnect). |
| 418 | "audience": "A String", # Audience to be used when generating OIDC token. The audience claim |
| 419 | # identifies the recipients that the JWT is intended for. The audience |
| 420 | # value is a single case-sensitive string. Having multiple values (array) |
| 421 | # for the audience field is not supported. More info about the OIDC JWT |
| 422 | # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 |
| 423 | # Note: if not specified, the Push endpoint URL will be used. |
| 424 | "serviceAccountEmail": "A String", # [Service account |
| 425 | # email](https://cloud.google.com/iam/docs/service-accounts) |
| 426 | # to be used for generating the OIDC token. The caller (for |
| 427 | # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must |
| 428 | # have the iam.serviceAccounts.actAs permission for the service account. |
| 429 | }, |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 430 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 431 | "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message |
| 432 | # before the subscriber should acknowledge the message. After message |
| 433 | # delivery but before the ack deadline expires and before the message is |
| 434 | # acknowledged, it is an outstanding message and will not be delivered |
| 435 | # again during that time (on a best-effort basis). |
| 436 | # |
| 437 | # For pull subscriptions, this value is used as the initial value for the ack |
| 438 | # deadline. To override this value for a given message, call |
| 439 | # `ModifyAckDeadline` with the corresponding `ack_id` if using pull. |
| 440 | # The maximum custom deadline you can specify is 600 seconds (10 minutes). |
| 441 | # |
| 442 | # For push delivery, this value is also used to set the request timeout for |
| 443 | # the call to the push endpoint. |
| 444 | # |
| 445 | # If the subscriber never acknowledges the message, the Pub/Sub |
| 446 | # system will eventually redeliver the message. |
| 447 | # |
| 448 | # If this parameter is 0, a default value of 10 seconds is used. |
| 449 | "name": "A String", # The name of the subscription. It must have the format |
| 450 | # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
| 451 | # start with a letter, and contain only letters (`[A-Za-z]`), numbers |
| 452 | # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), |
| 453 | # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters |
| 454 | # in length, and it must not start with `"goog"`. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 455 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 456 | </div> |
| 457 | |
| 458 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 459 | <code class="details" id="getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 460 | <pre>Gets the access control policy for a resource. |
| 461 | Returns an empty policy if the resource exists and does not have a policy |
| 462 | set. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 463 | |
| 464 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 465 | resource: string, REQUIRED: The resource for which the policy is being requested. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 466 | See the operation documentation for the appropriate value for this field. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 467 | options_requestedPolicyVersion: integer, Optional. The policy format version to be returned. |
| 468 | |
| 469 | Valid values are 0, 1, and 3. Requests specifying an invalid value will be |
| 470 | rejected. |
| 471 | |
| 472 | Requests for policies with any conditional bindings must specify version 3. |
| 473 | Policies without any conditional bindings may specify any valid value or |
| 474 | leave the field unset. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 475 | |
| 476 | To learn which resources support conditions in their IAM policies, see the |
| 477 | [IAM |
| 478 | documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 479 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 480 | Allowed values |
| 481 | 1 - v1 error format |
| 482 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 483 | |
| 484 | Returns: |
| 485 | An object of the form: |
| 486 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 487 | { # An Identity and Access Management (IAM) policy, which specifies access |
| 488 | # controls for Google Cloud resources. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 489 | # |
| 490 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 491 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 492 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 493 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 494 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 495 | # custom role. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 496 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 497 | # For some types of Google Cloud resources, a `binding` can also specify a |
| 498 | # `condition`, which is a logical expression that allows access to a resource |
| 499 | # only if the expression evaluates to `true`. A condition can add constraints |
| 500 | # based on attributes of the request, the resource, or both. To learn which |
| 501 | # resources support conditions in their IAM policies, see the |
| 502 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 503 | # |
| 504 | # **JSON example:** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 505 | # |
| 506 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 507 | # "bindings": [ |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 508 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 509 | # "role": "roles/resourcemanager.organizationAdmin", |
| 510 | # "members": [ |
| 511 | # "user:mike@example.com", |
| 512 | # "group:admins@example.com", |
| 513 | # "domain:google.com", |
| 514 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 515 | # ] |
| 516 | # }, |
| 517 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 518 | # "role": "roles/resourcemanager.organizationViewer", |
| 519 | # "members": [ |
| 520 | # "user:eve@example.com" |
| 521 | # ], |
| 522 | # "condition": { |
| 523 | # "title": "expirable access", |
| 524 | # "description": "Does not grant access after Sep 2020", |
| 525 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 526 | # } |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 527 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 528 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 529 | # "etag": "BwWWja0YfJA=", |
| 530 | # "version": 3 |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 531 | # } |
| 532 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 533 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 534 | # |
| 535 | # bindings: |
| 536 | # - members: |
| 537 | # - user:mike@example.com |
| 538 | # - group:admins@example.com |
| 539 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 540 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 541 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 542 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 543 | # - user:eve@example.com |
| 544 | # role: roles/resourcemanager.organizationViewer |
| 545 | # condition: |
| 546 | # title: expirable access |
| 547 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 548 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 549 | # - etag: BwWWja0YfJA= |
| 550 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 551 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 552 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 553 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 554 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 555 | # prevent simultaneous updates of a policy from overwriting each other. |
| 556 | # It is strongly suggested that systems make use of the `etag` in the |
| 557 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 558 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 559 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 560 | # ensure that their change will be applied to the same version of the policy. |
| 561 | # |
| 562 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 563 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 564 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 565 | # the conditions in the version `3` policy are lost. |
| 566 | "version": 42, # Specifies the format of the policy. |
| 567 | # |
| 568 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 569 | # are rejected. |
| 570 | # |
| 571 | # Any operation that affects conditional role bindings must specify version |
| 572 | # `3`. This requirement applies to the following operations: |
| 573 | # |
| 574 | # * Getting a policy that includes a conditional role binding |
| 575 | # * Adding a conditional role binding to a policy |
| 576 | # * Changing a conditional role binding in a policy |
| 577 | # * Removing any role binding, with or without a condition, from a policy |
| 578 | # that includes conditions |
| 579 | # |
| 580 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 581 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 582 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 583 | # the conditions in the version `3` policy are lost. |
| 584 | # |
| 585 | # If a policy does not include any conditions, operations on that policy may |
| 586 | # specify any valid version or leave the field unset. |
| 587 | # |
| 588 | # To learn which resources support conditions in their IAM policies, see the |
| 589 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 590 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 591 | # `condition` that determines how and when the `bindings` are applied. Each |
| 592 | # of the `bindings` must contain at least one member. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 593 | { # Associates `members` with a `role`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 594 | "role": "A String", # Role that is assigned to `members`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 595 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 596 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 597 | # |
| 598 | # If the condition evaluates to `true`, then this binding applies to the |
| 599 | # current request. |
| 600 | # |
| 601 | # If the condition evaluates to `false`, then this binding does not apply to |
| 602 | # the current request. However, a different role binding might grant the same |
| 603 | # role to one or more of the members in this binding. |
| 604 | # |
| 605 | # To learn which resources support conditions in their IAM policies, see the |
| 606 | # [IAM |
| 607 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| 608 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 609 | # are documented at https://github.com/google/cel-spec. |
| 610 | # |
| 611 | # Example (Comparison): |
| 612 | # |
| 613 | # title: "Summary size limit" |
| 614 | # description: "Determines if a summary is less than 100 chars" |
| 615 | # expression: "document.summary.size() < 100" |
| 616 | # |
| 617 | # Example (Equality): |
| 618 | # |
| 619 | # title: "Requestor is owner" |
| 620 | # description: "Determines if requestor is the document owner" |
| 621 | # expression: "document.owner == request.auth.claims.email" |
| 622 | # |
| 623 | # Example (Logic): |
| 624 | # |
| 625 | # title: "Public documents" |
| 626 | # description: "Determine whether the document should be publicly visible" |
| 627 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 628 | # |
| 629 | # Example (Data Manipulation): |
| 630 | # |
| 631 | # title: "Notification string" |
| 632 | # description: "Create a notification string with a timestamp." |
| 633 | # expression: "'New message received at ' + string(document.create_time)" |
| 634 | # |
| 635 | # The exact variables and functions that may be referenced within an expression |
| 636 | # are determined by the service that evaluates it. See the service |
| 637 | # documentation for additional information. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 638 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 639 | # reporting, e.g. a file name and a position in the file. |
| 640 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 641 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 642 | # expression. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 643 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 644 | # describes the expression, e.g. when hovered over it in a UI. |
| 645 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 646 | # syntax. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 647 | }, |
| 648 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 649 | # `members` can have the following values: |
| 650 | # |
| 651 | # * `allUsers`: A special identifier that represents anyone who is |
| 652 | # on the internet; with or without a Google account. |
| 653 | # |
| 654 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 655 | # who is authenticated with a Google account or a service account. |
| 656 | # |
| 657 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 658 | # account. For example, `alice@example.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 659 | # |
| 660 | # |
| 661 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 662 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 663 | # |
| 664 | # * `group:{emailid}`: An email address that represents a Google group. |
| 665 | # For example, `admins@example.com`. |
| 666 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 667 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 668 | # identifier) representing a user that has been recently deleted. For |
| 669 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 670 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 671 | # retains the role in the binding. |
| 672 | # |
| 673 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 674 | # unique identifier) representing a service account that has been recently |
| 675 | # deleted. For example, |
| 676 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 677 | # If the service account is undeleted, this value reverts to |
| 678 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 679 | # role in the binding. |
| 680 | # |
| 681 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 682 | # identifier) representing a Google group that has been recently |
| 683 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 684 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 685 | # recovered group retains the role in the binding. |
| 686 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 687 | # |
| 688 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 689 | # users of that domain. For example, `google.com` or `example.com`. |
| 690 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 691 | "A String", |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 692 | ], |
| 693 | }, |
| 694 | ], |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 695 | }</pre> |
| 696 | </div> |
| 697 | |
| 698 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 699 | <code class="details" id="list">list(project, pageToken=None, pageSize=None, x__xgafv=None)</code> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 700 | <pre>Lists matching subscriptions. |
| 701 | |
| 702 | Args: |
| 703 | project: string, The name of the cloud project that subscriptions belong to. (required) |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 704 | pageToken: string, The value returned by the last `ListSubscriptionsResponse`; indicates that |
| 705 | this is a continuation of a prior `ListSubscriptions` call, and that the |
| 706 | system should return the next page of data. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 707 | pageSize: integer, Maximum number of subscriptions to return. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 708 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 709 | Allowed values |
| 710 | 1 - v1 error format |
| 711 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 712 | |
| 713 | Returns: |
| 714 | An object of the form: |
| 715 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 716 | { # Response for the `ListSubscriptions` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 717 | "subscriptions": [ # The subscriptions that match the request. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 718 | { # A subscription resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 719 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 720 | # The value of this field will be `_deleted-topic_` if the topic has been |
| 721 | # deleted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 722 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 723 | # used to configure it. An empty `pushConfig` signifies that the subscriber |
| 724 | # will pull and ack messages using API methods. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 725 | "attributes": { # Endpoint configuration attributes. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 726 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 727 | # Every endpoint has a set of API supported attributes that can be used to |
| 728 | # control different aspects of the message delivery. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 729 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 730 | # The currently supported attribute is `x-goog-version`, which you can |
| 731 | # use to change the format of the push message. This attribute |
| 732 | # indicates the version of the data expected by the endpoint. This |
| 733 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 734 | # The endpoint version is based on the version of the Pub/Sub |
| 735 | # API. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 736 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 737 | # If not present during the `CreateSubscription` call, it will default to |
| 738 | # the version of the API used to make such call. If not present during a |
| 739 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 740 | # calls will always return a valid version, even if the subscription was |
| 741 | # created without this attribute. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 742 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 743 | # The possible values for this attribute are: |
| 744 | # |
| 745 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 746 | # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 747 | "a_key": "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 748 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 749 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 750 | # For example, a Webhook endpoint might use "https://example.com/push". |
| 751 | "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an |
| 752 | # `Authorization` header in the HTTP request for every pushed message. |
| 753 | # [OpenID Connect |
| 754 | # token](https://developers.google.com/identity/protocols/OpenIDConnect). |
| 755 | "audience": "A String", # Audience to be used when generating OIDC token. The audience claim |
| 756 | # identifies the recipients that the JWT is intended for. The audience |
| 757 | # value is a single case-sensitive string. Having multiple values (array) |
| 758 | # for the audience field is not supported. More info about the OIDC JWT |
| 759 | # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 |
| 760 | # Note: if not specified, the Push endpoint URL will be used. |
| 761 | "serviceAccountEmail": "A String", # [Service account |
| 762 | # email](https://cloud.google.com/iam/docs/service-accounts) |
| 763 | # to be used for generating the OIDC token. The caller (for |
| 764 | # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must |
| 765 | # have the iam.serviceAccounts.actAs permission for the service account. |
| 766 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 767 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 768 | "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message |
| 769 | # before the subscriber should acknowledge the message. After message |
| 770 | # delivery but before the ack deadline expires and before the message is |
| 771 | # acknowledged, it is an outstanding message and will not be delivered |
| 772 | # again during that time (on a best-effort basis). |
| 773 | # |
| 774 | # For pull subscriptions, this value is used as the initial value for the ack |
| 775 | # deadline. To override this value for a given message, call |
| 776 | # `ModifyAckDeadline` with the corresponding `ack_id` if using pull. |
| 777 | # The maximum custom deadline you can specify is 600 seconds (10 minutes). |
| 778 | # |
| 779 | # For push delivery, this value is also used to set the request timeout for |
| 780 | # the call to the push endpoint. |
| 781 | # |
| 782 | # If the subscriber never acknowledges the message, the Pub/Sub |
| 783 | # system will eventually redeliver the message. |
| 784 | # |
| 785 | # If this parameter is 0, a default value of 10 seconds is used. |
| 786 | "name": "A String", # The name of the subscription. It must have the format |
| 787 | # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
| 788 | # start with a letter, and contain only letters (`[A-Za-z]`), numbers |
| 789 | # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), |
| 790 | # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters |
| 791 | # in length, and it must not start with `"goog"`. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 792 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 793 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 794 | "nextPageToken": "A String", # If not empty, indicates that there may be more subscriptions that match |
| 795 | # the request; this value should be passed in a new |
| 796 | # `ListSubscriptionsRequest` to get more subscriptions. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 797 | }</pre> |
| 798 | </div> |
| 799 | |
| 800 | <div class="method"> |
| 801 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 802 | <pre>Retrieves the next page of results. |
| 803 | |
| 804 | Args: |
| 805 | previous_request: The request for the previous page. (required) |
| 806 | previous_response: The response from the request for the previous page. (required) |
| 807 | |
| 808 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 809 | A request object that you can call 'execute()' on to request the next |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 810 | page. Returns None if there are no more items in the collection. |
| 811 | </pre> |
| 812 | </div> |
| 813 | |
| 814 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 815 | <code class="details" id="modifyAckDeadline">modifyAckDeadline(subscription, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 816 | <pre>Modifies the ack deadline for a specific message. This method is useful |
| 817 | to indicate that more time is needed to process a message by the |
| 818 | subscriber, or to make the message available for redelivery if the |
| 819 | processing was interrupted. Note that this does not modify the |
| 820 | subscription-level `ackDeadlineSeconds` used for subsequent messages. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 821 | |
| 822 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 823 | subscription: string, The name of the subscription. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 824 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 825 | The object takes the form of: |
| 826 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 827 | { # Request for the ModifyAckDeadline method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 828 | "ackId": "A String", # The acknowledgment ID. Either this or ack_ids must be populated, but not |
| 829 | # both. |
| 830 | "ackDeadlineSeconds": 42, # The new ack deadline with respect to the time this request was sent to |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 831 | # the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 832 | # ack deadline will expire 10 seconds after the `ModifyAckDeadline` call |
| 833 | # was made. Specifying zero may immediately make the message available for |
| 834 | # another pull request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 835 | "ackIds": [ # List of acknowledgment IDs. |
| 836 | "A String", |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 837 | ], |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 838 | } |
| 839 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 840 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 841 | Allowed values |
| 842 | 1 - v1 error format |
| 843 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 844 | |
| 845 | Returns: |
| 846 | An object of the form: |
| 847 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 848 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 849 | # empty messages in your APIs. A typical example is to use it as the request |
| 850 | # or the response type of an API method. For instance: |
| 851 | # |
| 852 | # service Foo { |
| 853 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 854 | # } |
| 855 | # |
| 856 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 857 | }</pre> |
| 858 | </div> |
| 859 | |
| 860 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 861 | <code class="details" id="modifyPushConfig">modifyPushConfig(subscription, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 862 | <pre>Modifies the `PushConfig` for a specified subscription. |
| 863 | |
| 864 | This may be used to change a push subscription to a pull one (signified by |
| 865 | an empty `PushConfig`) or vice versa, or change the endpoint URL and other |
| 866 | attributes of a push subscription. Messages will accumulate for delivery |
| 867 | continuously through the call regardless of changes to the `PushConfig`. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 868 | |
| 869 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 870 | subscription: string, The name of the subscription. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 871 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 872 | The object takes the form of: |
| 873 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 874 | { # Request for the ModifyPushConfig method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 875 | "pushConfig": { # Configuration for a push delivery endpoint. # The push configuration for future deliveries. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 876 | # |
| 877 | # An empty `pushConfig` indicates that the Pub/Sub system should |
| 878 | # stop pushing messages from the given subscription and allow |
| 879 | # messages to be pulled and acknowledged - effectively pausing |
| 880 | # the subscription if `Pull` is not called. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 881 | "attributes": { # Endpoint configuration attributes. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 882 | # |
| 883 | # Every endpoint has a set of API supported attributes that can be used to |
| 884 | # control different aspects of the message delivery. |
| 885 | # |
| 886 | # The currently supported attribute is `x-goog-version`, which you can |
| 887 | # use to change the format of the push message. This attribute |
| 888 | # indicates the version of the data expected by the endpoint. This |
| 889 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 890 | # The endpoint version is based on the version of the Pub/Sub |
| 891 | # API. |
| 892 | # |
| 893 | # If not present during the `CreateSubscription` call, it will default to |
| 894 | # the version of the API used to make such call. If not present during a |
| 895 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 896 | # calls will always return a valid version, even if the subscription was |
| 897 | # created without this attribute. |
| 898 | # |
| 899 | # The possible values for this attribute are: |
| 900 | # |
| 901 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 902 | # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 903 | "a_key": "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 904 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 905 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 906 | # For example, a Webhook endpoint might use "https://example.com/push". |
| 907 | "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an |
| 908 | # `Authorization` header in the HTTP request for every pushed message. |
| 909 | # [OpenID Connect |
| 910 | # token](https://developers.google.com/identity/protocols/OpenIDConnect). |
| 911 | "audience": "A String", # Audience to be used when generating OIDC token. The audience claim |
| 912 | # identifies the recipients that the JWT is intended for. The audience |
| 913 | # value is a single case-sensitive string. Having multiple values (array) |
| 914 | # for the audience field is not supported. More info about the OIDC JWT |
| 915 | # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 |
| 916 | # Note: if not specified, the Push endpoint URL will be used. |
| 917 | "serviceAccountEmail": "A String", # [Service account |
| 918 | # email](https://cloud.google.com/iam/docs/service-accounts) |
| 919 | # to be used for generating the OIDC token. The caller (for |
| 920 | # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must |
| 921 | # have the iam.serviceAccounts.actAs permission for the service account. |
| 922 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 923 | }, |
| 924 | } |
| 925 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 926 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 927 | Allowed values |
| 928 | 1 - v1 error format |
| 929 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 930 | |
| 931 | Returns: |
| 932 | An object of the form: |
| 933 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 934 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 935 | # empty messages in your APIs. A typical example is to use it as the request |
| 936 | # or the response type of an API method. For instance: |
| 937 | # |
| 938 | # service Foo { |
| 939 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 940 | # } |
| 941 | # |
| 942 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 943 | }</pre> |
| 944 | </div> |
| 945 | |
| 946 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 947 | <code class="details" id="pull">pull(subscription, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 948 | <pre>Pulls messages from the server. Returns an empty list if there are no |
| 949 | messages available in the backlog. The server may return `UNAVAILABLE` if |
| 950 | there are too many concurrent pull requests pending for the given |
| 951 | subscription. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 952 | |
| 953 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 954 | subscription: string, The subscription from which messages should be pulled. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 955 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 956 | The object takes the form of: |
| 957 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 958 | { # Request for the `Pull` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 959 | "returnImmediately": True or False, # Optional. If this is specified as true the system will respond immediately even if |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 960 | # it is not able to return a message in the `Pull` response. Otherwise the |
| 961 | # system is allowed to wait until at least one message is available rather |
| 962 | # than returning no messages. The client may cancel the request if it does |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 963 | # not wish to wait any longer for the response. Warning: setting this field |
| 964 | # to `true` is discouraged because it adversely impacts the performance of |
| 965 | # `Pull` operations. We recommend that users do not set this field. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 966 | "maxMessages": 42, # The maximum number of messages returned for this request. The Pub/Sub |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 967 | # system may return fewer than the number specified. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 968 | } |
| 969 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 970 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 971 | Allowed values |
| 972 | 1 - v1 error format |
| 973 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 974 | |
| 975 | Returns: |
| 976 | An object of the form: |
| 977 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 978 | { # Response for the `Pull` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 979 | "receivedMessages": [ # Received Pub/Sub messages. The Pub/Sub system will return zero messages if |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 980 | # there are no more available in the backlog. The Pub/Sub system may return |
| 981 | # fewer than the `maxMessages` requested even if there are more messages |
| 982 | # available in the backlog. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 983 | { # A message and its corresponding acknowledgment ID. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 984 | "message": { # A message data and its attributes. The message payload must not be empty; # The message. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 985 | # it must contain either a non-empty data field, or at least one attribute. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 986 | "messageId": "A String", # ID of this message, assigned by the server when the message is published. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 987 | # Guaranteed to be unique within the topic. This value may be read by a |
| 988 | # subscriber that receives a `PubsubMessage` via a `Pull` call or a push |
| 989 | # delivery. It must not be populated by the publisher in a `Publish` call. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 990 | "attributes": { # Optional attributes for this message. |
| 991 | "a_key": "A String", |
| 992 | }, |
| 993 | "publishTime": "A String", # The time at which the message was published, populated by the server when |
| 994 | # it receives the `Publish` call. It must not be populated by the |
| 995 | # publisher in a `Publish` call. |
| 996 | "data": "A String", # The message payload. For JSON requests, the value of this field must be |
| 997 | # [base64-encoded](https://tools.ietf.org/html/rfc4648). |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 998 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 999 | "ackId": "A String", # This ID can be used to acknowledge the received message. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1000 | }, |
| 1001 | ], |
| 1002 | }</pre> |
| 1003 | </div> |
| 1004 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1005 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1006 | <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1007 | <pre>Sets the access control policy on the specified resource. Replaces any |
| 1008 | existing policy. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1009 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1010 | Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1011 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1012 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1013 | resource: string, REQUIRED: The resource for which the policy is being specified. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1014 | See the operation documentation for the appropriate value for this field. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1015 | body: object, The request body. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1016 | The object takes the form of: |
| 1017 | |
| 1018 | { # Request message for `SetIamPolicy` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1019 | "policy": { # 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 Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1020 | # the policy is limited to a few 10s of KB. An empty policy is a |
| 1021 | # valid policy but certain Cloud Platform services (such as Projects) |
| 1022 | # might reject them. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1023 | # controls for Google Cloud resources. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1024 | # |
| 1025 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1026 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 1027 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 1028 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 1029 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 1030 | # custom role. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1031 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1032 | # For some types of Google Cloud resources, a `binding` can also specify a |
| 1033 | # `condition`, which is a logical expression that allows access to a resource |
| 1034 | # only if the expression evaluates to `true`. A condition can add constraints |
| 1035 | # based on attributes of the request, the resource, or both. To learn which |
| 1036 | # resources support conditions in their IAM policies, see the |
| 1037 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1038 | # |
| 1039 | # **JSON example:** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1040 | # |
| 1041 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1042 | # "bindings": [ |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1043 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1044 | # "role": "roles/resourcemanager.organizationAdmin", |
| 1045 | # "members": [ |
| 1046 | # "user:mike@example.com", |
| 1047 | # "group:admins@example.com", |
| 1048 | # "domain:google.com", |
| 1049 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1050 | # ] |
| 1051 | # }, |
| 1052 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1053 | # "role": "roles/resourcemanager.organizationViewer", |
| 1054 | # "members": [ |
| 1055 | # "user:eve@example.com" |
| 1056 | # ], |
| 1057 | # "condition": { |
| 1058 | # "title": "expirable access", |
| 1059 | # "description": "Does not grant access after Sep 2020", |
| 1060 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1061 | # } |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1062 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1063 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1064 | # "etag": "BwWWja0YfJA=", |
| 1065 | # "version": 3 |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1066 | # } |
| 1067 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1068 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1069 | # |
| 1070 | # bindings: |
| 1071 | # - members: |
| 1072 | # - user:mike@example.com |
| 1073 | # - group:admins@example.com |
| 1074 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1075 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 1076 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1077 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1078 | # - user:eve@example.com |
| 1079 | # role: roles/resourcemanager.organizationViewer |
| 1080 | # condition: |
| 1081 | # title: expirable access |
| 1082 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1083 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1084 | # - etag: BwWWja0YfJA= |
| 1085 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1086 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1087 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1088 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1089 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 1090 | # prevent simultaneous updates of a policy from overwriting each other. |
| 1091 | # It is strongly suggested that systems make use of the `etag` in the |
| 1092 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 1093 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 1094 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 1095 | # ensure that their change will be applied to the same version of the policy. |
| 1096 | # |
| 1097 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1098 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1099 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1100 | # the conditions in the version `3` policy are lost. |
| 1101 | "version": 42, # Specifies the format of the policy. |
| 1102 | # |
| 1103 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 1104 | # are rejected. |
| 1105 | # |
| 1106 | # Any operation that affects conditional role bindings must specify version |
| 1107 | # `3`. This requirement applies to the following operations: |
| 1108 | # |
| 1109 | # * Getting a policy that includes a conditional role binding |
| 1110 | # * Adding a conditional role binding to a policy |
| 1111 | # * Changing a conditional role binding in a policy |
| 1112 | # * Removing any role binding, with or without a condition, from a policy |
| 1113 | # that includes conditions |
| 1114 | # |
| 1115 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1116 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1117 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1118 | # the conditions in the version `3` policy are lost. |
| 1119 | # |
| 1120 | # If a policy does not include any conditions, operations on that policy may |
| 1121 | # specify any valid version or leave the field unset. |
| 1122 | # |
| 1123 | # To learn which resources support conditions in their IAM policies, see the |
| 1124 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1125 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1126 | # `condition` that determines how and when the `bindings` are applied. Each |
| 1127 | # of the `bindings` must contain at least one member. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 1128 | { # Associates `members` with a `role`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1129 | "role": "A String", # Role that is assigned to `members`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1130 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1131 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 1132 | # |
| 1133 | # If the condition evaluates to `true`, then this binding applies to the |
| 1134 | # current request. |
| 1135 | # |
| 1136 | # If the condition evaluates to `false`, then this binding does not apply to |
| 1137 | # the current request. However, a different role binding might grant the same |
| 1138 | # role to one or more of the members in this binding. |
| 1139 | # |
| 1140 | # To learn which resources support conditions in their IAM policies, see the |
| 1141 | # [IAM |
| 1142 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| 1143 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 1144 | # are documented at https://github.com/google/cel-spec. |
| 1145 | # |
| 1146 | # Example (Comparison): |
| 1147 | # |
| 1148 | # title: "Summary size limit" |
| 1149 | # description: "Determines if a summary is less than 100 chars" |
| 1150 | # expression: "document.summary.size() < 100" |
| 1151 | # |
| 1152 | # Example (Equality): |
| 1153 | # |
| 1154 | # title: "Requestor is owner" |
| 1155 | # description: "Determines if requestor is the document owner" |
| 1156 | # expression: "document.owner == request.auth.claims.email" |
| 1157 | # |
| 1158 | # Example (Logic): |
| 1159 | # |
| 1160 | # title: "Public documents" |
| 1161 | # description: "Determine whether the document should be publicly visible" |
| 1162 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 1163 | # |
| 1164 | # Example (Data Manipulation): |
| 1165 | # |
| 1166 | # title: "Notification string" |
| 1167 | # description: "Create a notification string with a timestamp." |
| 1168 | # expression: "'New message received at ' + string(document.create_time)" |
| 1169 | # |
| 1170 | # The exact variables and functions that may be referenced within an expression |
| 1171 | # are determined by the service that evaluates it. See the service |
| 1172 | # documentation for additional information. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1173 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 1174 | # reporting, e.g. a file name and a position in the file. |
| 1175 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 1176 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 1177 | # expression. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1178 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 1179 | # describes the expression, e.g. when hovered over it in a UI. |
| 1180 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 1181 | # syntax. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1182 | }, |
| 1183 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1184 | # `members` can have the following values: |
| 1185 | # |
| 1186 | # * `allUsers`: A special identifier that represents anyone who is |
| 1187 | # on the internet; with or without a Google account. |
| 1188 | # |
| 1189 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 1190 | # who is authenticated with a Google account or a service account. |
| 1191 | # |
| 1192 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1193 | # account. For example, `alice@example.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1194 | # |
| 1195 | # |
| 1196 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 1197 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 1198 | # |
| 1199 | # * `group:{emailid}`: An email address that represents a Google group. |
| 1200 | # For example, `admins@example.com`. |
| 1201 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1202 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1203 | # identifier) representing a user that has been recently deleted. For |
| 1204 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 1205 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 1206 | # retains the role in the binding. |
| 1207 | # |
| 1208 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 1209 | # unique identifier) representing a service account that has been recently |
| 1210 | # deleted. For example, |
| 1211 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 1212 | # If the service account is undeleted, this value reverts to |
| 1213 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 1214 | # role in the binding. |
| 1215 | # |
| 1216 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1217 | # identifier) representing a Google group that has been recently |
| 1218 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 1219 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 1220 | # recovered group retains the role in the binding. |
| 1221 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1222 | # |
| 1223 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1224 | # users of that domain. For example, `google.com` or `example.com`. |
| 1225 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1226 | "A String", |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1227 | ], |
| 1228 | }, |
| 1229 | ], |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1230 | }, |
| 1231 | } |
| 1232 | |
| 1233 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1234 | Allowed values |
| 1235 | 1 - v1 error format |
| 1236 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1237 | |
| 1238 | Returns: |
| 1239 | An object of the form: |
| 1240 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1241 | { # An Identity and Access Management (IAM) policy, which specifies access |
| 1242 | # controls for Google Cloud resources. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1243 | # |
| 1244 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1245 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 1246 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 1247 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 1248 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 1249 | # custom role. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1250 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1251 | # For some types of Google Cloud resources, a `binding` can also specify a |
| 1252 | # `condition`, which is a logical expression that allows access to a resource |
| 1253 | # only if the expression evaluates to `true`. A condition can add constraints |
| 1254 | # based on attributes of the request, the resource, or both. To learn which |
| 1255 | # resources support conditions in their IAM policies, see the |
| 1256 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1257 | # |
| 1258 | # **JSON example:** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1259 | # |
| 1260 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1261 | # "bindings": [ |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1262 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1263 | # "role": "roles/resourcemanager.organizationAdmin", |
| 1264 | # "members": [ |
| 1265 | # "user:mike@example.com", |
| 1266 | # "group:admins@example.com", |
| 1267 | # "domain:google.com", |
| 1268 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1269 | # ] |
| 1270 | # }, |
| 1271 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1272 | # "role": "roles/resourcemanager.organizationViewer", |
| 1273 | # "members": [ |
| 1274 | # "user:eve@example.com" |
| 1275 | # ], |
| 1276 | # "condition": { |
| 1277 | # "title": "expirable access", |
| 1278 | # "description": "Does not grant access after Sep 2020", |
| 1279 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1280 | # } |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1281 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1282 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1283 | # "etag": "BwWWja0YfJA=", |
| 1284 | # "version": 3 |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1285 | # } |
| 1286 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1287 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1288 | # |
| 1289 | # bindings: |
| 1290 | # - members: |
| 1291 | # - user:mike@example.com |
| 1292 | # - group:admins@example.com |
| 1293 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1294 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 1295 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1296 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1297 | # - user:eve@example.com |
| 1298 | # role: roles/resourcemanager.organizationViewer |
| 1299 | # condition: |
| 1300 | # title: expirable access |
| 1301 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1302 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1303 | # - etag: BwWWja0YfJA= |
| 1304 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1305 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1306 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1307 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1308 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 1309 | # prevent simultaneous updates of a policy from overwriting each other. |
| 1310 | # It is strongly suggested that systems make use of the `etag` in the |
| 1311 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 1312 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 1313 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 1314 | # ensure that their change will be applied to the same version of the policy. |
| 1315 | # |
| 1316 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1317 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1318 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1319 | # the conditions in the version `3` policy are lost. |
| 1320 | "version": 42, # Specifies the format of the policy. |
| 1321 | # |
| 1322 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 1323 | # are rejected. |
| 1324 | # |
| 1325 | # Any operation that affects conditional role bindings must specify version |
| 1326 | # `3`. This requirement applies to the following operations: |
| 1327 | # |
| 1328 | # * Getting a policy that includes a conditional role binding |
| 1329 | # * Adding a conditional role binding to a policy |
| 1330 | # * Changing a conditional role binding in a policy |
| 1331 | # * Removing any role binding, with or without a condition, from a policy |
| 1332 | # that includes conditions |
| 1333 | # |
| 1334 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1335 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1336 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1337 | # the conditions in the version `3` policy are lost. |
| 1338 | # |
| 1339 | # If a policy does not include any conditions, operations on that policy may |
| 1340 | # specify any valid version or leave the field unset. |
| 1341 | # |
| 1342 | # To learn which resources support conditions in their IAM policies, see the |
| 1343 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1344 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1345 | # `condition` that determines how and when the `bindings` are applied. Each |
| 1346 | # of the `bindings` must contain at least one member. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 1347 | { # Associates `members` with a `role`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1348 | "role": "A String", # Role that is assigned to `members`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1349 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1350 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 1351 | # |
| 1352 | # If the condition evaluates to `true`, then this binding applies to the |
| 1353 | # current request. |
| 1354 | # |
| 1355 | # If the condition evaluates to `false`, then this binding does not apply to |
| 1356 | # the current request. However, a different role binding might grant the same |
| 1357 | # role to one or more of the members in this binding. |
| 1358 | # |
| 1359 | # To learn which resources support conditions in their IAM policies, see the |
| 1360 | # [IAM |
| 1361 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| 1362 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 1363 | # are documented at https://github.com/google/cel-spec. |
| 1364 | # |
| 1365 | # Example (Comparison): |
| 1366 | # |
| 1367 | # title: "Summary size limit" |
| 1368 | # description: "Determines if a summary is less than 100 chars" |
| 1369 | # expression: "document.summary.size() < 100" |
| 1370 | # |
| 1371 | # Example (Equality): |
| 1372 | # |
| 1373 | # title: "Requestor is owner" |
| 1374 | # description: "Determines if requestor is the document owner" |
| 1375 | # expression: "document.owner == request.auth.claims.email" |
| 1376 | # |
| 1377 | # Example (Logic): |
| 1378 | # |
| 1379 | # title: "Public documents" |
| 1380 | # description: "Determine whether the document should be publicly visible" |
| 1381 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 1382 | # |
| 1383 | # Example (Data Manipulation): |
| 1384 | # |
| 1385 | # title: "Notification string" |
| 1386 | # description: "Create a notification string with a timestamp." |
| 1387 | # expression: "'New message received at ' + string(document.create_time)" |
| 1388 | # |
| 1389 | # The exact variables and functions that may be referenced within an expression |
| 1390 | # are determined by the service that evaluates it. See the service |
| 1391 | # documentation for additional information. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1392 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 1393 | # reporting, e.g. a file name and a position in the file. |
| 1394 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 1395 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 1396 | # expression. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1397 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 1398 | # describes the expression, e.g. when hovered over it in a UI. |
| 1399 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 1400 | # syntax. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1401 | }, |
| 1402 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1403 | # `members` can have the following values: |
| 1404 | # |
| 1405 | # * `allUsers`: A special identifier that represents anyone who is |
| 1406 | # on the internet; with or without a Google account. |
| 1407 | # |
| 1408 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 1409 | # who is authenticated with a Google account or a service account. |
| 1410 | # |
| 1411 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1412 | # account. For example, `alice@example.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1413 | # |
| 1414 | # |
| 1415 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 1416 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 1417 | # |
| 1418 | # * `group:{emailid}`: An email address that represents a Google group. |
| 1419 | # For example, `admins@example.com`. |
| 1420 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1421 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1422 | # identifier) representing a user that has been recently deleted. For |
| 1423 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 1424 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 1425 | # retains the role in the binding. |
| 1426 | # |
| 1427 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 1428 | # unique identifier) representing a service account that has been recently |
| 1429 | # deleted. For example, |
| 1430 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 1431 | # If the service account is undeleted, this value reverts to |
| 1432 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 1433 | # role in the binding. |
| 1434 | # |
| 1435 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1436 | # identifier) representing a Google group that has been recently |
| 1437 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 1438 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 1439 | # recovered group retains the role in the binding. |
| 1440 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1441 | # |
| 1442 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1443 | # users of that domain. For example, `google.com` or `example.com`. |
| 1444 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1445 | "A String", |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1446 | ], |
| 1447 | }, |
| 1448 | ], |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1449 | }</pre> |
| 1450 | </div> |
| 1451 | |
| 1452 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1453 | <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1454 | <pre>Returns permissions that a caller has on the specified resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1455 | If the resource does not exist, this will return an empty set of |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1456 | permissions, not a `NOT_FOUND` error. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1457 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1458 | Note: This operation is designed to be used for building permission-aware |
| 1459 | UIs and command-line tools, not for authorization checking. This operation |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1460 | may "fail open" without warning. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1461 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1462 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1463 | resource: string, REQUIRED: The resource for which the policy detail is being requested. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1464 | See the operation documentation for the appropriate value for this field. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1465 | body: object, The request body. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1466 | The object takes the form of: |
| 1467 | |
| 1468 | { # Request message for `TestIamPermissions` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1469 | "permissions": [ # The set of permissions to check for the `resource`. Permissions with |
| 1470 | # wildcards (such as '*' or 'storage.*') are not allowed. For more |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1471 | # information see |
| 1472 | # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1473 | "A String", |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1474 | ], |
| 1475 | } |
| 1476 | |
| 1477 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1478 | Allowed values |
| 1479 | 1 - v1 error format |
| 1480 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1481 | |
| 1482 | Returns: |
| 1483 | An object of the form: |
| 1484 | |
| 1485 | { # Response message for `TestIamPermissions` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1486 | "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1487 | # allowed. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1488 | "A String", |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1489 | ], |
| 1490 | }</pre> |
| 1491 | </div> |
| 1492 | |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1493 | </body></html> |