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"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 78 | <code><a href="#acknowledge">acknowledge(subscription, body, 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"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 81 | <code><a href="#create">create(name, body, 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"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 90 | <code><a href="#getIamPolicy">getIamPolicy(resource, 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"> |
| 93 | <code><a href="#list">list(project, pageSize=None, pageToken=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"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 99 | <code><a href="#modifyAckDeadline">modifyAckDeadline(subscription, body, 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"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 102 | <code><a href="#modifyPushConfig">modifyPushConfig(subscription, body, 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"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 105 | <code><a href="#pull">pull(subscription, body, 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"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 108 | <code><a href="#setIamPolicy">setIamPolicy(resource, body, 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"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 111 | <code><a href="#testIamPermissions">testIamPermissions(resource, body, 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"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 115 | <code class="details" id="acknowledge">acknowledge(subscription, body, 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) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 126 | body: object, The request body. (required) |
| 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. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 130 | "ackIds": [ # The acknowledgment ID for the messages being acknowledged that was returned |
| 131 | # by the Pub/Sub system in the `Pull` response. Must not be empty. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 132 | "A String", |
| 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"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 157 | <code class="details" id="create">create(name, body, 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`. |
| 160 | If the corresponding topic doesn't exist, returns `NOT_FOUND`. |
| 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 |
| 168 | `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
| 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 |
| 172 | in length, and it must not start with `"goog"`. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 173 | body: object, The request body. (required) |
| 174 | The object takes the form of: |
| 175 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 176 | { # A subscription resource. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 177 | "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message |
| 178 | # before the subscriber should acknowledge the message. After message |
| 179 | # delivery but before the ack deadline expires and before the message is |
| 180 | # acknowledged, it is an outstanding message and will not be delivered |
| 181 | # again during that time (on a best-effort basis). |
| 182 | # |
| 183 | # For pull subscriptions, this value is used as the initial value for the ack |
| 184 | # deadline. To override this value for a given message, call |
| 185 | # `ModifyAckDeadline` with the corresponding `ack_id` if using pull. |
| 186 | # The maximum custom deadline you can specify is 600 seconds (10 minutes). |
| 187 | # |
| 188 | # For push delivery, this value is also used to set the request timeout for |
| 189 | # the call to the push endpoint. |
| 190 | # |
| 191 | # If the subscriber never acknowledges the message, the Pub/Sub |
| 192 | # system will eventually redeliver the message. |
| 193 | # |
| 194 | # If this parameter is 0, a default value of 10 seconds is used. |
| 195 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
| 196 | # The value of this field will be `_deleted-topic_` if the topic has been |
| 197 | # deleted. |
| 198 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
| 199 | # used to configure it. An empty `pushConfig` signifies that the subscriber |
| 200 | # will pull and ack messages using API methods. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 201 | "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an |
| 202 | # `Authorization` header in the HTTP request for every pushed message. |
| 203 | # [OpenID Connect |
| 204 | # token](https://developers.google.com/identity/protocols/OpenIDConnect). |
| 205 | "audience": "A String", # Audience to be used when generating OIDC token. The audience claim |
| 206 | # identifies the recipients that the JWT is intended for. The audience |
| 207 | # value is a single case-sensitive string. Having multiple values (array) |
| 208 | # for the audience field is not supported. More info about the OIDC JWT |
| 209 | # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 |
| 210 | # Note: if not specified, the Push endpoint URL will be used. |
| 211 | "serviceAccountEmail": "A String", # [Service account |
| 212 | # email](https://cloud.google.com/iam/docs/service-accounts) |
| 213 | # to be used for generating the OIDC token. The caller (for |
| 214 | # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must |
| 215 | # have the iam.serviceAccounts.actAs permission for the service account. |
| 216 | }, |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 217 | "attributes": { # Endpoint configuration attributes. |
| 218 | # |
| 219 | # Every endpoint has a set of API supported attributes that can be used to |
| 220 | # control different aspects of the message delivery. |
| 221 | # |
| 222 | # The currently supported attribute is `x-goog-version`, which you can |
| 223 | # use to change the format of the push message. This attribute |
| 224 | # indicates the version of the data expected by the endpoint. This |
| 225 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 226 | # The endpoint version is based on the version of the Pub/Sub |
| 227 | # API. |
| 228 | # |
| 229 | # If not present during the `CreateSubscription` call, it will default to |
| 230 | # the version of the API used to make such call. If not present during a |
| 231 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 232 | # calls will always return a valid version, even if the subscription was |
| 233 | # created without this attribute. |
| 234 | # |
| 235 | # The possible values for this attribute are: |
| 236 | # |
| 237 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 238 | # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. |
| 239 | "a_key": "A String", |
| 240 | }, |
| 241 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 242 | # For example, a Webhook endpoint might use "https://example.com/push". |
| 243 | }, |
| 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"`. |
| 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. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 261 | "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message |
| 262 | # before the subscriber should acknowledge the message. After message |
| 263 | # delivery but before the ack deadline expires and before the message is |
| 264 | # acknowledged, it is an outstanding message and will not be delivered |
| 265 | # again during that time (on a best-effort basis). |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 266 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 267 | # For pull subscriptions, this value is used as the initial value for the ack |
| 268 | # deadline. To override this value for a given message, call |
| 269 | # `ModifyAckDeadline` with the corresponding `ack_id` if using pull. |
| 270 | # The maximum custom deadline you can specify is 600 seconds (10 minutes). |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 271 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 272 | # For push delivery, this value is also used to set the request timeout for |
| 273 | # the call to the push endpoint. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 274 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 275 | # If the subscriber never acknowledges the message, the Pub/Sub |
| 276 | # system will eventually redeliver the message. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 277 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 278 | # If this parameter is 0, a default value of 10 seconds is used. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 279 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
| 280 | # The value of this field will be `_deleted-topic_` if the topic has been |
| 281 | # deleted. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 282 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
| 283 | # used to configure it. An empty `pushConfig` signifies that the subscriber |
| 284 | # will pull and ack messages using API methods. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 285 | "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an |
| 286 | # `Authorization` header in the HTTP request for every pushed message. |
| 287 | # [OpenID Connect |
| 288 | # token](https://developers.google.com/identity/protocols/OpenIDConnect). |
| 289 | "audience": "A String", # Audience to be used when generating OIDC token. The audience claim |
| 290 | # identifies the recipients that the JWT is intended for. The audience |
| 291 | # value is a single case-sensitive string. Having multiple values (array) |
| 292 | # for the audience field is not supported. More info about the OIDC JWT |
| 293 | # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 |
| 294 | # Note: if not specified, the Push endpoint URL will be used. |
| 295 | "serviceAccountEmail": "A String", # [Service account |
| 296 | # email](https://cloud.google.com/iam/docs/service-accounts) |
| 297 | # to be used for generating the OIDC token. The caller (for |
| 298 | # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must |
| 299 | # have the iam.serviceAccounts.actAs permission for the service account. |
| 300 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 301 | "attributes": { # Endpoint configuration attributes. |
| 302 | # |
| 303 | # Every endpoint has a set of API supported attributes that can be used to |
| 304 | # control different aspects of the message delivery. |
| 305 | # |
| 306 | # The currently supported attribute is `x-goog-version`, which you can |
| 307 | # use to change the format of the push message. This attribute |
| 308 | # indicates the version of the data expected by the endpoint. This |
| 309 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 310 | # The endpoint version is based on the version of the Pub/Sub |
| 311 | # API. |
| 312 | # |
| 313 | # If not present during the `CreateSubscription` call, it will default to |
| 314 | # the version of the API used to make such call. If not present during a |
| 315 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 316 | # calls will always return a valid version, even if the subscription was |
| 317 | # created without this attribute. |
| 318 | # |
| 319 | # The possible values for this attribute are: |
| 320 | # |
| 321 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 322 | # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 323 | "a_key": "A String", |
| 324 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 325 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 326 | # For example, a Webhook endpoint might use "https://example.com/push". |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 327 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 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. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 382 | "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message |
| 383 | # before the subscriber should acknowledge the message. After message |
| 384 | # delivery but before the ack deadline expires and before the message is |
| 385 | # acknowledged, it is an outstanding message and will not be delivered |
| 386 | # again during that time (on a best-effort basis). |
| 387 | # |
| 388 | # For pull subscriptions, this value is used as the initial value for the ack |
| 389 | # deadline. To override this value for a given message, call |
| 390 | # `ModifyAckDeadline` with the corresponding `ack_id` if using pull. |
| 391 | # The maximum custom deadline you can specify is 600 seconds (10 minutes). |
| 392 | # |
| 393 | # For push delivery, this value is also used to set the request timeout for |
| 394 | # the call to the push endpoint. |
| 395 | # |
| 396 | # If the subscriber never acknowledges the message, the Pub/Sub |
| 397 | # system will eventually redeliver the message. |
| 398 | # |
| 399 | # If this parameter is 0, a default value of 10 seconds is used. |
| 400 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
| 401 | # The value of this field will be `_deleted-topic_` if the topic has been |
| 402 | # deleted. |
| 403 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
| 404 | # used to configure it. An empty `pushConfig` signifies that the subscriber |
| 405 | # will pull and ack messages using API methods. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 406 | "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an |
| 407 | # `Authorization` header in the HTTP request for every pushed message. |
| 408 | # [OpenID Connect |
| 409 | # token](https://developers.google.com/identity/protocols/OpenIDConnect). |
| 410 | "audience": "A String", # Audience to be used when generating OIDC token. The audience claim |
| 411 | # identifies the recipients that the JWT is intended for. The audience |
| 412 | # value is a single case-sensitive string. Having multiple values (array) |
| 413 | # for the audience field is not supported. More info about the OIDC JWT |
| 414 | # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 |
| 415 | # Note: if not specified, the Push endpoint URL will be used. |
| 416 | "serviceAccountEmail": "A String", # [Service account |
| 417 | # email](https://cloud.google.com/iam/docs/service-accounts) |
| 418 | # to be used for generating the OIDC token. The caller (for |
| 419 | # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must |
| 420 | # have the iam.serviceAccounts.actAs permission for the service account. |
| 421 | }, |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 422 | "attributes": { # Endpoint configuration attributes. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 423 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 424 | # Every endpoint has a set of API supported attributes that can be used to |
| 425 | # control different aspects of the message delivery. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 426 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 427 | # The currently supported attribute is `x-goog-version`, which you can |
| 428 | # use to change the format of the push message. This attribute |
| 429 | # indicates the version of the data expected by the endpoint. This |
| 430 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 431 | # The endpoint version is based on the version of the Pub/Sub |
| 432 | # API. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 433 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 434 | # If not present during the `CreateSubscription` call, it will default to |
| 435 | # the version of the API used to make such call. If not present during a |
| 436 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 437 | # calls will always return a valid version, even if the subscription was |
| 438 | # created without this attribute. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 439 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 440 | # The possible values for this attribute are: |
| 441 | # |
| 442 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 443 | # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. |
| 444 | "a_key": "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 445 | }, |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 446 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 447 | # For example, a Webhook endpoint might use "https://example.com/push". |
| 448 | }, |
| 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"`. |
| 455 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 456 | </div> |
| 457 | |
| 458 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 459 | <code class="details" id="getIamPolicy">getIamPolicy(resource, 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) |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 467 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 468 | Allowed values |
| 469 | 1 - v1 error format |
| 470 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 471 | |
| 472 | Returns: |
| 473 | An object of the form: |
| 474 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 475 | { # Defines an Identity and Access Management (IAM) policy. It is used to |
| 476 | # specify access control policies for Cloud Platform resources. |
| 477 | # |
| 478 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 479 | # A `Policy` consists of a list of `bindings`. A `binding` binds a list of |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 480 | # `members` to a `role`, where the members can be user accounts, Google groups, |
| 481 | # Google domains, and service accounts. A `role` is a named list of permissions |
| 482 | # defined by IAM. |
| 483 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 484 | # **JSON Example** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 485 | # |
| 486 | # { |
| 487 | # "bindings": [ |
| 488 | # { |
| 489 | # "role": "roles/owner", |
| 490 | # "members": [ |
| 491 | # "user:mike@example.com", |
| 492 | # "group:admins@example.com", |
| 493 | # "domain:google.com", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 494 | # "serviceAccount:my-other-app@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 495 | # ] |
| 496 | # }, |
| 497 | # { |
| 498 | # "role": "roles/viewer", |
| 499 | # "members": ["user:sean@example.com"] |
| 500 | # } |
| 501 | # ] |
| 502 | # } |
| 503 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 504 | # **YAML Example** |
| 505 | # |
| 506 | # bindings: |
| 507 | # - members: |
| 508 | # - user:mike@example.com |
| 509 | # - group:admins@example.com |
| 510 | # - domain:google.com |
| 511 | # - serviceAccount:my-other-app@appspot.gserviceaccount.com |
| 512 | # role: roles/owner |
| 513 | # - members: |
| 514 | # - user:sean@example.com |
| 515 | # role: roles/viewer |
| 516 | # |
| 517 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 518 | # For a description of IAM and its features, see the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 519 | # [IAM developer's guide](https://cloud.google.com/iam/docs). |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 520 | "bindings": [ # Associates a list of `members` to a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 521 | # `bindings` with no members will result in an error. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 522 | { # Associates `members` with a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 523 | "role": "A String", # Role that is assigned to `members`. |
| 524 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 525 | "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. |
| 526 | # NOTE: An unsatisfied condition will not allow user access via current |
| 527 | # binding. Different bindings, including their conditions, are examined |
| 528 | # independently. |
| 529 | # |
| 530 | # title: "User account presence" |
| 531 | # description: "Determines whether the request has a user account" |
| 532 | # expression: "size(request.user) > 0" |
| 533 | "description": "A String", # An optional description of the expression. This is a longer text which |
| 534 | # describes the expression, e.g. when hovered over it in a UI. |
| 535 | "expression": "A String", # Textual representation of an expression in |
| 536 | # Common Expression Language syntax. |
| 537 | # |
| 538 | # The application context of the containing message determines which |
| 539 | # well-known feature set of CEL is supported. |
| 540 | "location": "A String", # An optional string indicating the location of the expression for error |
| 541 | # reporting, e.g. a file name and a position in the file. |
| 542 | "title": "A String", # An optional title for the expression, i.e. a short string describing |
| 543 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 544 | # expression. |
| 545 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 546 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 547 | # `members` can have the following values: |
| 548 | # |
| 549 | # * `allUsers`: A special identifier that represents anyone who is |
| 550 | # on the internet; with or without a Google account. |
| 551 | # |
| 552 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 553 | # who is authenticated with a Google account or a service account. |
| 554 | # |
| 555 | # * `user:{emailid}`: An email address that represents a specific Google |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 556 | # account. For example, `alice@gmail.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 557 | # |
| 558 | # |
| 559 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 560 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 561 | # |
| 562 | # * `group:{emailid}`: An email address that represents a Google group. |
| 563 | # For example, `admins@example.com`. |
| 564 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 565 | # |
| 566 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 567 | # users of that domain. For example, `google.com` or `example.com`. |
| 568 | # |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 569 | "A String", |
| 570 | ], |
| 571 | }, |
| 572 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 573 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 574 | # prevent simultaneous updates of a policy from overwriting each other. |
| 575 | # It is strongly suggested that systems make use of the `etag` in the |
| 576 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 577 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 578 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 579 | # ensure that their change will be applied to the same version of the policy. |
| 580 | # |
| 581 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 582 | # policy is overwritten blindly. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 583 | "version": 42, # Deprecated. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 584 | }</pre> |
| 585 | </div> |
| 586 | |
| 587 | <div class="method"> |
| 588 | <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code> |
| 589 | <pre>Lists matching subscriptions. |
| 590 | |
| 591 | Args: |
| 592 | project: string, The name of the cloud project that subscriptions belong to. (required) |
| 593 | pageSize: integer, Maximum number of subscriptions to return. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 594 | pageToken: string, The value returned by the last `ListSubscriptionsResponse`; indicates that |
| 595 | this is a continuation of a prior `ListSubscriptions` call, and that the |
| 596 | system should return the next page of data. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 597 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 598 | Allowed values |
| 599 | 1 - v1 error format |
| 600 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 601 | |
| 602 | Returns: |
| 603 | An object of the form: |
| 604 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 605 | { # Response for the `ListSubscriptions` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 606 | "nextPageToken": "A String", # If not empty, indicates that there may be more subscriptions that match |
| 607 | # the request; this value should be passed in a new |
| 608 | # `ListSubscriptionsRequest` to get more subscriptions. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 609 | "subscriptions": [ # The subscriptions that match the request. |
| 610 | { # A subscription resource. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 611 | "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message |
| 612 | # before the subscriber should acknowledge the message. After message |
| 613 | # delivery but before the ack deadline expires and before the message is |
| 614 | # acknowledged, it is an outstanding message and will not be delivered |
| 615 | # again during that time (on a best-effort basis). |
| 616 | # |
| 617 | # For pull subscriptions, this value is used as the initial value for the ack |
| 618 | # deadline. To override this value for a given message, call |
| 619 | # `ModifyAckDeadline` with the corresponding `ack_id` if using pull. |
| 620 | # The maximum custom deadline you can specify is 600 seconds (10 minutes). |
| 621 | # |
| 622 | # For push delivery, this value is also used to set the request timeout for |
| 623 | # the call to the push endpoint. |
| 624 | # |
| 625 | # If the subscriber never acknowledges the message, the Pub/Sub |
| 626 | # system will eventually redeliver the message. |
| 627 | # |
| 628 | # If this parameter is 0, a default value of 10 seconds is used. |
| 629 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
| 630 | # The value of this field will be `_deleted-topic_` if the topic has been |
| 631 | # deleted. |
| 632 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
| 633 | # used to configure it. An empty `pushConfig` signifies that the subscriber |
| 634 | # will pull and ack messages using API methods. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 635 | "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an |
| 636 | # `Authorization` header in the HTTP request for every pushed message. |
| 637 | # [OpenID Connect |
| 638 | # token](https://developers.google.com/identity/protocols/OpenIDConnect). |
| 639 | "audience": "A String", # Audience to be used when generating OIDC token. The audience claim |
| 640 | # identifies the recipients that the JWT is intended for. The audience |
| 641 | # value is a single case-sensitive string. Having multiple values (array) |
| 642 | # for the audience field is not supported. More info about the OIDC JWT |
| 643 | # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 |
| 644 | # Note: if not specified, the Push endpoint URL will be used. |
| 645 | "serviceAccountEmail": "A String", # [Service account |
| 646 | # email](https://cloud.google.com/iam/docs/service-accounts) |
| 647 | # to be used for generating the OIDC token. The caller (for |
| 648 | # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must |
| 649 | # have the iam.serviceAccounts.actAs permission for the service account. |
| 650 | }, |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 651 | "attributes": { # Endpoint configuration attributes. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 652 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 653 | # Every endpoint has a set of API supported attributes that can be used to |
| 654 | # control different aspects of the message delivery. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 655 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 656 | # The currently supported attribute is `x-goog-version`, which you can |
| 657 | # use to change the format of the push message. This attribute |
| 658 | # indicates the version of the data expected by the endpoint. This |
| 659 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 660 | # The endpoint version is based on the version of the Pub/Sub |
| 661 | # API. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 662 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 663 | # If not present during the `CreateSubscription` call, it will default to |
| 664 | # the version of the API used to make such call. If not present during a |
| 665 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 666 | # calls will always return a valid version, even if the subscription was |
| 667 | # created without this attribute. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 668 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 669 | # The possible values for this attribute are: |
| 670 | # |
| 671 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 672 | # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. |
| 673 | "a_key": "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 674 | }, |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 675 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 676 | # For example, a Webhook endpoint might use "https://example.com/push". |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 677 | }, |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 678 | "name": "A String", # The name of the subscription. It must have the format |
| 679 | # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
| 680 | # start with a letter, and contain only letters (`[A-Za-z]`), numbers |
| 681 | # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), |
| 682 | # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters |
| 683 | # in length, and it must not start with `"goog"`. |
| 684 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 685 | ], |
| 686 | }</pre> |
| 687 | </div> |
| 688 | |
| 689 | <div class="method"> |
| 690 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 691 | <pre>Retrieves the next page of results. |
| 692 | |
| 693 | Args: |
| 694 | previous_request: The request for the previous page. (required) |
| 695 | previous_response: The response from the request for the previous page. (required) |
| 696 | |
| 697 | Returns: |
| 698 | A request object that you can call 'execute()' on to request the next |
| 699 | page. Returns None if there are no more items in the collection. |
| 700 | </pre> |
| 701 | </div> |
| 702 | |
| 703 | <div class="method"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 704 | <code class="details" id="modifyAckDeadline">modifyAckDeadline(subscription, body, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 705 | <pre>Modifies the ack deadline for a specific message. This method is useful |
| 706 | to indicate that more time is needed to process a message by the |
| 707 | subscriber, or to make the message available for redelivery if the |
| 708 | processing was interrupted. Note that this does not modify the |
| 709 | subscription-level `ackDeadlineSeconds` used for subsequent messages. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 710 | |
| 711 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 712 | subscription: string, The name of the subscription. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 713 | body: object, The request body. (required) |
| 714 | The object takes the form of: |
| 715 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 716 | { # Request for the ModifyAckDeadline method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 717 | "ackDeadlineSeconds": 42, # The new ack deadline with respect to the time this request was sent to |
| 718 | # the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new |
| 719 | # ack deadline will expire 10 seconds after the `ModifyAckDeadline` call |
| 720 | # was made. Specifying zero may immediately make the message available for |
| 721 | # another pull request. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 722 | "ackId": "A String", # The acknowledgment ID. Either this or ack_ids must be populated, but not |
| 723 | # both. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 724 | "ackIds": [ # List of acknowledgment IDs. |
| 725 | "A String", |
| 726 | ], |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 727 | } |
| 728 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 729 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 730 | Allowed values |
| 731 | 1 - v1 error format |
| 732 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 733 | |
| 734 | Returns: |
| 735 | An object of the form: |
| 736 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 737 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 738 | # empty messages in your APIs. A typical example is to use it as the request |
| 739 | # or the response type of an API method. For instance: |
| 740 | # |
| 741 | # service Foo { |
| 742 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 743 | # } |
| 744 | # |
| 745 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 746 | }</pre> |
| 747 | </div> |
| 748 | |
| 749 | <div class="method"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 750 | <code class="details" id="modifyPushConfig">modifyPushConfig(subscription, body, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 751 | <pre>Modifies the `PushConfig` for a specified subscription. |
| 752 | |
| 753 | This may be used to change a push subscription to a pull one (signified by |
| 754 | an empty `PushConfig`) or vice versa, or change the endpoint URL and other |
| 755 | attributes of a push subscription. Messages will accumulate for delivery |
| 756 | continuously through the call regardless of changes to the `PushConfig`. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 757 | |
| 758 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 759 | subscription: string, The name of the subscription. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 760 | body: object, The request body. (required) |
| 761 | The object takes the form of: |
| 762 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 763 | { # Request for the ModifyPushConfig method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 764 | "pushConfig": { # Configuration for a push delivery endpoint. # The push configuration for future deliveries. |
| 765 | # |
| 766 | # An empty `pushConfig` indicates that the Pub/Sub system should |
| 767 | # stop pushing messages from the given subscription and allow |
| 768 | # messages to be pulled and acknowledged - effectively pausing |
| 769 | # the subscription if `Pull` is not called. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 770 | "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an |
| 771 | # `Authorization` header in the HTTP request for every pushed message. |
| 772 | # [OpenID Connect |
| 773 | # token](https://developers.google.com/identity/protocols/OpenIDConnect). |
| 774 | "audience": "A String", # Audience to be used when generating OIDC token. The audience claim |
| 775 | # identifies the recipients that the JWT is intended for. The audience |
| 776 | # value is a single case-sensitive string. Having multiple values (array) |
| 777 | # for the audience field is not supported. More info about the OIDC JWT |
| 778 | # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 |
| 779 | # Note: if not specified, the Push endpoint URL will be used. |
| 780 | "serviceAccountEmail": "A String", # [Service account |
| 781 | # email](https://cloud.google.com/iam/docs/service-accounts) |
| 782 | # to be used for generating the OIDC token. The caller (for |
| 783 | # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must |
| 784 | # have the iam.serviceAccounts.actAs permission for the service account. |
| 785 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 786 | "attributes": { # Endpoint configuration attributes. |
| 787 | # |
| 788 | # Every endpoint has a set of API supported attributes that can be used to |
| 789 | # control different aspects of the message delivery. |
| 790 | # |
| 791 | # The currently supported attribute is `x-goog-version`, which you can |
| 792 | # use to change the format of the push message. This attribute |
| 793 | # indicates the version of the data expected by the endpoint. This |
| 794 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 795 | # The endpoint version is based on the version of the Pub/Sub |
| 796 | # API. |
| 797 | # |
| 798 | # If not present during the `CreateSubscription` call, it will default to |
| 799 | # the version of the API used to make such call. If not present during a |
| 800 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 801 | # calls will always return a valid version, even if the subscription was |
| 802 | # created without this attribute. |
| 803 | # |
| 804 | # The possible values for this attribute are: |
| 805 | # |
| 806 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 807 | # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 808 | "a_key": "A String", |
| 809 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 810 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 811 | # For example, a Webhook endpoint might use "https://example.com/push". |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 812 | }, |
| 813 | } |
| 814 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 815 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 816 | Allowed values |
| 817 | 1 - v1 error format |
| 818 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 819 | |
| 820 | Returns: |
| 821 | An object of the form: |
| 822 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 823 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 824 | # empty messages in your APIs. A typical example is to use it as the request |
| 825 | # or the response type of an API method. For instance: |
| 826 | # |
| 827 | # service Foo { |
| 828 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 829 | # } |
| 830 | # |
| 831 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 832 | }</pre> |
| 833 | </div> |
| 834 | |
| 835 | <div class="method"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 836 | <code class="details" id="pull">pull(subscription, body, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 837 | <pre>Pulls messages from the server. Returns an empty list if there are no |
| 838 | messages available in the backlog. The server may return `UNAVAILABLE` if |
| 839 | there are too many concurrent pull requests pending for the given |
| 840 | subscription. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 841 | |
| 842 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 843 | subscription: string, The subscription from which messages should be pulled. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 844 | body: object, The request body. (required) |
| 845 | The object takes the form of: |
| 846 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 847 | { # Request for the `Pull` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 848 | "returnImmediately": True or False, # If this is specified as true the system will respond immediately even if |
| 849 | # it is not able to return a message in the `Pull` response. Otherwise the |
| 850 | # system is allowed to wait until at least one message is available rather |
| 851 | # than returning no messages. The client may cancel the request if it does |
| 852 | # not wish to wait any longer for the response. |
| 853 | "maxMessages": 42, # The maximum number of messages returned for this request. The Pub/Sub |
| 854 | # system may return fewer than the number specified. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 855 | } |
| 856 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 857 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 858 | Allowed values |
| 859 | 1 - v1 error format |
| 860 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 861 | |
| 862 | Returns: |
| 863 | An object of the form: |
| 864 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 865 | { # Response for the `Pull` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 866 | "receivedMessages": [ # Received Pub/Sub messages. The Pub/Sub system will return zero messages if |
| 867 | # there are no more available in the backlog. The Pub/Sub system may return |
| 868 | # fewer than the `maxMessages` requested even if there are more messages |
| 869 | # available in the backlog. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 870 | { # A message and its corresponding acknowledgment ID. |
| 871 | "ackId": "A String", # This ID can be used to acknowledge the received message. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 872 | "message": { # A message data and its attributes. The message payload must not be empty; # The message. |
| 873 | # it must contain either a non-empty data field, or at least one attribute. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 874 | "attributes": { # Optional attributes for this message. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 875 | "a_key": "A String", |
| 876 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 877 | "data": "A String", # The message payload. For JSON requests, the value of this field must be |
| 878 | # [base64-encoded](https://tools.ietf.org/html/rfc4648). |
| 879 | "publishTime": "A String", # The time at which the message was published, populated by the server when |
| 880 | # it receives the `Publish` call. It must not be populated by the |
| 881 | # publisher in a `Publish` call. |
| 882 | "messageId": "A String", # ID of this message, assigned by the server when the message is published. |
| 883 | # Guaranteed to be unique within the topic. This value may be read by a |
| 884 | # subscriber that receives a `PubsubMessage` via a `Pull` call or a push |
| 885 | # delivery. It must not be populated by the publisher in a `Publish` call. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 886 | }, |
| 887 | }, |
| 888 | ], |
| 889 | }</pre> |
| 890 | </div> |
| 891 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 892 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 893 | <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 894 | <pre>Sets the access control policy on the specified resource. Replaces any |
| 895 | existing policy. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 896 | |
| 897 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 898 | resource: string, REQUIRED: The resource for which the policy is being specified. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 899 | See the operation documentation for the appropriate value for this field. (required) |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 900 | body: object, The request body. (required) |
| 901 | The object takes the form of: |
| 902 | |
| 903 | { # Request message for `SetIamPolicy` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 904 | "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to # REQUIRED: The complete policy to be applied to the `resource`. The size of |
| 905 | # the policy is limited to a few 10s of KB. An empty policy is a |
| 906 | # valid policy but certain Cloud Platform services (such as Projects) |
| 907 | # might reject them. |
| 908 | # specify access control policies for Cloud Platform resources. |
| 909 | # |
| 910 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 911 | # A `Policy` consists of a list of `bindings`. A `binding` binds a list of |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 912 | # `members` to a `role`, where the members can be user accounts, Google groups, |
| 913 | # Google domains, and service accounts. A `role` is a named list of permissions |
| 914 | # defined by IAM. |
| 915 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 916 | # **JSON Example** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 917 | # |
| 918 | # { |
| 919 | # "bindings": [ |
| 920 | # { |
| 921 | # "role": "roles/owner", |
| 922 | # "members": [ |
| 923 | # "user:mike@example.com", |
| 924 | # "group:admins@example.com", |
| 925 | # "domain:google.com", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 926 | # "serviceAccount:my-other-app@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 927 | # ] |
| 928 | # }, |
| 929 | # { |
| 930 | # "role": "roles/viewer", |
| 931 | # "members": ["user:sean@example.com"] |
| 932 | # } |
| 933 | # ] |
| 934 | # } |
| 935 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 936 | # **YAML Example** |
| 937 | # |
| 938 | # bindings: |
| 939 | # - members: |
| 940 | # - user:mike@example.com |
| 941 | # - group:admins@example.com |
| 942 | # - domain:google.com |
| 943 | # - serviceAccount:my-other-app@appspot.gserviceaccount.com |
| 944 | # role: roles/owner |
| 945 | # - members: |
| 946 | # - user:sean@example.com |
| 947 | # role: roles/viewer |
| 948 | # |
| 949 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 950 | # For a description of IAM and its features, see the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 951 | # [IAM developer's guide](https://cloud.google.com/iam/docs). |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 952 | "bindings": [ # Associates a list of `members` to a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 953 | # `bindings` with no members will result in an error. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 954 | { # Associates `members` with a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 955 | "role": "A String", # Role that is assigned to `members`. |
| 956 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 957 | "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. |
| 958 | # NOTE: An unsatisfied condition will not allow user access via current |
| 959 | # binding. Different bindings, including their conditions, are examined |
| 960 | # independently. |
| 961 | # |
| 962 | # title: "User account presence" |
| 963 | # description: "Determines whether the request has a user account" |
| 964 | # expression: "size(request.user) > 0" |
| 965 | "description": "A String", # An optional description of the expression. This is a longer text which |
| 966 | # describes the expression, e.g. when hovered over it in a UI. |
| 967 | "expression": "A String", # Textual representation of an expression in |
| 968 | # Common Expression Language syntax. |
| 969 | # |
| 970 | # The application context of the containing message determines which |
| 971 | # well-known feature set of CEL is supported. |
| 972 | "location": "A String", # An optional string indicating the location of the expression for error |
| 973 | # reporting, e.g. a file name and a position in the file. |
| 974 | "title": "A String", # An optional title for the expression, i.e. a short string describing |
| 975 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 976 | # expression. |
| 977 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 978 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 979 | # `members` can have the following values: |
| 980 | # |
| 981 | # * `allUsers`: A special identifier that represents anyone who is |
| 982 | # on the internet; with or without a Google account. |
| 983 | # |
| 984 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 985 | # who is authenticated with a Google account or a service account. |
| 986 | # |
| 987 | # * `user:{emailid}`: An email address that represents a specific Google |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 988 | # account. For example, `alice@gmail.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 989 | # |
| 990 | # |
| 991 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 992 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 993 | # |
| 994 | # * `group:{emailid}`: An email address that represents a Google group. |
| 995 | # For example, `admins@example.com`. |
| 996 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 997 | # |
| 998 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 999 | # users of that domain. For example, `google.com` or `example.com`. |
| 1000 | # |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1001 | "A String", |
| 1002 | ], |
| 1003 | }, |
| 1004 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1005 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 1006 | # prevent simultaneous updates of a policy from overwriting each other. |
| 1007 | # It is strongly suggested that systems make use of the `etag` in the |
| 1008 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 1009 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 1010 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 1011 | # ensure that their change will be applied to the same version of the policy. |
| 1012 | # |
| 1013 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 1014 | # policy is overwritten blindly. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1015 | "version": 42, # Deprecated. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1016 | }, |
| 1017 | } |
| 1018 | |
| 1019 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1020 | Allowed values |
| 1021 | 1 - v1 error format |
| 1022 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1023 | |
| 1024 | Returns: |
| 1025 | An object of the form: |
| 1026 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1027 | { # Defines an Identity and Access Management (IAM) policy. It is used to |
| 1028 | # specify access control policies for Cloud Platform resources. |
| 1029 | # |
| 1030 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1031 | # A `Policy` consists of a list of `bindings`. A `binding` binds a list of |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1032 | # `members` to a `role`, where the members can be user accounts, Google groups, |
| 1033 | # Google domains, and service accounts. A `role` is a named list of permissions |
| 1034 | # defined by IAM. |
| 1035 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1036 | # **JSON Example** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1037 | # |
| 1038 | # { |
| 1039 | # "bindings": [ |
| 1040 | # { |
| 1041 | # "role": "roles/owner", |
| 1042 | # "members": [ |
| 1043 | # "user:mike@example.com", |
| 1044 | # "group:admins@example.com", |
| 1045 | # "domain:google.com", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1046 | # "serviceAccount:my-other-app@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1047 | # ] |
| 1048 | # }, |
| 1049 | # { |
| 1050 | # "role": "roles/viewer", |
| 1051 | # "members": ["user:sean@example.com"] |
| 1052 | # } |
| 1053 | # ] |
| 1054 | # } |
| 1055 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1056 | # **YAML Example** |
| 1057 | # |
| 1058 | # bindings: |
| 1059 | # - members: |
| 1060 | # - user:mike@example.com |
| 1061 | # - group:admins@example.com |
| 1062 | # - domain:google.com |
| 1063 | # - serviceAccount:my-other-app@appspot.gserviceaccount.com |
| 1064 | # role: roles/owner |
| 1065 | # - members: |
| 1066 | # - user:sean@example.com |
| 1067 | # role: roles/viewer |
| 1068 | # |
| 1069 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1070 | # For a description of IAM and its features, see the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1071 | # [IAM developer's guide](https://cloud.google.com/iam/docs). |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1072 | "bindings": [ # Associates a list of `members` to a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1073 | # `bindings` with no members will result in an error. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 1074 | { # Associates `members` with a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1075 | "role": "A String", # Role that is assigned to `members`. |
| 1076 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1077 | "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. |
| 1078 | # NOTE: An unsatisfied condition will not allow user access via current |
| 1079 | # binding. Different bindings, including their conditions, are examined |
| 1080 | # independently. |
| 1081 | # |
| 1082 | # title: "User account presence" |
| 1083 | # description: "Determines whether the request has a user account" |
| 1084 | # expression: "size(request.user) > 0" |
| 1085 | "description": "A String", # An optional description of the expression. This is a longer text which |
| 1086 | # describes the expression, e.g. when hovered over it in a UI. |
| 1087 | "expression": "A String", # Textual representation of an expression in |
| 1088 | # Common Expression Language syntax. |
| 1089 | # |
| 1090 | # The application context of the containing message determines which |
| 1091 | # well-known feature set of CEL is supported. |
| 1092 | "location": "A String", # An optional string indicating the location of the expression for error |
| 1093 | # reporting, e.g. a file name and a position in the file. |
| 1094 | "title": "A String", # An optional title for the expression, i.e. a short string describing |
| 1095 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 1096 | # expression. |
| 1097 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1098 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 1099 | # `members` can have the following values: |
| 1100 | # |
| 1101 | # * `allUsers`: A special identifier that represents anyone who is |
| 1102 | # on the internet; with or without a Google account. |
| 1103 | # |
| 1104 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 1105 | # who is authenticated with a Google account or a service account. |
| 1106 | # |
| 1107 | # * `user:{emailid}`: An email address that represents a specific Google |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1108 | # account. For example, `alice@gmail.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1109 | # |
| 1110 | # |
| 1111 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 1112 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 1113 | # |
| 1114 | # * `group:{emailid}`: An email address that represents a Google group. |
| 1115 | # For example, `admins@example.com`. |
| 1116 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1117 | # |
| 1118 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1119 | # users of that domain. For example, `google.com` or `example.com`. |
| 1120 | # |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1121 | "A String", |
| 1122 | ], |
| 1123 | }, |
| 1124 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1125 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 1126 | # prevent simultaneous updates of a policy from overwriting each other. |
| 1127 | # It is strongly suggested that systems make use of the `etag` in the |
| 1128 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 1129 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 1130 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 1131 | # ensure that their change will be applied to the same version of the policy. |
| 1132 | # |
| 1133 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 1134 | # policy is overwritten blindly. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1135 | "version": 42, # Deprecated. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1136 | }</pre> |
| 1137 | </div> |
| 1138 | |
| 1139 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 1140 | <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1141 | <pre>Returns permissions that a caller has on the specified resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1142 | If the resource does not exist, this will return an empty set of |
| 1143 | permissions, not a NOT_FOUND error. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1144 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1145 | Note: This operation is designed to be used for building permission-aware |
| 1146 | UIs and command-line tools, not for authorization checking. This operation |
| 1147 | may "fail open" without warning. |
| 1148 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1149 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1150 | 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] | 1151 | See the operation documentation for the appropriate value for this field. (required) |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1152 | body: object, The request body. (required) |
| 1153 | The object takes the form of: |
| 1154 | |
| 1155 | { # Request message for `TestIamPermissions` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1156 | "permissions": [ # The set of permissions to check for the `resource`. Permissions with |
| 1157 | # wildcards (such as '*' or 'storage.*') are not allowed. For more |
| 1158 | # information see |
| 1159 | # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1160 | "A String", |
| 1161 | ], |
| 1162 | } |
| 1163 | |
| 1164 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1165 | Allowed values |
| 1166 | 1 - v1 error format |
| 1167 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1168 | |
| 1169 | Returns: |
| 1170 | An object of the form: |
| 1171 | |
| 1172 | { # Response message for `TestIamPermissions` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1173 | "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is |
| 1174 | # allowed. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1175 | "A String", |
| 1176 | ], |
| 1177 | }</pre> |
| 1178 | </div> |
| 1179 | |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1180 | </body></html> |