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