Class v1.SubscriberClient (2.17.0)

The service that an application uses to manipulate subscriptions and to consume messages from a subscription via the Pull method or by establishing a bi-directional stream using the StreamingPull method. v1

Package

@google-cloud/pubsub!

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of SubscriberClient.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

Property Value
TypeDescription
string

auth

auth: gax.GoogleAuth;
Property Value
TypeDescription
gax.GoogleAuth

descriptors

descriptors: Descriptors;
Property Value
TypeDescription
Descriptors

iamClient

iamClient: IamClient;
Property Value
TypeDescription
IamClient

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };
Property Value
TypeDescription
{ [name: string]: Function; }

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };
Property Value
TypeDescription
{ [name: string]: gax.PathTemplate; }

port

static get port(): number;

The port for this API service.

Property Value
TypeDescription
number

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

Property Value
TypeDescription
string[]

servicePath

static get servicePath(): string;

The DNS address for this API service.

Property Value
TypeDescription
string

subscriberStub

subscriberStub?: Promise<{
        [name: string]: Function;
    }>;
Property Value
TypeDescription
Promise<{ [name: string]: Function; }>

warn

warn: (code: string, message: string, warnType?: string) => void;
Property Value
TypeDescription
(code: string, message: string, warnType?: string) => void

Methods

acknowledge(request, options)

acknowledge(request?: protos.google.pubsub.v1.IAcknowledgeRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IAcknowledgeRequest | undefined, {} | undefined]>;
Parameters
NameDescription
request protos.google.pubsub.v1.IAcknowledgeRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IAcknowledgeRequest | undefined, {} | undefined]>

acknowledge(request, options, callback)

