Class ProjectsResource.TopicsResource
The "topics" collection of methods.
Inherited Members
Namespace: Google.Apis.Pubsub.v1beta2
Assembly: Google.Apis.Pubsub.v1beta2.dll
Syntax
public class ProjectsResource.TopicsResource
Constructors
TopicsResource(IClientService)
Constructs a new resource.
Declaration
public TopicsResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Properties
Subscriptions
Gets the Subscriptions resource.
Declaration
public virtual ProjectsResource.TopicsResource.SubscriptionsResource Subscriptions { get; }
Property Value
Type | Description |
---|---|
ProjectsResource.TopicsResource.SubscriptionsResource |
Methods
Create(Topic, string)
Creates the given topic with the given name.
Declaration
public virtual ProjectsResource.TopicsResource.CreateRequest Create(Topic body, string name)
Parameters
Type | Name | Description |
---|---|---|
Topic | body | The body of the request. |
string | name | The name of the topic. It must have the format |
Returns
Type | Description |
---|---|
ProjectsResource.TopicsResource.CreateRequest |
Delete(string)
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_
.
Declaration
public virtual ProjectsResource.TopicsResource.DeleteRequest Delete(string topic)
Parameters
Type | Name | Description |
---|---|---|
string | topic | Name of the topic to delete. |
Returns
Type | Description |
---|---|
ProjectsResource.TopicsResource.DeleteRequest |
Get(string)
Gets the configuration of a topic.
Declaration
public virtual ProjectsResource.TopicsResource.GetRequest Get(string topic)
Parameters
Type | Name | Description |
---|---|---|
string | topic | The name of the topic to get. |
Returns
Type | Description |
---|---|
ProjectsResource.TopicsResource.GetRequest |
GetIamPolicy(string)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Declaration
public virtual ProjectsResource.TopicsResource.GetIamPolicyRequest GetIamPolicy(string resource)
Parameters
Type | Name | Description |
---|---|---|
string | resource | REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field. |
Returns
Type | Description |
---|---|
ProjectsResource.TopicsResource.GetIamPolicyRequest |
List(string)
Lists matching topics.
Declaration
public virtual ProjectsResource.TopicsResource.ListRequest List(string project)
Parameters
Type | Name | Description |
---|---|---|
string | project | The name of the cloud project that topics belong to. |
Returns
Type | Description |
---|---|
ProjectsResource.TopicsResource.ListRequest |
Publish(PublishRequest, string)
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.
Declaration
public virtual ProjectsResource.TopicsResource.PublishRequest Publish(PublishRequest body, string topic)
Parameters
Type | Name | Description |
---|---|---|
PublishRequest | body | The body of the request. |
string | topic | The messages in the request will be published on this topic. |
Returns
Type | Description |
---|---|
ProjectsResource.TopicsResource.PublishRequest |
SetIamPolicy(SetIamPolicyRequest, string)
Sets the access control policy on the specified resource. Replaces any existing policy. Can return
NOT_FOUND
, INVALID_ARGUMENT
, and PERMISSION_DENIED
errors.
Declaration
public virtual ProjectsResource.TopicsResource.SetIamPolicyRequest SetIamPolicy(SetIamPolicyRequest body, string resource)
Parameters
Type | Name | Description |
---|---|---|
SetIamPolicyRequest | body | The body of the request. |
string | resource | REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field. |
Returns
Type | Description |
---|---|
ProjectsResource.TopicsResource.SetIamPolicyRequest |
TestIamPermissions(TestIamPermissionsRequest, string)
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.
Declaration
public virtual ProjectsResource.TopicsResource.TestIamPermissionsRequest TestIamPermissions(TestIamPermissionsRequest body, string resource)
Parameters
Type | Name | Description |
---|---|---|
TestIamPermissionsRequest | body | The body of the request. |
string | resource | REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field. |
Returns
Type | Description |
---|---|
ProjectsResource.TopicsResource.TestIamPermissionsRequest |