blob: c37f44ec3404bcee197b1fabe6db1499c77e3675 [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>
87<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>
88<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>
93<p class="firstline">Gets the access control policy for a resource. Is empty if the policy or the resource does not exist.</p>
94<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>
102<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>
103<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>
135 <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_`.
136
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>
166 <pre>Gets the access control policy for a resource. Is empty if the policy or the resource does not exist.
167
168Args:
169 resource: string, REQUIRED: The resource for which policy is being requested. Resource is usually specified as a path, such as, projects/{project}. (required)
170 x__xgafv: string, V1 error format.
171
172Returns:
173 An object of the form:
174
175 { # # Overview The `Policy` defines an access control policy language. It is used to define policies that are attached to resources like files, folders, VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding` binds a set of members to a role, where the members include user accounts, user groups, user domains, and service accounts. A 'role' is a named set of permissions, defined by IAM. The definition of a role is outside the policy. A permission check first determines the roles that include the specified permission, and then determines if the principal specified is a member of a binding to at least one of these roles. The membership check is recursive when a group is bound to a role. Policy examples: ``` { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } ```
176 "bindings": [ # It is an error to specify multiple bindings for the same role. It is an error to specify a binding with no members.
177 { # Associates members with roles. See below for allowed formats of members.
178 "role": "A String", # The name of the role to which the members should be bound. Examples: "roles/viewer", "roles/editor", "roles/owner". Required
179 "members": [ # Format of member entries: 1. allUsers Matches any requesting principal (users, service accounts or anonymous). 2. allAuthenticatedUsers Matches any requesting authenticated principal (users or service accounts). 3. user:{emailid} A google user account using an email address. For example alice@gmail.com, joe@example.com 4. serviceAccount:{emailid} An service account email. 5. group:{emailid} A google group with an email address. For example auth-ti-cloud@google.com 6. domain:{domain} A Google Apps domain name. For example google.com, example.com
180 "A String",
181 ],
182 },
183 ],
184 "version": 42, # The policy language version. The version of the policy is represented by the etag. The default version is 0.
185 "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.
196 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.
197 x__xgafv: string, V1 error format.
198
199Returns:
200 An object of the form:
201
202 { # 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.
204 "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>
228 <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.
229
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.
242 "messageId": "A String", # ID of this message assigned by the server at publication time. 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 a publisher in a Publish call.
243 },
244 ],
245 }
246
247 x__xgafv: string, V1 error format.
248
249Returns:
250 An object of the form:
251
252 { # Response for the Publish method.
253 "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.
254 "A String",
255 ],
256 }</pre>
257</div>
258
259<div class="method">
260 <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
261 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
262
263Args:
264 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}. (required)
265 body: object, The request body. (required)
266 The object takes the form of:
267
268{ # Request message for `SetIamPolicy` method.
269 "policy": { # # Overview The `Policy` defines an access control policy language. It is used to define policies that are attached to resources like files, folders, VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding` binds a set of members to a role, where the members include user accounts, user groups, user domains, and service accounts. A 'role' is a named set of permissions, defined by IAM. The definition of a role is outside the policy. A permission check first determines the roles that include the specified permission, and then determines if the principal specified is a member of a binding to at least one of these roles. The membership check is recursive when a group is bound to a role. Policy examples: ``` { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } ``` # 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 in general a valid policy but certain services (like Projects) might reject them.
270 "bindings": [ # It is an error to specify multiple bindings for the same role. It is an error to specify a binding with no members.
271 { # Associates members with roles. See below for allowed formats of members.
272 "role": "A String", # The name of the role to which the members should be bound. Examples: "roles/viewer", "roles/editor", "roles/owner". Required
273 "members": [ # Format of member entries: 1. allUsers Matches any requesting principal (users, service accounts or anonymous). 2. allAuthenticatedUsers Matches any requesting authenticated principal (users or service accounts). 3. user:{emailid} A google user account using an email address. For example alice@gmail.com, joe@example.com 4. serviceAccount:{emailid} An service account email. 5. group:{emailid} A google group with an email address. For example auth-ti-cloud@google.com 6. domain:{domain} A Google Apps domain name. For example google.com, example.com
274 "A String",
275 ],
276 },
277 ],
278 "version": 42, # The policy language version. The version of the policy is represented by the etag. The default version is 0.
279 "etag": "A String", # Can be used to perform a read-modify-write.
280 },
281 }
282
283 x__xgafv: string, V1 error format.
284
285Returns:
286 An object of the form:
287
288 { # # Overview The `Policy` defines an access control policy language. It is used to define policies that are attached to resources like files, folders, VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding` binds a set of members to a role, where the members include user accounts, user groups, user domains, and service accounts. A 'role' is a named set of permissions, defined by IAM. The definition of a role is outside the policy. A permission check first determines the roles that include the specified permission, and then determines if the principal specified is a member of a binding to at least one of these roles. The membership check is recursive when a group is bound to a role. Policy examples: ``` { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } ```
289 "bindings": [ # It is an error to specify multiple bindings for the same role. It is an error to specify a binding with no members.
290 { # Associates members with roles. See below for allowed formats of members.
291 "role": "A String", # The name of the role to which the members should be bound. Examples: "roles/viewer", "roles/editor", "roles/owner". Required
292 "members": [ # Format of member entries: 1. allUsers Matches any requesting principal (users, service accounts or anonymous). 2. allAuthenticatedUsers Matches any requesting authenticated principal (users or service accounts). 3. user:{emailid} A google user account using an email address. For example alice@gmail.com, joe@example.com 4. serviceAccount:{emailid} An service account email. 5. group:{emailid} A google group with an email address. For example auth-ti-cloud@google.com 6. domain:{domain} A Google Apps domain name. For example google.com, example.com
293 "A String",
294 ],
295 },
296 ],
297 "version": 42, # The policy language version. The version of the policy is represented by the etag. The default version is 0.
298 "etag": "A String", # Can be used to perform a read-modify-write.
299 }</pre>
300</div>
301
302<div class="method">
303 <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
304 <pre>Returns permissions that a caller has on the specified resource.
305
306Args:
307 resource: string, REQUIRED: The resource for which policy detail is being requested. Resource is usually specified as a path, such as, projects/{project}. (required)
308 body: object, The request body. (required)
309 The object takes the form of:
310
311{ # Request message for `TestIamPermissions` method.
312 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
313 "A String",
314 ],
315 }
316
317 x__xgafv: string, V1 error format.
318
319Returns:
320 An object of the form:
321
322 { # Response message for `TestIamPermissions` method.
323 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
324 "A String",
325 ],
326 }</pre>
327</div>
328
329</body></html>