public class Pubsub.Projects.Topics
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
Pubsub.Projects.Topics.Create |
class |
Pubsub.Projects.Topics.Delete |
class |
Pubsub.Projects.Topics.Get |
class |
Pubsub.Projects.Topics.GetIamPolicy |
class |
Pubsub.Projects.Topics.List |
class |
Pubsub.Projects.Topics.Publish |
class |
Pubsub.Projects.Topics.SetIamPolicy |
class |
Pubsub.Projects.Topics.Subscriptions
The "subscriptions" collection of methods.
|
class |
Pubsub.Projects.Topics.TestIamPermissions |
| Constructor and Description |
|---|
Pubsub.Projects.Topics() |
| Modifier and Type | Method and Description |
|---|---|
Pubsub.Projects.Topics.Create |
create(java.lang.String name,
Topic content)
Creates the given topic with the given name.
|
Pubsub.Projects.Topics.Delete |
delete(java.lang.String topic)
Deletes the topic with the given name.
|
Pubsub.Projects.Topics.Get |
get(java.lang.String topic)
Gets the configuration of a topic.
|
Pubsub.Projects.Topics.GetIamPolicy |
getIamPolicy(java.lang.String resource)
Gets the access control policy for a `resource`.
|
Pubsub.Projects.Topics.List |
list(java.lang.String project)
Lists matching topics.
|
Pubsub.Projects.Topics.Publish |
publish(java.lang.String topic,
PublishRequest content)
Adds one or more messages to the topic.
|
Pubsub.Projects.Topics.SetIamPolicy |
setIamPolicy(java.lang.String resource,
SetIamPolicyRequest content)
Sets the access control policy on the specified resource.
|
Pubsub.Projects.Topics.Subscriptions |
subscriptions()
An accessor for creating requests from the Subscriptions collection.
|
Pubsub.Projects.Topics.TestIamPermissions |
testIamPermissions(java.lang.String resource,
TestIamPermissionsRequest content)
Returns permissions that a caller has on the specified resource.
|
public Pubsub.Projects.Topics.Create create(java.lang.String name, Topic content) throws java.io.IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - 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"`.content - the Topicjava.io.IOExceptionpublic Pubsub.Projects.Topics.Delete delete(java.lang.String topic) throws java.io.IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.topic - Name of the topic to delete.java.io.IOExceptionpublic Pubsub.Projects.Topics.Get get(java.lang.String topic) throws java.io.IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.topic - The name of the topic to get.java.io.IOExceptionpublic Pubsub.Projects.Topics.GetIamPolicy getIamPolicy(java.lang.String resource) throws java.io.IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.resource - 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.java.io.IOExceptionpublic Pubsub.Projects.Topics.List list(java.lang.String project) throws java.io.IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.project - The name of the cloud project that topics belong to.java.io.IOExceptionpublic Pubsub.Projects.Topics.Publish publish(java.lang.String topic, PublishRequest content) throws java.io.IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.topic - The messages in the request will be published on this topic.content - the PublishRequestjava.io.IOExceptionpublic Pubsub.Projects.Topics.SetIamPolicy setIamPolicy(java.lang.String resource, SetIamPolicyRequest content) throws java.io.IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.resource - 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.content - the SetIamPolicyRequestjava.io.IOExceptionpublic Pubsub.Projects.Topics.TestIamPermissions testIamPermissions(java.lang.String resource, TestIamPermissionsRequest content) throws java.io.IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.resource - 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.content - the TestIamPermissionsRequestjava.io.IOExceptionpublic Pubsub.Projects.Topics.Subscriptions subscriptions()
The typical use is:
Pubsub pubsub = new Pubsub(...);Pubsub.Subscriptions.List request = pubsub.subscriptions().list(parameters ...)