acknowledge(request: protos.google.pubsub.v1.IAcknowledgeRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IAcknowledgeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IAcknowledgeRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IAcknowledgeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

acknowledge(request, callback)

acknowledge(request: protos.google.pubsub.v1.IAcknowledgeRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IAcknowledgeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IAcknowledgeRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IAcknowledgeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createSnapshot(request, options)

createSnapshot(request?: protos.google.pubsub.v1.ICreateSnapshotRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.ICreateSnapshotRequest | undefined, {} | undefined]>;
Parameters
NameDescription
request protos.google.pubsub.v1.ICreateSnapshotRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.ICreateSnapshotRequest | undefined, {} | undefined]>

createSnapshot(request, options, callback)

createSnapshot(request: protos.google.pubsub.v1.ICreateSnapshotRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.ICreateSnapshotRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.ICreateSnapshotRequest
options CallOptions
callback Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.ICreateSnapshotRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createSnapshot(request, callback)

createSnapshot(request: protos.google.pubsub.v1.ICreateSnapshotRequest, callback: Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.ICreateSnapshotRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.ICreateSnapshotRequest
callback Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.ICreateSnapshotRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createSubscription(request, options)

createSubscription(request?: protos.google.pubsub.v1.ISubscription, options?: CallOptions): Promise<[protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.ISubscription | undefined, {} | undefined]>;
Parameters
NameDescription
request protos.google.pubsub.v1.ISubscription
options CallOptions
Returns
TypeDescription
Promise<[protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.ISubscription | undefined, {} | undefined]>

createSubscription(request, options, callback)

createSubscription(request: protos.google.pubsub.v1.ISubscription, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.ISubscription | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.ISubscription
options CallOptions
callback Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.ISubscription | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createSubscription(request, callback)

createSubscription(request: protos.google.pubsub.v1.ISubscription, callback: Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.ISubscription | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.ISubscription
callback Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.ISubscription | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteSnapshot(request, options)

deleteSnapshot(request?: protos.google.pubsub.v1.IDeleteSnapshotRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSnapshotRequest | undefined, {} | undefined]>;
Parameters
NameDescription
request protos.google.pubsub.v1.IDeleteSnapshotRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSnapshotRequest | undefined, {} | undefined]>

deleteSnapshot(request, options, callback)

deleteSnapshot(request: protos.google.pubsub.v1.IDeleteSnapshotRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSnapshotRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IDeleteSnapshotRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSnapshotRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteSnapshot(request, callback)

deleteSnapshot(request: protos.google.pubsub.v1.IDeleteSnapshotRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSnapshotRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IDeleteSnapshotRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSnapshotRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteSubscription(request, options)

deleteSubscription(request?: protos.google.pubsub.v1.IDeleteSubscriptionRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSubscriptionRequest | undefined, {} | undefined]>;
Parameters
NameDescription
request protos.google.pubsub.v1.IDeleteSubscriptionRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSubscriptionRequest | undefined, {} | undefined]>

deleteSubscription(request, options, callback)

deleteSubscription(request: protos.google.pubsub.v1.IDeleteSubscriptionRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSubscriptionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IDeleteSubscriptionRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSubscriptionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteSubscription(request, callback)

deleteSubscription(request: protos.google.pubsub.v1.IDeleteSubscriptionRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSubscriptionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IDeleteSubscriptionRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSubscriptionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIamPolicy(request, options, callback)

getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<IamProtos.google.iam.v1.Policy>;

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
NameDescription
request IamProtos.google.iam.v1.GetIamPolicyRequest

The request object that will be sent.

options gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See [gax.CallOptions]https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html for the details.

callback Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing [Policy].

Returns
TypeDescription
Promise<IamProtos.google.iam.v1.Policy>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Policy]. The promise has a method named "cancel" which cancels the ongoing API call.

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

getSnapshot(request, options)

getSnapshot(request?: protos.google.pubsub.v1.IGetSnapshotRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IGetSnapshotRequest | undefined, {} | undefined]>;
Parameters
NameDescription
request protos.google.pubsub.v1.IGetSnapshotRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IGetSnapshotRequest | undefined, {} | undefined]>

getSnapshot(request, options, callback)

getSnapshot(request: protos.google.pubsub.v1.IGetSnapshotRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IGetSnapshotRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IGetSnapshotRequest
options CallOptions
callback Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IGetSnapshotRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getSnapshot(request, callback)

getSnapshot(request: protos.google.pubsub.v1.IGetSnapshotRequest, callback: Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IGetSnapshotRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IGetSnapshotRequest
callback Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IGetSnapshotRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getSubscription(request, options)

getSubscription(request?: protos.google.pubsub.v1.IGetSubscriptionRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IGetSubscriptionRequest | undefined, {} | undefined]>;
Parameters
NameDescription
request protos.google.pubsub.v1.IGetSubscriptionRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IGetSubscriptionRequest | undefined, {} | undefined]>

getSubscription(request, options, callback)

getSubscription(request: protos.google.pubsub.v1.IGetSubscriptionRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IGetSubscriptionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IGetSubscriptionRequest
options CallOptions
callback Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IGetSubscriptionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getSubscription(request, callback)

getSubscription(request: protos.google.pubsub.v1.IGetSubscriptionRequest, callback: Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IGetSubscriptionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IGetSubscriptionRequest
callback Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IGetSubscriptionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listSnapshots(request, options)

listSnapshots(request?: protos.google.pubsub.v1.IListSnapshotsRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ISnapshot[], protos.google.pubsub.v1.IListSnapshotsRequest | null, protos.google.pubsub.v1.IListSnapshotsResponse]>;
Parameters
NameDescription
request protos.google.pubsub.v1.IListSnapshotsRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.pubsub.v1.ISnapshot[], protos.google.pubsub.v1.IListSnapshotsRequest | null, protos.google.pubsub.v1.IListSnapshotsResponse]>

listSnapshots(request, options, callback)

listSnapshots(request: protos.google.pubsub.v1.IListSnapshotsRequest, options: CallOptions, callback: PaginationCallback<protos.google.pubsub.v1.IListSnapshotsRequest, protos.google.pubsub.v1.IListSnapshotsResponse | null | undefined, protos.google.pubsub.v1.ISnapshot>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IListSnapshotsRequest
options CallOptions
callback PaginationCallback<protos.google.pubsub.v1.IListSnapshotsRequest, protos.google.pubsub.v1.IListSnapshotsResponse | null | undefined, protos.google.pubsub.v1.ISnapshot>
Returns
TypeDescription
void

listSnapshots(request, callback)

listSnapshots(request: protos.google.pubsub.v1.IListSnapshotsRequest, callback: PaginationCallback<protos.google.pubsub.v1.IListSnapshotsRequest, protos.google.pubsub.v1.IListSnapshotsResponse | null | undefined, protos.google.pubsub.v1.ISnapshot>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IListSnapshotsRequest
callback PaginationCallback<protos.google.pubsub.v1.IListSnapshotsRequest, protos.google.pubsub.v1.IListSnapshotsResponse | null | undefined, protos.google.pubsub.v1.ISnapshot>
Returns
TypeDescription
void

listSnapshotsAsync(request, options)

listSnapshotsAsync(request?: protos.google.pubsub.v1.IListSnapshotsRequest, options?: CallOptions): AsyncIterable<protos.google.pubsub.v1.ISnapshot>;

Equivalent to listSnapshots, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.pubsub.v1.IListSnapshotsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.pubsub.v1.ISnapshot>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Snapshot]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listSnapshotsStream(request, options)

listSnapshotsStream(request?: protos.google.pubsub.v1.IListSnapshotsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.pubsub.v1.IListSnapshotsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Snapshot] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listSnapshotsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listSubscriptions(request, options)

listSubscriptions(request?: protos.google.pubsub.v1.IListSubscriptionsRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ISubscription[], protos.google.pubsub.v1.IListSubscriptionsRequest | null, protos.google.pubsub.v1.IListSubscriptionsResponse]>;
Parameters
NameDescription
request protos.google.pubsub.v1.IListSubscriptionsRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.pubsub.v1.ISubscription[], protos.google.pubsub.v1.IListSubscriptionsRequest | null, protos.google.pubsub.v1.IListSubscriptionsResponse]>

listSubscriptions(request, options, callback)

listSubscriptions(request: protos.google.pubsub.v1.IListSubscriptionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.pubsub.v1.IListSubscriptionsRequest, protos.google.pubsub.v1.IListSubscriptionsResponse | null | undefined, protos.google.pubsub.v1.ISubscription>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IListSubscriptionsRequest
options CallOptions
callback PaginationCallback<protos.google.pubsub.v1.IListSubscriptionsRequest, protos.google.pubsub.v1.IListSubscriptionsResponse | null | undefined, protos.google.pubsub.v1.ISubscription>
Returns
TypeDescription
void

listSubscriptions(request, callback)

listSubscriptions(request: protos.google.pubsub.v1.IListSubscriptionsRequest, callback: PaginationCallback<protos.google.pubsub.v1.IListSubscriptionsRequest, protos.google.pubsub.v1.IListSubscriptionsResponse | null | undefined, protos.google.pubsub.v1.ISubscription>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IListSubscriptionsRequest
callback PaginationCallback<protos.google.pubsub.v1.IListSubscriptionsRequest, protos.google.pubsub.v1.IListSubscriptionsResponse | null | undefined, protos.google.pubsub.v1.ISubscription>
Returns
TypeDescription
void

listSubscriptionsAsync(request, options)

listSubscriptionsAsync(request?: protos.google.pubsub.v1.IListSubscriptionsRequest, options?: CallOptions): AsyncIterable<protos.google.pubsub.v1.ISubscription>;

Equivalent to listSubscriptions, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.pubsub.v1.IListSubscriptionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.pubsub.v1.ISubscription>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Subscription]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listSubscriptionsStream(request, options)

listSubscriptionsStream(request?: protos.google.pubsub.v1.IListSubscriptionsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.pubsub.v1.IListSubscriptionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Subscription] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listSubscriptionsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectTopicName(projectTopicName)

matchProjectFromProjectTopicName(projectTopicName: string): string | number;

Parse the project from ProjectTopic resource.

Parameter
NameDescription
projectTopicName string

A fully-qualified path representing project_topic resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromSchemaName(schemaName)

matchProjectFromSchemaName(schemaName: string): string | number;

Parse the project from Schema resource.

Parameter
NameDescription
schemaName string

A fully-qualified path representing Schema resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromSnapshotName(snapshotName)

matchProjectFromSnapshotName(snapshotName: string): string | number;

Parse the project from Snapshot resource.

Parameter
NameDescription
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromSubscriptionName(subscriptionName)

matchProjectFromSubscriptionName(subscriptionName: string): string | number;

Parse the project from Subscription resource.

Parameter
NameDescription
subscriptionName string

A fully-qualified path representing Subscription resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchSchemaFromSchemaName(schemaName)

matchSchemaFromSchemaName(schemaName: string): string | number;

Parse the schema from Schema resource.

Parameter
NameDescription
schemaName string

A fully-qualified path representing Schema resource.

Returns
TypeDescription
string | number

{string} A string representing the schema.

matchSnapshotFromSnapshotName(snapshotName)

matchSnapshotFromSnapshotName(snapshotName: string): string | number;

Parse the snapshot from Snapshot resource.

Parameter
NameDescription
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
TypeDescription
string | number

{string} A string representing the snapshot.

matchSubscriptionFromSubscriptionName(subscriptionName)

matchSubscriptionFromSubscriptionName(subscriptionName: string): string | number;

Parse the subscription from Subscription resource.

Parameter
NameDescription
subscriptionName string

A fully-qualified path representing Subscription resource.

Returns
TypeDescription
string | number

{string} A string representing the subscription.

matchTopicFromProjectTopicName(projectTopicName)

matchTopicFromProjectTopicName(projectTopicName: string): string | number;

Parse the topic from ProjectTopic resource.

Parameter
NameDescription
projectTopicName string

A fully-qualified path representing project_topic resource.

Returns
TypeDescription
string | number

{string} A string representing the topic.

modifyAckDeadline(request, options)

modifyAckDeadline(request?: protos.google.pubsub.v1.IModifyAckDeadlineRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyAckDeadlineRequest | undefined, {} | undefined]>;
Parameters
NameDescription
request protos.google.pubsub.v1.IModifyAckDeadlineRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyAckDeadlineRequest | undefined, {} | undefined]>

modifyAckDeadline(request, options, callback)

modifyAckDeadline(request: protos.google.pubsub.v1.IModifyAckDeadlineRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyAckDeadlineRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IModifyAckDeadlineRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyAckDeadlineRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

modifyAckDeadline(request, callback)

modifyAckDeadline(request: protos.google.pubsub.v1.IModifyAckDeadlineRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyAckDeadlineRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IModifyAckDeadlineRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyAckDeadlineRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

modifyPushConfig(request, options)

modifyPushConfig(request?: protos.google.pubsub.v1.IModifyPushConfigRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyPushConfigRequest | undefined, {} | undefined]>;
Parameters
NameDescription
request protos.google.pubsub.v1.IModifyPushConfigRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyPushConfigRequest | undefined, {} | undefined]>

modifyPushConfig(request, options, callback)

modifyPushConfig(request: protos.google.pubsub.v1.IModifyPushConfigRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyPushConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IModifyPushConfigRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyPushConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

modifyPushConfig(request, callback)

modifyPushConfig(request: protos.google.pubsub.v1.IModifyPushConfigRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyPushConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IModifyPushConfigRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyPushConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.

projectTopicPath(project, topic)

projectTopicPath(project: string, topic: string): string;

Return a fully-qualified projectTopic resource name string.

Parameters
NameDescription
project string
topic string
Returns
TypeDescription
string

{string} Resource name string.

pull(request, options)

pull(request?: protos.google.pubsub.v1.IPullRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.IPullResponse, protos.google.pubsub.v1.IPullRequest | undefined, {} | undefined]>;
Parameters
NameDescription
request protos.google.pubsub.v1.IPullRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.pubsub.v1.IPullResponse, protos.google.pubsub.v1.IPullRequest | undefined, {} | undefined]>

pull(request, options, callback)

pull(request: protos.google.pubsub.v1.IPullRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.IPullResponse, protos.google.pubsub.v1.IPullRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IPullRequest
options CallOptions
callback Callback<protos.google.pubsub.v1.IPullResponse, protos.google.pubsub.v1.IPullRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

pull(request, callback)

pull(request: protos.google.pubsub.v1.IPullRequest, callback: Callback<protos.google.pubsub.v1.IPullResponse, protos.google.pubsub.v1.IPullRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IPullRequest
callback Callback<protos.google.pubsub.v1.IPullResponse, protos.google.pubsub.v1.IPullRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

schemaPath(project, schema)

schemaPath(project: string, schema: string): string;

Return a fully-qualified schema resource name string.

Parameters
NameDescription
project string
schema string
Returns
TypeDescription
string

{string} Resource name string.

seek(request, options)

seek(request?: protos.google.pubsub.v1.ISeekRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ISeekResponse, protos.google.pubsub.v1.ISeekRequest | undefined, {} | undefined]>;
Parameters
NameDescription
request protos.google.pubsub.v1.ISeekRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.pubsub.v1.ISeekResponse, protos.google.pubsub.v1.ISeekRequest | undefined, {} | undefined]>

seek(request, options, callback)

seek(request: protos.google.pubsub.v1.ISeekRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISeekResponse, protos.google.pubsub.v1.ISeekRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.ISeekRequest
options CallOptions
callback Callback<protos.google.pubsub.v1.ISeekResponse, protos.google.pubsub.v1.ISeekRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

seek(request, callback)

seek(request: protos.google.pubsub.v1.ISeekRequest, callback: Callback<protos.google.pubsub.v1.ISeekResponse, protos.google.pubsub.v1.ISeekRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.ISeekRequest
callback Callback<protos.google.pubsub.v1.ISeekResponse, protos.google.pubsub.v1.ISeekRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setIamPolicy(request, options, callback)

setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<IamProtos.google.iam.v1.Policy>;

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.

Parameters
NameDescription
request IamProtos.google.iam.v1.SetIamPolicyRequest

The request object that will be sent.

options gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See [gax.CallOptions]https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html for the details.

callback Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing [TestIamPermissionsResponse].

Returns
TypeDescription
Promise<IamProtos.google.iam.v1.Policy>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [TestIamPermissionsResponse]. The promise has a method named "cancel" which cancels the ongoing API call.

snapshotPath(project, snapshot)

snapshotPath(project: string, snapshot: string): string;

Return a fully-qualified snapshot resource name string.

Parameters
NameDescription
project string
snapshot string
Returns
TypeDescription
string

{string} Resource name string.

streamingPull(options)

streamingPull(options?: CallOptions): gax.CancellableStream;

Establishes a stream with the server, which sends messages down to the client. The client streams acknowledgements and ack deadline modifications back to the server. The server will close the stream and return the status on any error. The server may close the stream with status UNAVAILABLE to reassign server-side resources, in which case, the client should re-establish the stream. Flow control can be achieved by configuring the underlying RPC channel.

Parameter
NameDescription
options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
gax.CancellableStream

{Stream} An object stream which is both readable and writable. It accepts objects representing [StreamingPullRequest] for write() method, and will emit objects representing [StreamingPullResponse] on 'data' event asynchronously. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming) for more details and examples.

subscriptionPath(project, subscription)

subscriptionPath(project: string, subscription: string): string;

Return a fully-qualified subscription resource name string.

Parameters
NameDescription
project string
subscription string
Returns
TypeDescription
string

{string} Resource name string.

testIamPermissions(request, options, callback)

testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<IamProtos.google.iam.v1.TestIamPermissionsResponse>;

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.

Parameters
NameDescription
request IamProtos.google.iam.v1.TestIamPermissionsRequest

The request object that will be sent.

options gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See [gax.CallOptions]https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html for the details.

callback Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing [TestIamPermissionsResponse].

Returns
TypeDescription
Promise<IamProtos.google.iam.v1.TestIamPermissionsResponse>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [TestIamPermissionsResponse]. The promise has a method named "cancel" which cancels the ongoing API call.

updateSnapshot(request, options)

updateSnapshot(request?: protos.google.pubsub.v1.IUpdateSnapshotRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IUpdateSnapshotRequest | undefined, {} | undefined]>;
Parameters
NameDescription
request protos.google.pubsub.v1.IUpdateSnapshotRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IUpdateSnapshotRequest | undefined, {} | undefined]>

updateSnapshot(request, options, callback)

updateSnapshot(request: protos.google.pubsub.v1.IUpdateSnapshotRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IUpdateSnapshotRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IUpdateSnapshotRequest
options CallOptions
callback Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IUpdateSnapshotRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateSnapshot(request, callback)

updateSnapshot(request: protos.google.pubsub.v1.IUpdateSnapshotRequest, callback: Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IUpdateSnapshotRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IUpdateSnapshotRequest
callback Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IUpdateSnapshotRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateSubscription(request, options)

updateSubscription(request?: protos.google.pubsub.v1.IUpdateSubscriptionRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IUpdateSubscriptionRequest | undefined, {} | undefined]>;
Parameters
NameDescription
request protos.google.pubsub.v1.IUpdateSubscriptionRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IUpdateSubscriptionRequest | undefined, {} | undefined]>

updateSubscription(request, options, callback)

updateSubscription(request: protos.google.pubsub.v1.IUpdateSubscriptionRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IUpdateSubscriptionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IUpdateSubscriptionRequest
options CallOptions
callback Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IUpdateSubscriptionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateSubscription(request, callback)

updateSubscription(request: protos.google.pubsub.v1.IUpdateSubscriptionRequest, callback: Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IUpdateSubscriptionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.pubsub.v1.IUpdateSubscriptionRequest
callback Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IUpdateSubscriptionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void