• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<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">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.snapshots.html">snapshots()</a></code>
79</p>
80<p class="firstline">Returns the snapshots Resource.</p>
81
82<p class="toc_element">
83  <code><a href="pubsub_v1.projects.topics.subscriptions.html">subscriptions()</a></code>
84</p>
85<p class="firstline">Returns the subscriptions Resource.</p>
86
87<p class="toc_element">
88  <code><a href="#create">create(name, body, x__xgafv=None)</a></code></p>
89<p class="firstline">Creates the given topic with the given name. See the</p>
90<p class="toc_element">
91  <code><a href="#delete">delete(topic, x__xgafv=None)</a></code></p>
92<p class="firstline">Deletes the topic with the given name. Returns `NOT_FOUND` if the topic</p>
93<p class="toc_element">
94  <code><a href="#get">get(topic, x__xgafv=None)</a></code></p>
95<p class="firstline">Gets the configuration of a topic.</p>
96<p class="toc_element">
97  <code><a href="#getIamPolicy">getIamPolicy(resource, x__xgafv=None)</a></code></p>
98<p class="firstline">Gets the access control policy for a resource.</p>
99<p class="toc_element">
100  <code><a href="#list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
101<p class="firstline">Lists matching topics.</p>
102<p class="toc_element">
103  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
104<p class="firstline">Retrieves the next page of results.</p>
105<p class="toc_element">
106  <code><a href="#patch">patch(name, body, x__xgafv=None)</a></code></p>
107<p class="firstline">Updates an existing topic. Note that certain properties of a</p>
108<p class="toc_element">
109  <code><a href="#publish">publish(topic, body, x__xgafv=None)</a></code></p>
110<p class="firstline">Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic</p>
111<p class="toc_element">
112  <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p>
113<p class="firstline">Sets the access control policy on the specified resource. Replaces any</p>
114<p class="toc_element">
115  <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p>
116<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
117<h3>Method Details</h3>
118<div class="method">
119    <code class="details" id="create">create(name, body, x__xgafv=None)</code>
120  <pre>Creates the given topic with the given name. See the
121<a href="https://cloud.google.com/pubsub/docs/admin#resource_names">
122resource name rules</a>.
123
124Args:
125  name: string, The name of the topic. It must have the format
126`"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
127and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
128underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
129signs (`%`). It must be between 3 and 255 characters in length, and it
130must not start with `"goog"`. (required)
131  body: object, The request body. (required)
132    The object takes the form of:
133
134{ # A topic resource.
135  "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
136      # managing labels</a>.
137    "a_key": "A String",
138  },
139  "name": "A String", # The name of the topic. It must have the format
140      # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
141      # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
142      # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
143      # signs (`%`). It must be between 3 and 255 characters in length, and it
144      # must not start with `"goog"`.
145  "messageStoragePolicy": { # Policy constraining how messages published to the topic may be stored. It
146      # is determined when the topic is created based on the policy configured at
147      # the project level. It must not be set by the caller in the request to
148      # CreateTopic or to UpdateTopic. This field will be populated in the
149      # responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
150      # response, then no constraints are in effect.
151    "allowedPersistenceRegions": [ # The list of GCP region IDs where messages that are published to the topic
152        # may be persisted in storage. Messages published by publishers running in
153        # non-allowed GCP regions (or running outside of GCP altogether) will be
154        # routed for storage in one of the allowed regions. An empty list indicates a
155        # misconfiguration at the project or organization level, which will result in
156        # all Publish operations failing.
157      "A String",
158    ],
159  },
160  "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access
161      # to messages published on this topic.
162      #
163      # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
164}
165
166  x__xgafv: string, V1 error format.
167    Allowed values
168      1 - v1 error format
169      2 - v2 error format
170
171Returns:
172  An object of the form:
173
174    { # A topic resource.
175    "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
176        # managing labels</a>.
177      "a_key": "A String",
178    },
179    "name": "A String", # The name of the topic. It must have the format
180        # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
181        # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
182        # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
183        # signs (`%`). It must be between 3 and 255 characters in length, and it
184        # must not start with `"goog"`.
185    "messageStoragePolicy": { # Policy constraining how messages published to the topic may be stored. It
186        # is determined when the topic is created based on the policy configured at
187        # the project level. It must not be set by the caller in the request to
188        # CreateTopic or to UpdateTopic. This field will be populated in the
189        # responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
190        # response, then no constraints are in effect.
191      "allowedPersistenceRegions": [ # The list of GCP region IDs where messages that are published to the topic
192          # may be persisted in storage. Messages published by publishers running in
193          # non-allowed GCP regions (or running outside of GCP altogether) will be
194          # routed for storage in one of the allowed regions. An empty list indicates a
195          # misconfiguration at the project or organization level, which will result in
196          # all Publish operations failing.
197        "A String",
198      ],
199    },
200    "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access
201        # to messages published on this topic.
202        #
203        # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
204  }</pre>
205</div>
206
207<div class="method">
208    <code class="details" id="delete">delete(topic, x__xgafv=None)</code>
209  <pre>Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
210does not exist. After a topic is deleted, a new topic may be created with
211the same name; this is an entirely new topic with none of the old
212configuration or subscriptions. Existing subscriptions to this topic are
213not deleted, but their `topic` field is set to `_deleted-topic_`.
214
215Args:
216  topic: string, Name of the topic to delete.
217Format is `projects/{project}/topics/{topic}`. (required)
218  x__xgafv: string, V1 error format.
219    Allowed values
220      1 - v1 error format
221      2 - v2 error format
222
223Returns:
224  An object of the form:
225
226    { # A generic empty message that you can re-use to avoid defining duplicated
227      # empty messages in your APIs. A typical example is to use it as the request
228      # or the response type of an API method. For instance:
229      #
230      #     service Foo {
231      #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
232      #     }
233      #
234      # The JSON representation for `Empty` is empty JSON object `{}`.
235  }</pre>
236</div>
237
238<div class="method">
239    <code class="details" id="get">get(topic, x__xgafv=None)</code>
240  <pre>Gets the configuration of a topic.
241
242Args:
243  topic: string, The name of the topic to get.
244Format is `projects/{project}/topics/{topic}`. (required)
245  x__xgafv: string, V1 error format.
246    Allowed values
247      1 - v1 error format
248      2 - v2 error format
249
250Returns:
251  An object of the form:
252
253    { # A topic resource.
254    "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
255        # managing labels</a>.
256      "a_key": "A String",
257    },
258    "name": "A String", # The name of the topic. It must have the format
259        # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
260        # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
261        # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
262        # signs (`%`). It must be between 3 and 255 characters in length, and it
263        # must not start with `"goog"`.
264    "messageStoragePolicy": { # Policy constraining how messages published to the topic may be stored. It
265        # is determined when the topic is created based on the policy configured at
266        # the project level. It must not be set by the caller in the request to
267        # CreateTopic or to UpdateTopic. This field will be populated in the
268        # responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
269        # response, then no constraints are in effect.
270      "allowedPersistenceRegions": [ # The list of GCP region IDs where messages that are published to the topic
271          # may be persisted in storage. Messages published by publishers running in
272          # non-allowed GCP regions (or running outside of GCP altogether) will be
273          # routed for storage in one of the allowed regions. An empty list indicates a
274          # misconfiguration at the project or organization level, which will result in
275          # all Publish operations failing.
276        "A String",
277      ],
278    },
279    "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access
280        # to messages published on this topic.
281        #
282        # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
283  }</pre>
284</div>
285
286<div class="method">
287    <code class="details" id="getIamPolicy">getIamPolicy(resource, x__xgafv=None)</code>
288  <pre>Gets the access control policy for a resource.
289Returns an empty policy if the resource exists and does not have a policy
290set.
291
292Args:
293  resource: string, REQUIRED: The resource for which the policy is being requested.
294See the operation documentation for the appropriate value for this field. (required)
295  x__xgafv: string, V1 error format.
296    Allowed values
297      1 - v1 error format
298      2 - v2 error format
299
300Returns:
301  An object of the form:
302
303    { # Defines an Identity and Access Management (IAM) policy. It is used to
304      # specify access control policies for Cloud Platform resources.
305      #
306      #
307      # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
308      # `members` to a `role`, where the members can be user accounts, Google groups,
309      # Google domains, and service accounts. A `role` is a named list of permissions
310      # defined by IAM.
311      #
312      # **JSON Example**
313      #
314      #     {
315      #       "bindings": [
316      #         {
317      #           "role": "roles/owner",
318      #           "members": [
319      #             "user:mike@example.com",
320      #             "group:admins@example.com",
321      #             "domain:google.com",
322      #             "serviceAccount:my-other-app@appspot.gserviceaccount.com"
323      #           ]
324      #         },
325      #         {
326      #           "role": "roles/viewer",
327      #           "members": ["user:sean@example.com"]
328      #         }
329      #       ]
330      #     }
331      #
332      # **YAML Example**
333      #
334      #     bindings:
335      #     - members:
336      #       - user:mike@example.com
337      #       - group:admins@example.com
338      #       - domain:google.com
339      #       - serviceAccount:my-other-app@appspot.gserviceaccount.com
340      #       role: roles/owner
341      #     - members:
342      #       - user:sean@example.com
343      #       role: roles/viewer
344      #
345      #
346      # For a description of IAM and its features, see the
347      # [IAM developer's guide](https://cloud.google.com/iam/docs).
348    "bindings": [ # Associates a list of `members` to a `role`.
349        # `bindings` with no members will result in an error.
350      { # Associates `members` with a `role`.
351        "role": "A String", # Role that is assigned to `members`.
352            # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
353        "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
354            # `members` can have the following values:
355            #
356            # * `allUsers`: A special identifier that represents anyone who is
357            #    on the internet; with or without a Google account.
358            #
359            # * `allAuthenticatedUsers`: A special identifier that represents anyone
360            #    who is authenticated with a Google account or a service account.
361            #
362            # * `user:{emailid}`: An email address that represents a specific Google
363            #    account. For example, `alice@gmail.com` .
364            #
365            #
366            # * `serviceAccount:{emailid}`: An email address that represents a service
367            #    account. For example, `my-other-app@appspot.gserviceaccount.com`.
368            #
369            # * `group:{emailid}`: An email address that represents a Google group.
370            #    For example, `admins@example.com`.
371            #
372            #
373            # * `domain:{domain}`: The G Suite domain (primary) that represents all the
374            #    users of that domain. For example, `google.com` or `example.com`.
375            #
376          "A String",
377        ],
378        "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
379            # NOTE: An unsatisfied condition will not allow user access via current
380            # binding. Different bindings, including their conditions, are examined
381            # independently.
382            #
383            #     title: "User account presence"
384            #     description: "Determines whether the request has a user account"
385            #     expression: "size(request.user) > 0"
386          "location": "A String", # An optional string indicating the location of the expression for error
387              # reporting, e.g. a file name and a position in the file.
388          "expression": "A String", # Textual representation of an expression in
389              # Common Expression Language syntax.
390              #
391              # The application context of the containing message determines which
392              # well-known feature set of CEL is supported.
393          "description": "A String", # An optional description of the expression. This is a longer text which
394              # describes the expression, e.g. when hovered over it in a UI.
395          "title": "A String", # An optional title for the expression, i.e. a short string describing
396              # its purpose. This can be used e.g. in UIs which allow to enter the
397              # expression.
398        },
399      },
400    ],
401    "version": 42, # Deprecated.
402    "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
403        # prevent simultaneous updates of a policy from overwriting each other.
404        # It is strongly suggested that systems make use of the `etag` in the
405        # read-modify-write cycle to perform policy updates in order to avoid race
406        # conditions: An `etag` is returned in the response to `getIamPolicy`, and
407        # systems are expected to put that etag in the request to `setIamPolicy` to
408        # ensure that their change will be applied to the same version of the policy.
409        #
410        # If no `etag` is provided in the call to `setIamPolicy`, then the existing
411        # policy is overwritten blindly.
412  }</pre>
413</div>
414
415<div class="method">
416    <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code>
417  <pre>Lists matching topics.
418
419Args:
420  project: string, The name of the project in which to list topics.
421Format is `projects/{project-id}`. (required)
422  pageSize: integer, Maximum number of topics to return.
423  pageToken: string, The value returned by the last `ListTopicsResponse`; indicates that this is
424a continuation of a prior `ListTopics` call, and that the system should
425return the next page of data.
426  x__xgafv: string, V1 error format.
427    Allowed values
428      1 - v1 error format
429      2 - v2 error format
430
431Returns:
432  An object of the form:
433
434    { # Response for the `ListTopics` method.
435    "nextPageToken": "A String", # If not empty, indicates that there may be more topics that match the
436        # request; this value should be passed in a new `ListTopicsRequest`.
437    "topics": [ # The resulting topics.
438      { # A topic resource.
439        "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
440            # managing labels</a>.
441          "a_key": "A String",
442        },
443        "name": "A String", # The name of the topic. It must have the format
444            # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
445            # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
446            # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
447            # signs (`%`). It must be between 3 and 255 characters in length, and it
448            # must not start with `"goog"`.
449        "messageStoragePolicy": { # Policy constraining how messages published to the topic may be stored. It
450            # is determined when the topic is created based on the policy configured at
451            # the project level. It must not be set by the caller in the request to
452            # CreateTopic or to UpdateTopic. This field will be populated in the
453            # responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
454            # response, then no constraints are in effect.
455          "allowedPersistenceRegions": [ # The list of GCP region IDs where messages that are published to the topic
456              # may be persisted in storage. Messages published by publishers running in
457              # non-allowed GCP regions (or running outside of GCP altogether) will be
458              # routed for storage in one of the allowed regions. An empty list indicates a
459              # misconfiguration at the project or organization level, which will result in
460              # all Publish operations failing.
461            "A String",
462          ],
463        },
464        "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access
465            # to messages published on this topic.
466            #
467            # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
468      },
469    ],
470  }</pre>
471</div>
472
473<div class="method">
474    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
475  <pre>Retrieves the next page of results.
476
477Args:
478  previous_request: The request for the previous page. (required)
479  previous_response: The response from the request for the previous page. (required)
480
481Returns:
482  A request object that you can call 'execute()' on to request the next
483  page. Returns None if there are no more items in the collection.
484    </pre>
485</div>
486
487<div class="method">
488    <code class="details" id="patch">patch(name, body, x__xgafv=None)</code>
489  <pre>Updates an existing topic. Note that certain properties of a
490topic are not modifiable.
491
492Args:
493  name: string, The name of the topic. It must have the format
494`"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
495and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
496underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
497signs (`%`). It must be between 3 and 255 characters in length, and it
498must not start with `"goog"`. (required)
499  body: object, The request body. (required)
500    The object takes the form of:
501
502{ # Request for the UpdateTopic method.
503    "topic": { # A topic resource. # The updated topic object.
504      "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
505          # managing labels</a>.
506        "a_key": "A String",
507      },
508      "name": "A String", # The name of the topic. It must have the format
509          # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
510          # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
511          # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
512          # signs (`%`). It must be between 3 and 255 characters in length, and it
513          # must not start with `"goog"`.
514      "messageStoragePolicy": { # Policy constraining how messages published to the topic may be stored. It
515          # is determined when the topic is created based on the policy configured at
516          # the project level. It must not be set by the caller in the request to
517          # CreateTopic or to UpdateTopic. This field will be populated in the
518          # responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
519          # response, then no constraints are in effect.
520        "allowedPersistenceRegions": [ # The list of GCP region IDs where messages that are published to the topic
521            # may be persisted in storage. Messages published by publishers running in
522            # non-allowed GCP regions (or running outside of GCP altogether) will be
523            # routed for storage in one of the allowed regions. An empty list indicates a
524            # misconfiguration at the project or organization level, which will result in
525            # all Publish operations failing.
526          "A String",
527        ],
528      },
529      "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access
530          # to messages published on this topic.
531          #
532          # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
533    },
534    "updateMask": "A String", # Indicates which fields in the provided topic to update. Must be specified
535        # and non-empty. Note that if `update_mask` contains
536        # "message_storage_policy" then the new value will be determined based on the
537        # policy configured at the project or organization level. The
538        # `message_storage_policy` must not be set in the `topic` provided above.
539  }
540
541  x__xgafv: string, V1 error format.
542    Allowed values
543      1 - v1 error format
544      2 - v2 error format
545
546Returns:
547  An object of the form:
548
549    { # A topic resource.
550    "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
551        # managing labels</a>.
552      "a_key": "A String",
553    },
554    "name": "A String", # The name of the topic. It must have the format
555        # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
556        # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
557        # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
558        # signs (`%`). It must be between 3 and 255 characters in length, and it
559        # must not start with `"goog"`.
560    "messageStoragePolicy": { # Policy constraining how messages published to the topic may be stored. It
561        # is determined when the topic is created based on the policy configured at
562        # the project level. It must not be set by the caller in the request to
563        # CreateTopic or to UpdateTopic. This field will be populated in the
564        # responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
565        # response, then no constraints are in effect.
566      "allowedPersistenceRegions": [ # The list of GCP region IDs where messages that are published to the topic
567          # may be persisted in storage. Messages published by publishers running in
568          # non-allowed GCP regions (or running outside of GCP altogether) will be
569          # routed for storage in one of the allowed regions. An empty list indicates a
570          # misconfiguration at the project or organization level, which will result in
571          # all Publish operations failing.
572        "A String",
573      ],
574    },
575    "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access
576        # to messages published on this topic.
577        #
578        # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
579  }</pre>
580</div>
581
582<div class="method">
583    <code class="details" id="publish">publish(topic, body, x__xgafv=None)</code>
584  <pre>Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
585does not exist.
586
587Args:
588  topic: string, The messages in the request will be published on this topic.
589Format is `projects/{project}/topics/{topic}`. (required)
590  body: object, The request body. (required)
591    The object takes the form of:
592
593{ # Request for the Publish method.
594    "messages": [ # The messages to publish.
595      { # A message that is published by publishers and consumed by subscribers. The
596          # message must contain either a non-empty data field or at least one attribute.
597          # Note that client libraries represent this object differently
598          # depending on the language. See the corresponding
599          # <a href="https://cloud.google.com/pubsub/docs/reference/libraries">client
600          # library documentation</a> for more information. See
601          # <a href="https://cloud.google.com/pubsub/quotas">Quotas and limits</a>
602          # for more information about message limits.
603        "attributes": { # Optional attributes for this message.
604          "a_key": "A String",
605        },
606        "data": "A String", # The message data field. If this field is empty, the message must contain
607            # at least one attribute.
608        "publishTime": "A String", # The time at which the message was published, populated by the server when
609            # it receives the `Publish` call. It must not be populated by the
610            # publisher in a `Publish` call.
611        "messageId": "A String", # ID of this message, assigned by the server when the message is published.
612            # Guaranteed to be unique within the topic. This value may be read by a
613            # subscriber that receives a `PubsubMessage` via a `Pull` call or a push
614            # delivery. It must not be populated by the publisher in a `Publish` call.
615      },
616    ],
617  }
618
619  x__xgafv: string, V1 error format.
620    Allowed values
621      1 - v1 error format
622      2 - v2 error format
623
624Returns:
625  An object of the form:
626
627    { # Response for the `Publish` method.
628    "messageIds": [ # The server-assigned ID of each published message, in the same order as
629        # the messages in the request. IDs are guaranteed to be unique within
630        # the topic.
631      "A String",
632    ],
633  }</pre>
634</div>
635
636<div class="method">
637    <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
638  <pre>Sets the access control policy on the specified resource. Replaces any
639existing policy.
640
641Args:
642  resource: string, REQUIRED: The resource for which the policy is being specified.
643See the operation documentation for the appropriate value for this field. (required)
644  body: object, The request body. (required)
645    The object takes the form of:
646
647{ # Request message for `SetIamPolicy` method.
648    "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
649        # the policy is limited to a few 10s of KB. An empty policy is a
650        # valid policy but certain Cloud Platform services (such as Projects)
651        # might reject them.
652        # specify access control policies for Cloud Platform resources.
653        #
654        #
655        # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
656        # `members` to a `role`, where the members can be user accounts, Google groups,
657        # Google domains, and service accounts. A `role` is a named list of permissions
658        # defined by IAM.
659        #
660        # **JSON Example**
661        #
662        #     {
663        #       "bindings": [
664        #         {
665        #           "role": "roles/owner",
666        #           "members": [
667        #             "user:mike@example.com",
668        #             "group:admins@example.com",
669        #             "domain:google.com",
670        #             "serviceAccount:my-other-app@appspot.gserviceaccount.com"
671        #           ]
672        #         },
673        #         {
674        #           "role": "roles/viewer",
675        #           "members": ["user:sean@example.com"]
676        #         }
677        #       ]
678        #     }
679        #
680        # **YAML Example**
681        #
682        #     bindings:
683        #     - members:
684        #       - user:mike@example.com
685        #       - group:admins@example.com
686        #       - domain:google.com
687        #       - serviceAccount:my-other-app@appspot.gserviceaccount.com
688        #       role: roles/owner
689        #     - members:
690        #       - user:sean@example.com
691        #       role: roles/viewer
692        #
693        #
694        # For a description of IAM and its features, see the
695        # [IAM developer's guide](https://cloud.google.com/iam/docs).
696      "bindings": [ # Associates a list of `members` to a `role`.
697          # `bindings` with no members will result in an error.
698        { # Associates `members` with a `role`.
699          "role": "A String", # Role that is assigned to `members`.
700              # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
701          "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
702              # `members` can have the following values:
703              #
704              # * `allUsers`: A special identifier that represents anyone who is
705              #    on the internet; with or without a Google account.
706              #
707              # * `allAuthenticatedUsers`: A special identifier that represents anyone
708              #    who is authenticated with a Google account or a service account.
709              #
710              # * `user:{emailid}`: An email address that represents a specific Google
711              #    account. For example, `alice@gmail.com` .
712              #
713              #
714              # * `serviceAccount:{emailid}`: An email address that represents a service
715              #    account. For example, `my-other-app@appspot.gserviceaccount.com`.
716              #
717              # * `group:{emailid}`: An email address that represents a Google group.
718              #    For example, `admins@example.com`.
719              #
720              #
721              # * `domain:{domain}`: The G Suite domain (primary) that represents all the
722              #    users of that domain. For example, `google.com` or `example.com`.
723              #
724            "A String",
725          ],
726          "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
727              # NOTE: An unsatisfied condition will not allow user access via current
728              # binding. Different bindings, including their conditions, are examined
729              # independently.
730              #
731              #     title: "User account presence"
732              #     description: "Determines whether the request has a user account"
733              #     expression: "size(request.user) > 0"
734            "location": "A String", # An optional string indicating the location of the expression for error
735                # reporting, e.g. a file name and a position in the file.
736            "expression": "A String", # Textual representation of an expression in
737                # Common Expression Language syntax.
738                #
739                # The application context of the containing message determines which
740                # well-known feature set of CEL is supported.
741            "description": "A String", # An optional description of the expression. This is a longer text which
742                # describes the expression, e.g. when hovered over it in a UI.
743            "title": "A String", # An optional title for the expression, i.e. a short string describing
744                # its purpose. This can be used e.g. in UIs which allow to enter the
745                # expression.
746          },
747        },
748      ],
749      "version": 42, # Deprecated.
750      "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
751          # prevent simultaneous updates of a policy from overwriting each other.
752          # It is strongly suggested that systems make use of the `etag` in the
753          # read-modify-write cycle to perform policy updates in order to avoid race
754          # conditions: An `etag` is returned in the response to `getIamPolicy`, and
755          # systems are expected to put that etag in the request to `setIamPolicy` to
756          # ensure that their change will be applied to the same version of the policy.
757          #
758          # If no `etag` is provided in the call to `setIamPolicy`, then the existing
759          # policy is overwritten blindly.
760    },
761  }
762
763  x__xgafv: string, V1 error format.
764    Allowed values
765      1 - v1 error format
766      2 - v2 error format
767
768Returns:
769  An object of the form:
770
771    { # Defines an Identity and Access Management (IAM) policy. It is used to
772      # specify access control policies for Cloud Platform resources.
773      #
774      #
775      # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
776      # `members` to a `role`, where the members can be user accounts, Google groups,
777      # Google domains, and service accounts. A `role` is a named list of permissions
778      # defined by IAM.
779      #
780      # **JSON Example**
781      #
782      #     {
783      #       "bindings": [
784      #         {
785      #           "role": "roles/owner",
786      #           "members": [
787      #             "user:mike@example.com",
788      #             "group:admins@example.com",
789      #             "domain:google.com",
790      #             "serviceAccount:my-other-app@appspot.gserviceaccount.com"
791      #           ]
792      #         },
793      #         {
794      #           "role": "roles/viewer",
795      #           "members": ["user:sean@example.com"]
796      #         }
797      #       ]
798      #     }
799      #
800      # **YAML Example**
801      #
802      #     bindings:
803      #     - members:
804      #       - user:mike@example.com
805      #       - group:admins@example.com
806      #       - domain:google.com
807      #       - serviceAccount:my-other-app@appspot.gserviceaccount.com
808      #       role: roles/owner
809      #     - members:
810      #       - user:sean@example.com
811      #       role: roles/viewer
812      #
813      #
814      # For a description of IAM and its features, see the
815      # [IAM developer's guide](https://cloud.google.com/iam/docs).
816    "bindings": [ # Associates a list of `members` to a `role`.
817        # `bindings` with no members will result in an error.
818      { # Associates `members` with a `role`.
819        "role": "A String", # Role that is assigned to `members`.
820            # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
821        "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
822            # `members` can have the following values:
823            #
824            # * `allUsers`: A special identifier that represents anyone who is
825            #    on the internet; with or without a Google account.
826            #
827            # * `allAuthenticatedUsers`: A special identifier that represents anyone
828            #    who is authenticated with a Google account or a service account.
829            #
830            # * `user:{emailid}`: An email address that represents a specific Google
831            #    account. For example, `alice@gmail.com` .
832            #
833            #
834            # * `serviceAccount:{emailid}`: An email address that represents a service
835            #    account. For example, `my-other-app@appspot.gserviceaccount.com`.
836            #
837            # * `group:{emailid}`: An email address that represents a Google group.
838            #    For example, `admins@example.com`.
839            #
840            #
841            # * `domain:{domain}`: The G Suite domain (primary) that represents all the
842            #    users of that domain. For example, `google.com` or `example.com`.
843            #
844          "A String",
845        ],
846        "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
847            # NOTE: An unsatisfied condition will not allow user access via current
848            # binding. Different bindings, including their conditions, are examined
849            # independently.
850            #
851            #     title: "User account presence"
852            #     description: "Determines whether the request has a user account"
853            #     expression: "size(request.user) > 0"
854          "location": "A String", # An optional string indicating the location of the expression for error
855              # reporting, e.g. a file name and a position in the file.
856          "expression": "A String", # Textual representation of an expression in
857              # Common Expression Language syntax.
858              #
859              # The application context of the containing message determines which
860              # well-known feature set of CEL is supported.
861          "description": "A String", # An optional description of the expression. This is a longer text which
862              # describes the expression, e.g. when hovered over it in a UI.
863          "title": "A String", # An optional title for the expression, i.e. a short string describing
864              # its purpose. This can be used e.g. in UIs which allow to enter the
865              # expression.
866        },
867      },
868    ],
869    "version": 42, # Deprecated.
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.
880  }</pre>
881</div>
882
883<div class="method">
884    <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
885  <pre>Returns permissions that a caller has on the specified resource.
886If the resource does not exist, this will return an empty set of
887permissions, not a NOT_FOUND error.
888
889Note: This operation is designed to be used for building permission-aware
890UIs and command-line tools, not for authorization checking. This operation
891may "fail open" without warning.
892
893Args:
894  resource: string, REQUIRED: The resource for which the policy detail is being requested.
895See the operation documentation for the appropriate value for this field. (required)
896  body: object, The request body. (required)
897    The object takes the form of:
898
899{ # Request message for `TestIamPermissions` method.
900    "permissions": [ # The set of permissions to check for the `resource`. Permissions with
901        # wildcards (such as '*' or 'storage.*') are not allowed. For more
902        # information see
903        # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
904      "A String",
905    ],
906  }
907
908  x__xgafv: string, V1 error format.
909    Allowed values
910      1 - v1 error format
911      2 - v2 error format
912
913Returns:
914  An object of the form:
915
916    { # Response message for `TestIamPermissions` method.
917    "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
918        # allowed.
919      "A String",
920    ],
921  }</pre>
922</div>
923
924</body></html>