blob: 828c8981b6fe7e300b7282d9f3f8e038b8693d13 [file] [log] [blame]
Takashi Matsuo06694102015-09-11 13:55:40 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
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.topics.html">topics</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="pubsub_v1.projects.topics.subscriptions.html">subscriptions()</a></code>
79</p>
80<p class="firstline">Returns the subscriptions Resource.</p>
81
82<p class="toc_element">
83 <code><a href="#create">create(name, body, x__xgafv=None)</a></code></p>
84<p class="firstline">Creates the given topic with the given name.</p>
85<p class="toc_element">
86 <code><a href="#delete">delete(topic, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080087<p class="firstline">Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070088<p class="toc_element">
89 <code><a href="#get">get(topic, x__xgafv=None)</a></code></p>
90<p class="firstline">Gets the configuration of a topic.</p>
91<p class="toc_element">
92 <code><a href="#getIamPolicy">getIamPolicy(resource, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080093<p class="firstline">Gets the access control policy for a `resource`. Is empty if the policy or the resource does not exist.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070094<p class="toc_element">
95 <code><a href="#list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
96<p class="firstline">Lists matching topics.</p>
97<p class="toc_element">
98 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
99<p class="firstline">Retrieves the next page of results.</p>
100<p class="toc_element">
101 <code><a href="#publish">publish(topic, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800102<p class="firstline">Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700103<p class="toc_element">
104 <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p>
105<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
106<p class="toc_element">
107 <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p>
108<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
109<h3>Method Details</h3>
110<div class="method">
111 <code class="details" id="create">create(name, body, x__xgafv=None)</code>
112 <pre>Creates the given topic with the given name.
113
114Args:
115 name: string, The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. (required)
116 body: object, The request body. (required)
117 The object takes the form of:
118
119{ # A topic resource.
120 "name": "A String", # The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
121}
122
123 x__xgafv: string, V1 error format.
124
125Returns:
126 An object of the form:
127
128 { # A topic resource.
129 "name": "A String", # The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
130 }</pre>
131</div>
132
133<div class="method">
134 <code class="details" id="delete">delete(topic, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800135 <pre>Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700136
137Args:
138 topic: string, Name of the topic to delete. (required)
139 x__xgafv: string, V1 error format.
140
141Returns:
142 An object of the form:
143
144 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
145 }</pre>
146</div>
147
148<div class="method">
149 <code class="details" id="get">get(topic, x__xgafv=None)</code>
150 <pre>Gets the configuration of a topic.
151
152Args:
153 topic: string, The name of the topic to get. (required)
154 x__xgafv: string, V1 error format.
155
156Returns:
157 An object of the form:
158
159 { # A topic resource.
160 "name": "A String", # The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
161 }</pre>
162</div>
163
164<div class="method">
165 <code class="details" id="getIamPolicy">getIamPolicy(resource, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800166 <pre>Gets the access control policy for a `resource`. Is empty if the policy or the resource does not exist.
Takashi Matsuo06694102015-09-11 13:55:40 -0700167
168Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800169 resource: string, REQUIRED: The resource for which policy is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective GetIamPolicy rpc. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700170 x__xgafv: string, V1 error format.
171
172Returns:
173 An object of the form:
174
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800175 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
176 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
177 { # Associates `members` with a `role`.
178 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required
179 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following formats: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700180 "A String",
181 ],
182 },
183 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800184 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700185 "etag": "A String", # Can be used to perform a read-modify-write.
186 }</pre>
187</div>
188
189<div class="method">
190 <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code>
191 <pre>Lists matching topics.
192
193Args:
194 project: string, The name of the cloud project that topics belong to. (required)
195 pageSize: integer, Maximum number of topics to return.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800196 pageToken: string, The value returned by the last `ListTopicsResponse`; indicates that this is a continuation of a prior `ListTopics` call, and that the system should return the next page of data.
Takashi Matsuo06694102015-09-11 13:55:40 -0700197 x__xgafv: string, V1 error format.
198
199Returns:
200 An object of the form:
201
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800202 { # Response for the `ListTopics` method.
203 "nextPageToken": "A String", # If not empty, indicates that there may be more topics that match the request; this value should be passed in a new `ListTopicsRequest`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700204 "topics": [ # The resulting topics.
205 { # A topic resource.
206 "name": "A String", # The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
207 },
208 ],
209 }</pre>
210</div>
211
212<div class="method">
213 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
214 <pre>Retrieves the next page of results.
215
216Args:
217 previous_request: The request for the previous page. (required)
218 previous_response: The response from the request for the previous page. (required)
219
220Returns:
221 A request object that you can call 'execute()' on to request the next
222 page. Returns None if there are no more items in the collection.
223 </pre>
224</div>
225
226<div class="method">
227 <code class="details" id="publish">publish(topic, body, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800228 <pre>Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute.
Takashi Matsuo06694102015-09-11 13:55:40 -0700229
230Args:
231 topic: string, The messages in the request will be published on this topic. (required)
232 body: object, The request body. (required)
233 The object takes the form of:
234
235{ # Request for the Publish method.
236 "messages": [ # The messages to publish.
237 { # A message data and its attributes. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute.
238 "attributes": { # Optional attributes for this message.
239 "a_key": "A String",
240 },
241 "data": "A String", # The message payload. For JSON requests, the value of this field must be base64-encoded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800242 "publishTime": "A String", # The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.
243 "messageId": "A String", # ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.
Takashi Matsuo06694102015-09-11 13:55:40 -0700244 },
245 ],
246 }
247
248 x__xgafv: string, V1 error format.
249
250Returns:
251 An object of the form:
252
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800253 { # Response for the `Publish` method.
Takashi Matsuo06694102015-09-11 13:55:40 -0700254 "messageIds": [ # The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.
255 "A String",
256 ],
257 }</pre>
258</div>
259
260<div class="method">
261 <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
262 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
263
264Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800265 resource: string, REQUIRED: The resource for which policy is being specified. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective SetIamPolicy rpc. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700266 body: object, The request body. (required)
267 The object takes the form of:
268
269{ # Request message for `SetIamPolicy` method.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800270 "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). # REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
271 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
272 { # Associates `members` with a `role`.
273 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required
274 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following formats: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700275 "A String",
276 ],
277 },
278 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800279 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700280 "etag": "A String", # Can be used to perform a read-modify-write.
281 },
282 }
283
284 x__xgafv: string, V1 error format.
285
286Returns:
287 An object of the form:
288
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800289 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
290 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
291 { # Associates `members` with a `role`.
292 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required
293 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following formats: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700294 "A String",
295 ],
296 },
297 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800298 "version": 42, # Version of the `Policy`. The default version is 0.
Takashi Matsuo06694102015-09-11 13:55:40 -0700299 "etag": "A String", # Can be used to perform a read-modify-write.
300 }</pre>
301</div>
302
303<div class="method">
304 <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
305 <pre>Returns permissions that a caller has on the specified resource.
306
307Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800308 resource: string, REQUIRED: The resource for which policy detail is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective TestIamPermissions rpc. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700309 body: object, The request body. (required)
310 The object takes the form of:
311
312{ # Request message for `TestIamPermissions` method.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800313 "permissions": [ # The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
Takashi Matsuo06694102015-09-11 13:55:40 -0700314 "A String",
315 ],
316 }
317
318 x__xgafv: string, V1 error format.
319
320Returns:
321 An object of the form:
322
323 { # Response message for `TestIamPermissions` method.
324 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
325 "A String",
326 ],
327 }</pre>
328</div>
329
330</body></html>