Show / Hide Table of Contents

Class SubscriptionsResource

The "subscriptions" collection of methods.

Inheritance
object
SubscriptionsResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Pubsub.v1beta1a
Assembly: Google.Apis.Pubsub.v1beta1a.dll
Syntax
public class SubscriptionsResource

Constructors

SubscriptionsResource(IClientService)

Constructs a new resource.

Declaration
public SubscriptionsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Acknowledge(AcknowledgeRequest)

Acknowledges a particular received message: the Pub/Sub system can remove the given message from the subscription. Acknowledging a message whose Ack deadline has expired may succeed, but the message could have been already redelivered. Acknowledging a message more than once will not result in an error. This is only used for messages received via pull.

Declaration
public virtual SubscriptionsResource.AcknowledgeRequest Acknowledge(AcknowledgeRequest body)
Parameters
Type Name Description
AcknowledgeRequest body

The body of the request.

Returns
Type Description
SubscriptionsResource.AcknowledgeRequest

Create(Subscription)

Creates a subscription on a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.

Declaration
public virtual SubscriptionsResource.CreateRequest Create(Subscription body)
Parameters
Type Name Description
Subscription body

The body of the request.

Returns
Type Description
SubscriptionsResource.CreateRequest

Delete(string)

Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND.

Declaration
public virtual SubscriptionsResource.DeleteRequest Delete(string subscription)
Parameters
Type Name Description
string subscription

The subscription to delete.

Returns
Type Description
SubscriptionsResource.DeleteRequest

Get(string)

Gets the configuration details of a subscription.

Declaration
public virtual SubscriptionsResource.GetRequest Get(string subscription)
Parameters
Type Name Description
string subscription

The name of the subscription to get.

Returns
Type Description
SubscriptionsResource.GetRequest

List()

Lists matching subscriptions.

Declaration
public virtual SubscriptionsResource.ListRequest List()
Returns
Type Description
SubscriptionsResource.ListRequest

ModifyAckDeadline(ModifyAckDeadlineRequest)

Modifies the Ack deadline for a message received from a pull request.

Declaration
public virtual SubscriptionsResource.ModifyAckDeadlineRequest ModifyAckDeadline(ModifyAckDeadlineRequest body)
Parameters
Type Name Description
ModifyAckDeadlineRequest body

The body of the request.

Returns
Type Description
SubscriptionsResource.ModifyAckDeadlineRequest

ModifyPushConfig(ModifyPushConfigRequest)

Modifies the PushConfig for a specified subscription. This method can be used to suspend the flow of messages to an endpoint by clearing the PushConfig field in the request. Messages will be accumulated for delivery even if no push configuration is defined or while the configuration is modified.

Declaration
public virtual SubscriptionsResource.ModifyPushConfigRequest ModifyPushConfig(ModifyPushConfigRequest body)
Parameters
Type Name Description
ModifyPushConfigRequest body

The body of the request.

Returns
Type Description
SubscriptionsResource.ModifyPushConfigRequest

Pull(PullRequest)

Pulls a single message from the server. If return_immediately is true, and no messages are available in the subscription, this method returns FAILED_PRECONDITION. The system is free to return an UNAVAILABLE error if no messages are available in a reasonable amount of time (to reduce system load).

Declaration
public virtual SubscriptionsResource.PullRequest Pull(PullRequest body)
Parameters
Type Name Description
PullRequest body

The body of the request.

Returns
Type Description
SubscriptionsResource.PullRequest

PullBatch(PullBatchRequest)

Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The system is free to return UNAVAILABLE if there are too many pull requests outstanding for the given subscription.

Declaration
public virtual SubscriptionsResource.PullBatchRequest PullBatch(PullBatchRequest body)
Parameters
Type Name Description
PullBatchRequest body

The body of the request.

Returns
Type Description
SubscriptionsResource.PullBatchRequest
In this article
Back to top Generated by DocFX