ProjectsTopics
class ProjectsTopics extends Resource (View source)
The "topics" collection of methods.
Typical usage is:
$pubsubService = new Google\Service\Pubsub(...);
$topics = $pubsubService->projects_topics;
Methods
Creates the given topic with the given name. See the [resource name rules] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
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_
. (topics.delete)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (topics.getIamPolicy)
Lists matching topics. (topics.listProjectsTopics)
Updates an existing topic by updating the fields specified in the update mask. Note that certain properties of a topic are not modifiable.
Adds one or more messages to the topic. Returns NOT_FOUND
if the topic does
not exist. (topics.publish)
Sets the access control policy on the specified resource. Replaces any
existing policy. Can return NOT_FOUND
, INVALID_ARGUMENT
, and
PERMISSION_DENIED
errors. (topics.setIamPolicy)
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of permissions, not a
NOT_FOUND
error. Note: This operation is designed to be used for building
permission-aware UIs and command-line tools, not for authorization checking.
Details
Topic
create(string $name, Topic $postBody, array $optParams = [])
Creates the given topic with the given name. See the [resource name rules] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
(topics.create)
PubsubEmpty
delete(string $topic, array $optParams = [])
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_
. (topics.delete)
Topic
get(string $topic, array $optParams = [])
Gets the configuration of a topic. (topics.get)
Policy
getIamPolicy(string $resource, array $optParams = [])
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (topics.getIamPolicy)
ListTopicsResponse
listProjectsTopics(string $project, array $optParams = [])
Lists matching topics. (topics.listProjectsTopics)
Topic
patch(string $name, UpdateTopicRequest $postBody, array $optParams = [])
Updates an existing topic by updating the fields specified in the update mask. Note that certain properties of a topic are not modifiable.
(topics.patch)
PublishResponse
publish(string $topic, PublishRequest $postBody, array $optParams = [])
Adds one or more messages to the topic. Returns NOT_FOUND
if the topic does
not exist. (topics.publish)
Policy
setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])
Sets the access control policy on the specified resource. Replaces any
existing policy. Can return NOT_FOUND
, INVALID_ARGUMENT
, and
PERMISSION_DENIED
errors. (topics.setIamPolicy)
TestIamPermissionsResponse
testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of permissions, not a
NOT_FOUND
error. Note: This operation is designed to be used for building
permission-aware UIs and command-line tools, not for authorization checking.
This operation may "fail open" without warning. (topics.testIamPermissions)