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 | |
| 75 | <h1><a href="pubsub_v1beta2.html">Google Cloud Pub/Sub API</a> . <a href="pubsub_v1beta2.projects.html">projects</a> . <a href="pubsub_v1beta2.projects.subscriptions.html">subscriptions</a></h1> |
| 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"> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 81 | <code><a href="#create">create(name=None, body, x__xgafv=None)</a></code></p> |
| 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"> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 90 | <code><a href="#getIamPolicy">getIamPolicy(resource=None, x__xgafv=None)</a></code></p> |
| 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"> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 108 | <code><a href="#setIamPolicy">setIamPolicy(resource=None, body, x__xgafv=None)</a></code></p> |
| 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"> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 111 | <code><a href="#testIamPermissions">testIamPermissions(resource=None, 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"> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 157 | <code class="details" id="create">create(name=None, body, x__xgafv=None)</code> |
| 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 | e833b79 | 2017-03-24 15:06:46 -0700 | [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. |
| 201 | "attributes": { # Endpoint configuration attributes. |
| 202 | # |
| 203 | # Every endpoint has a set of API supported attributes that can be used to |
| 204 | # control different aspects of the message delivery. |
| 205 | # |
| 206 | # The currently supported attribute is `x-goog-version`, which you can |
| 207 | # use to change the format of the push message. This attribute |
| 208 | # indicates the version of the data expected by the endpoint. This |
| 209 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 210 | # The endpoint version is based on the version of the Pub/Sub |
| 211 | # API. |
| 212 | # |
| 213 | # If not present during the `CreateSubscription` call, it will default to |
| 214 | # the version of the API used to make such call. If not present during a |
| 215 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 216 | # calls will always return a valid version, even if the subscription was |
| 217 | # created without this attribute. |
| 218 | # |
| 219 | # The possible values for this attribute are: |
| 220 | # |
| 221 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 222 | # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. |
| 223 | "a_key": "A String", |
| 224 | }, |
| 225 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 226 | # For example, a Webhook endpoint might use "https://example.com/push". |
| 227 | }, |
| 228 | "name": "A String", # The name of the subscription. It must have the format |
| 229 | # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
| 230 | # start with a letter, and contain only letters (`[A-Za-z]`), numbers |
| 231 | # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), |
| 232 | # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters |
| 233 | # in length, and it must not start with `"goog"`. |
| 234 | } |
| 235 | |
| 236 | x__xgafv: string, V1 error format. |
| 237 | Allowed values |
| 238 | 1 - v1 error format |
| 239 | 2 - v2 error format |
| 240 | |
| 241 | Returns: |
| 242 | An object of the form: |
| 243 | |
| 244 | { # A subscription resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 245 | "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message |
| 246 | # before the subscriber should acknowledge the message. After message |
| 247 | # delivery but before the ack deadline expires and before the message is |
| 248 | # acknowledged, it is an outstanding message and will not be delivered |
| 249 | # again during that time (on a best-effort basis). |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 250 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 251 | # For pull subscriptions, this value is used as the initial value for the ack |
| 252 | # deadline. To override this value for a given message, call |
| 253 | # `ModifyAckDeadline` with the corresponding `ack_id` if using pull. |
| 254 | # The maximum custom deadline you can specify is 600 seconds (10 minutes). |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 255 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 256 | # For push delivery, this value is also used to set the request timeout for |
| 257 | # the call to the push endpoint. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 258 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 259 | # If the subscriber never acknowledges the message, the Pub/Sub |
| 260 | # system will eventually redeliver the message. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 261 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 262 | # If this parameter is 0, a default value of 10 seconds is used. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 263 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
| 264 | # The value of this field will be `_deleted-topic_` if the topic has been |
| 265 | # deleted. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 266 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
| 267 | # used to configure it. An empty `pushConfig` signifies that the subscriber |
| 268 | # will pull and ack messages using API methods. |
| 269 | "attributes": { # Endpoint configuration attributes. |
| 270 | # |
| 271 | # Every endpoint has a set of API supported attributes that can be used to |
| 272 | # control different aspects of the message delivery. |
| 273 | # |
| 274 | # The currently supported attribute is `x-goog-version`, which you can |
| 275 | # use to change the format of the push message. This attribute |
| 276 | # indicates the version of the data expected by the endpoint. This |
| 277 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 278 | # The endpoint version is based on the version of the Pub/Sub |
| 279 | # API. |
| 280 | # |
| 281 | # If not present during the `CreateSubscription` call, it will default to |
| 282 | # the version of the API used to make such call. If not present during a |
| 283 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 284 | # calls will always return a valid version, even if the subscription was |
| 285 | # created without this attribute. |
| 286 | # |
| 287 | # The possible values for this attribute are: |
| 288 | # |
| 289 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 290 | # * `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] | 291 | "a_key": "A String", |
| 292 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 293 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 294 | # For example, a Webhook endpoint might use "https://example.com/push". |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 295 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 296 | "name": "A String", # The name of the subscription. It must have the format |
| 297 | # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
| 298 | # start with a letter, and contain only letters (`[A-Za-z]`), numbers |
| 299 | # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), |
| 300 | # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters |
| 301 | # in length, and it must not start with `"goog"`. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 302 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 303 | </div> |
| 304 | |
| 305 | <div class="method"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 306 | <code class="details" id="delete">delete(subscription, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 307 | <pre>Deletes an existing subscription. All pending messages in the subscription |
| 308 | are immediately dropped. Calls to `Pull` after deletion will return |
| 309 | `NOT_FOUND`. After a subscription is deleted, a new one may be created with |
| 310 | the same name, but the new one has no association with the old |
| 311 | subscription, or its topic unless the same topic is specified. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 312 | |
| 313 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 314 | subscription: string, The subscription to delete. (required) |
| 315 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 316 | Allowed values |
| 317 | 1 - v1 error format |
| 318 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 319 | |
| 320 | Returns: |
| 321 | An object of the form: |
| 322 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 323 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 324 | # empty messages in your APIs. A typical example is to use it as the request |
| 325 | # or the response type of an API method. For instance: |
| 326 | # |
| 327 | # service Foo { |
| 328 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 329 | # } |
| 330 | # |
| 331 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 332 | }</pre> |
| 333 | </div> |
| 334 | |
| 335 | <div class="method"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 336 | <code class="details" id="get">get(subscription, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 337 | <pre>Gets the configuration details of a subscription. |
| 338 | |
| 339 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 340 | subscription: string, The name of the subscription to get. (required) |
| 341 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 342 | Allowed values |
| 343 | 1 - v1 error format |
| 344 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 345 | |
| 346 | Returns: |
| 347 | An object of the form: |
| 348 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 349 | { # A subscription resource. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 350 | "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message |
| 351 | # before the subscriber should acknowledge the message. After message |
| 352 | # delivery but before the ack deadline expires and before the message is |
| 353 | # acknowledged, it is an outstanding message and will not be delivered |
| 354 | # again during that time (on a best-effort basis). |
| 355 | # |
| 356 | # For pull subscriptions, this value is used as the initial value for the ack |
| 357 | # deadline. To override this value for a given message, call |
| 358 | # `ModifyAckDeadline` with the corresponding `ack_id` if using pull. |
| 359 | # The maximum custom deadline you can specify is 600 seconds (10 minutes). |
| 360 | # |
| 361 | # For push delivery, this value is also used to set the request timeout for |
| 362 | # the call to the push endpoint. |
| 363 | # |
| 364 | # If the subscriber never acknowledges the message, the Pub/Sub |
| 365 | # system will eventually redeliver the message. |
| 366 | # |
| 367 | # If this parameter is 0, a default value of 10 seconds is used. |
| 368 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
| 369 | # The value of this field will be `_deleted-topic_` if the topic has been |
| 370 | # deleted. |
| 371 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
| 372 | # used to configure it. An empty `pushConfig` signifies that the subscriber |
| 373 | # will pull and ack messages using API methods. |
| 374 | "attributes": { # Endpoint configuration attributes. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 375 | # |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 376 | # Every endpoint has a set of API supported attributes that can be used to |
| 377 | # control different aspects of the message delivery. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 378 | # |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 379 | # The currently supported attribute is `x-goog-version`, which you can |
| 380 | # use to change the format of the push message. This attribute |
| 381 | # indicates the version of the data expected by the endpoint. This |
| 382 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 383 | # The endpoint version is based on the version of the Pub/Sub |
| 384 | # API. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 385 | # |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 386 | # If not present during the `CreateSubscription` call, it will default to |
| 387 | # the version of the API used to make such call. If not present during a |
| 388 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 389 | # calls will always return a valid version, even if the subscription was |
| 390 | # created without this attribute. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 391 | # |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 392 | # The possible values for this attribute are: |
| 393 | # |
| 394 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 395 | # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. |
| 396 | "a_key": "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 397 | }, |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 398 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 399 | # For example, a Webhook endpoint might use "https://example.com/push". |
| 400 | }, |
| 401 | "name": "A String", # The name of the subscription. It must have the format |
| 402 | # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
| 403 | # start with a letter, and contain only letters (`[A-Za-z]`), numbers |
| 404 | # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), |
| 405 | # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters |
| 406 | # in length, and it must not start with `"goog"`. |
| 407 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 408 | </div> |
| 409 | |
| 410 | <div class="method"> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 411 | <code class="details" id="getIamPolicy">getIamPolicy(resource=None, x__xgafv=None)</code> |
| 412 | <pre>Gets the access control policy for a resource. |
| 413 | Returns an empty policy if the resource exists and does not have a policy |
| 414 | set. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 415 | |
| 416 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 417 | resource: string, REQUIRED: The resource for which the policy is being requested. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 418 | See the operation documentation for the appropriate value for this field. (required) |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 419 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 420 | Allowed values |
| 421 | 1 - v1 error format |
| 422 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 423 | |
| 424 | Returns: |
| 425 | An object of the form: |
| 426 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 427 | { # Defines an Identity and Access Management (IAM) policy. It is used to |
| 428 | # specify access control policies for Cloud Platform resources. |
| 429 | # |
| 430 | # |
| 431 | # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of |
| 432 | # `members` to a `role`, where the members can be user accounts, Google groups, |
| 433 | # Google domains, and service accounts. A `role` is a named list of permissions |
| 434 | # defined by IAM. |
| 435 | # |
| 436 | # **Example** |
| 437 | # |
| 438 | # { |
| 439 | # "bindings": [ |
| 440 | # { |
| 441 | # "role": "roles/owner", |
| 442 | # "members": [ |
| 443 | # "user:mike@example.com", |
| 444 | # "group:admins@example.com", |
| 445 | # "domain:google.com", |
| 446 | # "serviceAccount:my-other-app@appspot.gserviceaccount.com", |
| 447 | # ] |
| 448 | # }, |
| 449 | # { |
| 450 | # "role": "roles/viewer", |
| 451 | # "members": ["user:sean@example.com"] |
| 452 | # } |
| 453 | # ] |
| 454 | # } |
| 455 | # |
| 456 | # For a description of IAM and its features, see the |
| 457 | # [IAM developer's guide](https://cloud.google.com/iam). |
| 458 | "bindings": [ # Associates a list of `members` to a `role`. |
| 459 | # Multiple `bindings` must not be specified for the same `role`. |
| 460 | # `bindings` with no members will result in an error. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 461 | { # Associates `members` with a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 462 | "role": "A String", # Role that is assigned to `members`. |
| 463 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 464 | # Required |
| 465 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 466 | # `members` can have the following values: |
| 467 | # |
| 468 | # * `allUsers`: A special identifier that represents anyone who is |
| 469 | # on the internet; with or without a Google account. |
| 470 | # |
| 471 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 472 | # who is authenticated with a Google account or a service account. |
| 473 | # |
| 474 | # * `user:{emailid}`: An email address that represents a specific Google |
| 475 | # account. For example, `alice@gmail.com` or `joe@example.com`. |
| 476 | # |
| 477 | # |
| 478 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 479 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 480 | # |
| 481 | # * `group:{emailid}`: An email address that represents a Google group. |
| 482 | # For example, `admins@example.com`. |
| 483 | # |
| 484 | # * `domain:{domain}`: A Google Apps domain name that represents all the |
| 485 | # users of that domain. For example, `google.com` or `example.com`. |
| 486 | # |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 487 | "A String", |
| 488 | ], |
| 489 | }, |
| 490 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 491 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 492 | # prevent simultaneous updates of a policy from overwriting each other. |
| 493 | # It is strongly suggested that systems make use of the `etag` in the |
| 494 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 495 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 496 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 497 | # ensure that their change will be applied to the same version of the policy. |
| 498 | # |
| 499 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 500 | # policy is overwritten blindly. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 501 | "version": 42, # Version of the `Policy`. The default version is 0. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 502 | }</pre> |
| 503 | </div> |
| 504 | |
| 505 | <div class="method"> |
| 506 | <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code> |
| 507 | <pre>Lists matching subscriptions. |
| 508 | |
| 509 | Args: |
| 510 | project: string, The name of the cloud project that subscriptions belong to. (required) |
| 511 | pageSize: integer, Maximum number of subscriptions to return. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 512 | pageToken: string, The value returned by the last `ListSubscriptionsResponse`; indicates that |
| 513 | this is a continuation of a prior `ListSubscriptions` call, and that the |
| 514 | system should return the next page of data. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 515 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 516 | Allowed values |
| 517 | 1 - v1 error format |
| 518 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 519 | |
| 520 | Returns: |
| 521 | An object of the form: |
| 522 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 523 | { # Response for the `ListSubscriptions` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 524 | "nextPageToken": "A String", # If not empty, indicates that there may be more subscriptions that match |
| 525 | # the request; this value should be passed in a new |
| 526 | # `ListSubscriptionsRequest` to get more subscriptions. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 527 | "subscriptions": [ # The subscriptions that match the request. |
| 528 | { # A subscription resource. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 529 | "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message |
| 530 | # before the subscriber should acknowledge the message. After message |
| 531 | # delivery but before the ack deadline expires and before the message is |
| 532 | # acknowledged, it is an outstanding message and will not be delivered |
| 533 | # again during that time (on a best-effort basis). |
| 534 | # |
| 535 | # For pull subscriptions, this value is used as the initial value for the ack |
| 536 | # deadline. To override this value for a given message, call |
| 537 | # `ModifyAckDeadline` with the corresponding `ack_id` if using pull. |
| 538 | # The maximum custom deadline you can specify is 600 seconds (10 minutes). |
| 539 | # |
| 540 | # For push delivery, this value is also used to set the request timeout for |
| 541 | # the call to the push endpoint. |
| 542 | # |
| 543 | # If the subscriber never acknowledges the message, the Pub/Sub |
| 544 | # system will eventually redeliver the message. |
| 545 | # |
| 546 | # If this parameter is 0, a default value of 10 seconds is used. |
| 547 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
| 548 | # The value of this field will be `_deleted-topic_` if the topic has been |
| 549 | # deleted. |
| 550 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
| 551 | # used to configure it. An empty `pushConfig` signifies that the subscriber |
| 552 | # will pull and ack messages using API methods. |
| 553 | "attributes": { # Endpoint configuration attributes. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 554 | # |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 555 | # Every endpoint has a set of API supported attributes that can be used to |
| 556 | # control different aspects of the message delivery. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 557 | # |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 558 | # The currently supported attribute is `x-goog-version`, which you can |
| 559 | # use to change the format of the push message. This attribute |
| 560 | # indicates the version of the data expected by the endpoint. This |
| 561 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 562 | # The endpoint version is based on the version of the Pub/Sub |
| 563 | # API. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 564 | # |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 565 | # If not present during the `CreateSubscription` call, it will default to |
| 566 | # the version of the API used to make such call. If not present during a |
| 567 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 568 | # calls will always return a valid version, even if the subscription was |
| 569 | # created without this attribute. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 570 | # |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 571 | # The possible values for this attribute are: |
| 572 | # |
| 573 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 574 | # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. |
| 575 | "a_key": "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 576 | }, |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 577 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 578 | # For example, a Webhook endpoint might use "https://example.com/push". |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 579 | }, |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 580 | "name": "A String", # The name of the subscription. It must have the format |
| 581 | # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
| 582 | # start with a letter, and contain only letters (`[A-Za-z]`), numbers |
| 583 | # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), |
| 584 | # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters |
| 585 | # in length, and it must not start with `"goog"`. |
| 586 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 587 | ], |
| 588 | }</pre> |
| 589 | </div> |
| 590 | |
| 591 | <div class="method"> |
| 592 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 593 | <pre>Retrieves the next page of results. |
| 594 | |
| 595 | Args: |
| 596 | previous_request: The request for the previous page. (required) |
| 597 | previous_response: The response from the request for the previous page. (required) |
| 598 | |
| 599 | Returns: |
| 600 | A request object that you can call 'execute()' on to request the next |
| 601 | page. Returns None if there are no more items in the collection. |
| 602 | </pre> |
| 603 | </div> |
| 604 | |
| 605 | <div class="method"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 606 | <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] | 607 | <pre>Modifies the ack deadline for a specific message. This method is useful |
| 608 | to indicate that more time is needed to process a message by the |
| 609 | subscriber, or to make the message available for redelivery if the |
| 610 | processing was interrupted. Note that this does not modify the |
| 611 | subscription-level `ackDeadlineSeconds` used for subsequent messages. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 612 | |
| 613 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 614 | subscription: string, The name of the subscription. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 615 | body: object, The request body. (required) |
| 616 | The object takes the form of: |
| 617 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 618 | { # Request for the ModifyAckDeadline method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 619 | "ackDeadlineSeconds": 42, # The new ack deadline with respect to the time this request was sent to |
| 620 | # the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new |
| 621 | # ack deadline will expire 10 seconds after the `ModifyAckDeadline` call |
| 622 | # was made. Specifying zero may immediately make the message available for |
| 623 | # another pull request. |
| 624 | "ackId": "A String", # The acknowledgment ID. Either this or ack_ids must be populated, but not |
| 625 | # both. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 626 | "ackIds": [ # List of acknowledgment IDs. |
| 627 | "A String", |
| 628 | ], |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 629 | } |
| 630 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 631 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 632 | Allowed values |
| 633 | 1 - v1 error format |
| 634 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 635 | |
| 636 | Returns: |
| 637 | An object of the form: |
| 638 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 639 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 640 | # empty messages in your APIs. A typical example is to use it as the request |
| 641 | # or the response type of an API method. For instance: |
| 642 | # |
| 643 | # service Foo { |
| 644 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 645 | # } |
| 646 | # |
| 647 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 648 | }</pre> |
| 649 | </div> |
| 650 | |
| 651 | <div class="method"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 652 | <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] | 653 | <pre>Modifies the `PushConfig` for a specified subscription. |
| 654 | |
| 655 | This may be used to change a push subscription to a pull one (signified by |
| 656 | an empty `PushConfig`) or vice versa, or change the endpoint URL and other |
| 657 | attributes of a push subscription. Messages will accumulate for delivery |
| 658 | continuously through the call regardless of changes to the `PushConfig`. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 659 | |
| 660 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 661 | subscription: string, The name of the subscription. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 662 | body: object, The request body. (required) |
| 663 | The object takes the form of: |
| 664 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 665 | { # Request for the ModifyPushConfig method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 666 | "pushConfig": { # Configuration for a push delivery endpoint. # The push configuration for future deliveries. |
| 667 | # |
| 668 | # An empty `pushConfig` indicates that the Pub/Sub system should |
| 669 | # stop pushing messages from the given subscription and allow |
| 670 | # messages to be pulled and acknowledged - effectively pausing |
| 671 | # the subscription if `Pull` is not called. |
| 672 | "attributes": { # Endpoint configuration attributes. |
| 673 | # |
| 674 | # Every endpoint has a set of API supported attributes that can be used to |
| 675 | # control different aspects of the message delivery. |
| 676 | # |
| 677 | # The currently supported attribute is `x-goog-version`, which you can |
| 678 | # use to change the format of the push message. This attribute |
| 679 | # indicates the version of the data expected by the endpoint. This |
| 680 | # controls the shape of the envelope (i.e. its fields and metadata). |
| 681 | # The endpoint version is based on the version of the Pub/Sub |
| 682 | # API. |
| 683 | # |
| 684 | # If not present during the `CreateSubscription` call, it will default to |
| 685 | # the version of the API used to make such call. If not present during a |
| 686 | # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` |
| 687 | # calls will always return a valid version, even if the subscription was |
| 688 | # created without this attribute. |
| 689 | # |
| 690 | # The possible values for this attribute are: |
| 691 | # |
| 692 | # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. |
| 693 | # * `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] | 694 | "a_key": "A String", |
| 695 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 696 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 697 | # For example, a Webhook endpoint might use "https://example.com/push". |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 698 | }, |
| 699 | } |
| 700 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 701 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 702 | Allowed values |
| 703 | 1 - v1 error format |
| 704 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 705 | |
| 706 | Returns: |
| 707 | An object of the form: |
| 708 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 709 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 710 | # empty messages in your APIs. A typical example is to use it as the request |
| 711 | # or the response type of an API method. For instance: |
| 712 | # |
| 713 | # service Foo { |
| 714 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 715 | # } |
| 716 | # |
| 717 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 718 | }</pre> |
| 719 | </div> |
| 720 | |
| 721 | <div class="method"> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 722 | <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] | 723 | <pre>Pulls messages from the server. Returns an empty list if there are no |
| 724 | messages available in the backlog. The server may return `UNAVAILABLE` if |
| 725 | there are too many concurrent pull requests pending for the given |
| 726 | subscription. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 727 | |
| 728 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 729 | subscription: string, The subscription from which messages should be pulled. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 730 | body: object, The request body. (required) |
| 731 | The object takes the form of: |
| 732 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 733 | { # Request for the `Pull` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 734 | "returnImmediately": True or False, # If this is specified as true the system will respond immediately even if |
| 735 | # it is not able to return a message in the `Pull` response. Otherwise the |
| 736 | # system is allowed to wait until at least one message is available rather |
| 737 | # than returning no messages. The client may cancel the request if it does |
| 738 | # not wish to wait any longer for the response. |
| 739 | "maxMessages": 42, # The maximum number of messages returned for this request. The Pub/Sub |
| 740 | # system may return fewer than the number specified. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 741 | } |
| 742 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 743 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 744 | Allowed values |
| 745 | 1 - v1 error format |
| 746 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 747 | |
| 748 | Returns: |
| 749 | An object of the form: |
| 750 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 751 | { # Response for the `Pull` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 752 | "receivedMessages": [ # Received Pub/Sub messages. The Pub/Sub system will return zero messages if |
| 753 | # there are no more available in the backlog. The Pub/Sub system may return |
| 754 | # fewer than the `maxMessages` requested even if there are more messages |
| 755 | # available in the backlog. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 756 | { # A message and its corresponding acknowledgment ID. |
| 757 | "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] | 758 | "message": { # A message data and its attributes. The message payload must not be empty; # The message. |
| 759 | # 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] | 760 | "attributes": { # Optional attributes for this message. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 761 | "a_key": "A String", |
| 762 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 763 | "data": "A String", # The message payload. For JSON requests, the value of this field must be |
| 764 | # [base64-encoded](https://tools.ietf.org/html/rfc4648). |
| 765 | "publishTime": "A String", # The time at which the message was published, populated by the server when |
| 766 | # it receives the `Publish` call. It must not be populated by the |
| 767 | # publisher in a `Publish` call. |
| 768 | "messageId": "A String", # ID of this message, assigned by the server when the message is published. |
| 769 | # Guaranteed to be unique within the topic. This value may be read by a |
| 770 | # subscriber that receives a `PubsubMessage` via a `Pull` call or a push |
| 771 | # 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] | 772 | }, |
| 773 | }, |
| 774 | ], |
| 775 | }</pre> |
| 776 | </div> |
| 777 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 778 | <div class="method"> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 779 | <code class="details" id="setIamPolicy">setIamPolicy(resource=None, body, x__xgafv=None)</code> |
| 780 | <pre>Sets the access control policy on the specified resource. Replaces any |
| 781 | existing policy. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 782 | |
| 783 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 784 | resource: string, REQUIRED: The resource for which the policy is being specified. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 785 | See the operation documentation for the appropriate value for this field. (required) |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 786 | body: object, The request body. (required) |
| 787 | The object takes the form of: |
| 788 | |
| 789 | { # Request message for `SetIamPolicy` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 790 | "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 |
| 791 | # the policy is limited to a few 10s of KB. An empty policy is a |
| 792 | # valid policy but certain Cloud Platform services (such as Projects) |
| 793 | # might reject them. |
| 794 | # specify access control policies for Cloud Platform resources. |
| 795 | # |
| 796 | # |
| 797 | # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of |
| 798 | # `members` to a `role`, where the members can be user accounts, Google groups, |
| 799 | # Google domains, and service accounts. A `role` is a named list of permissions |
| 800 | # defined by IAM. |
| 801 | # |
| 802 | # **Example** |
| 803 | # |
| 804 | # { |
| 805 | # "bindings": [ |
| 806 | # { |
| 807 | # "role": "roles/owner", |
| 808 | # "members": [ |
| 809 | # "user:mike@example.com", |
| 810 | # "group:admins@example.com", |
| 811 | # "domain:google.com", |
| 812 | # "serviceAccount:my-other-app@appspot.gserviceaccount.com", |
| 813 | # ] |
| 814 | # }, |
| 815 | # { |
| 816 | # "role": "roles/viewer", |
| 817 | # "members": ["user:sean@example.com"] |
| 818 | # } |
| 819 | # ] |
| 820 | # } |
| 821 | # |
| 822 | # For a description of IAM and its features, see the |
| 823 | # [IAM developer's guide](https://cloud.google.com/iam). |
| 824 | "bindings": [ # Associates a list of `members` to a `role`. |
| 825 | # Multiple `bindings` must not be specified for the same `role`. |
| 826 | # `bindings` with no members will result in an error. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 827 | { # Associates `members` with a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 828 | "role": "A String", # Role that is assigned to `members`. |
| 829 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 830 | # Required |
| 831 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 832 | # `members` can have the following values: |
| 833 | # |
| 834 | # * `allUsers`: A special identifier that represents anyone who is |
| 835 | # on the internet; with or without a Google account. |
| 836 | # |
| 837 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 838 | # who is authenticated with a Google account or a service account. |
| 839 | # |
| 840 | # * `user:{emailid}`: An email address that represents a specific Google |
| 841 | # account. For example, `alice@gmail.com` or `joe@example.com`. |
| 842 | # |
| 843 | # |
| 844 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 845 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 846 | # |
| 847 | # * `group:{emailid}`: An email address that represents a Google group. |
| 848 | # For example, `admins@example.com`. |
| 849 | # |
| 850 | # * `domain:{domain}`: A Google Apps domain name that represents all the |
| 851 | # users of that domain. For example, `google.com` or `example.com`. |
| 852 | # |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 853 | "A String", |
| 854 | ], |
| 855 | }, |
| 856 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 857 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 858 | # prevent simultaneous updates of a policy from overwriting each other. |
| 859 | # It is strongly suggested that systems make use of the `etag` in the |
| 860 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 861 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 862 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 863 | # ensure that their change will be applied to the same version of the policy. |
| 864 | # |
| 865 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 866 | # policy is overwritten blindly. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 867 | "version": 42, # Version of the `Policy`. The default version is 0. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 868 | }, |
| 869 | } |
| 870 | |
| 871 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 872 | Allowed values |
| 873 | 1 - v1 error format |
| 874 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 875 | |
| 876 | Returns: |
| 877 | An object of the form: |
| 878 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 879 | { # Defines an Identity and Access Management (IAM) policy. It is used to |
| 880 | # specify access control policies for Cloud Platform resources. |
| 881 | # |
| 882 | # |
| 883 | # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of |
| 884 | # `members` to a `role`, where the members can be user accounts, Google groups, |
| 885 | # Google domains, and service accounts. A `role` is a named list of permissions |
| 886 | # defined by IAM. |
| 887 | # |
| 888 | # **Example** |
| 889 | # |
| 890 | # { |
| 891 | # "bindings": [ |
| 892 | # { |
| 893 | # "role": "roles/owner", |
| 894 | # "members": [ |
| 895 | # "user:mike@example.com", |
| 896 | # "group:admins@example.com", |
| 897 | # "domain:google.com", |
| 898 | # "serviceAccount:my-other-app@appspot.gserviceaccount.com", |
| 899 | # ] |
| 900 | # }, |
| 901 | # { |
| 902 | # "role": "roles/viewer", |
| 903 | # "members": ["user:sean@example.com"] |
| 904 | # } |
| 905 | # ] |
| 906 | # } |
| 907 | # |
| 908 | # For a description of IAM and its features, see the |
| 909 | # [IAM developer's guide](https://cloud.google.com/iam). |
| 910 | "bindings": [ # Associates a list of `members` to a `role`. |
| 911 | # Multiple `bindings` must not be specified for the same `role`. |
| 912 | # `bindings` with no members will result in an error. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 913 | { # Associates `members` with a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 914 | "role": "A String", # Role that is assigned to `members`. |
| 915 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 916 | # Required |
| 917 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 918 | # `members` can have the following values: |
| 919 | # |
| 920 | # * `allUsers`: A special identifier that represents anyone who is |
| 921 | # on the internet; with or without a Google account. |
| 922 | # |
| 923 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 924 | # who is authenticated with a Google account or a service account. |
| 925 | # |
| 926 | # * `user:{emailid}`: An email address that represents a specific Google |
| 927 | # account. For example, `alice@gmail.com` or `joe@example.com`. |
| 928 | # |
| 929 | # |
| 930 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 931 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 932 | # |
| 933 | # * `group:{emailid}`: An email address that represents a Google group. |
| 934 | # For example, `admins@example.com`. |
| 935 | # |
| 936 | # * `domain:{domain}`: A Google Apps domain name that represents all the |
| 937 | # users of that domain. For example, `google.com` or `example.com`. |
| 938 | # |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 939 | "A String", |
| 940 | ], |
| 941 | }, |
| 942 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 943 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 944 | # prevent simultaneous updates of a policy from overwriting each other. |
| 945 | # It is strongly suggested that systems make use of the `etag` in the |
| 946 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 947 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 948 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 949 | # ensure that their change will be applied to the same version of the policy. |
| 950 | # |
| 951 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 952 | # policy is overwritten blindly. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 953 | "version": 42, # Version of the `Policy`. The default version is 0. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 954 | }</pre> |
| 955 | </div> |
| 956 | |
| 957 | <div class="method"> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 958 | <code class="details" id="testIamPermissions">testIamPermissions(resource=None, body, x__xgafv=None)</code> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 959 | <pre>Returns permissions that a caller has on the specified resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 960 | If the resource does not exist, this will return an empty set of |
| 961 | permissions, not a NOT_FOUND error. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 962 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 963 | Note: This operation is designed to be used for building permission-aware |
| 964 | UIs and command-line tools, not for authorization checking. This operation |
| 965 | may "fail open" without warning. |
| 966 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 967 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 968 | 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^] | 969 | See the operation documentation for the appropriate value for this field. (required) |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 970 | body: object, The request body. (required) |
| 971 | The object takes the form of: |
| 972 | |
| 973 | { # Request message for `TestIamPermissions` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 974 | "permissions": [ # The set of permissions to check for the `resource`. Permissions with |
| 975 | # wildcards (such as '*' or 'storage.*') are not allowed. For more |
| 976 | # information see |
| 977 | # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 978 | "A String", |
| 979 | ], |
| 980 | } |
| 981 | |
| 982 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 983 | Allowed values |
| 984 | 1 - v1 error format |
| 985 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 986 | |
| 987 | Returns: |
| 988 | An object of the form: |
| 989 | |
| 990 | { # Response message for `TestIamPermissions` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 991 | "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is |
| 992 | # allowed. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 993 | "A String", |
| 994 | ], |
| 995 | }</pre> |
| 996 | </div> |
| 997 | |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 998 | </body></html> |