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
Name | Description |
opts |
ClientOptions
|
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Property Value
auth
Property Value
Type | Description |
gax.GoogleAuth | |
descriptors
descriptors: Descriptors;
Property Value
Type | Description |
Descriptors | |
iamClient
Property Value
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
Property Value
Type | Description |
{
[name: string]: Function;
} | |
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
Property Value
Type | Description |
{
[name: string]: gax.PathTemplate;
} | |
port
static get port(): number;
The port for this API service.
Property Value
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
Property Value
servicePath
static get servicePath(): string;
The DNS address for this API service.
Property Value
subscriberStub
subscriberStub?: Promise<{
[name: string]: Function;
}>;
Property Value
Type | Description |
Promise<{
[name: string]: Function;
}> | |
warn
warn: (code: string, message: string, warnType?: string) => void;
Property Value
Type | Description |
(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
Name | Description |
request |
protos.google.pubsub.v1.IAcknowledgeRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.pubsub.v1.IAcknowledgeRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IAcknowledgeRequest | null | undefined, {} | null | undefined>
|
Returns
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
Name | Description |
request |
protos.google.pubsub.v1.IAcknowledgeRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IAcknowledgeRequest | null | undefined, {} | null | undefined>
|
Returns
close()
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns
Type | Description |
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
Name | Description |
request |
protos.google.pubsub.v1.ICreateSnapshotRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
request |
protos.google.pubsub.v1.ICreateSnapshotRequest
|
callback |
Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.ICreateSnapshotRequest | null | undefined, {} | null | undefined>
|
Returns
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
Name | Description |
request |
protos.google.pubsub.v1.ISubscription
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
request |
protos.google.pubsub.v1.ISubscription
|
callback |
Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.ISubscription | null | undefined, {} | null | undefined>
|
Returns
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
Name | Description |
request |
protos.google.pubsub.v1.IDeleteSnapshotRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.pubsub.v1.IDeleteSnapshotRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSnapshotRequest | null | undefined, {} | null | undefined>
|
Returns
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
Name | Description |
request |
protos.google.pubsub.v1.IDeleteSnapshotRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSnapshotRequest | null | undefined, {} | null | undefined>
|
Returns
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
Name | Description |
request |
protos.google.pubsub.v1.IDeleteSubscriptionRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.pubsub.v1.IDeleteSubscriptionRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSubscriptionRequest | null | undefined, {} | null | undefined>
|
Returns
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
Name | Description |
request |
protos.google.pubsub.v1.IDeleteSubscriptionRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSubscriptionRequest | null | undefined, {} | null | undefined>
|
Returns
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
Name | Description |
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
Type | Description |
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
Type | Description |
Promise<string> | |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns
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
Name | Description |
request |
protos.google.pubsub.v1.IGetSnapshotRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
request |
protos.google.pubsub.v1.IGetSnapshotRequest
|
callback |
Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IGetSnapshotRequest | null | undefined, {} | null | undefined>
|
Returns
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
Name | Description |
request |
protos.google.pubsub.v1.IGetSubscriptionRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
request |
protos.google.pubsub.v1.IGetSubscriptionRequest
|
callback |
Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IGetSubscriptionRequest | null | undefined, {} | null | undefined>
|
Returns
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
Type | Description |
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
Name | Description |
request |
protos.google.pubsub.v1.IListSnapshotsRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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
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
Name | Description |
request |
protos.google.pubsub.v1.IListSnapshotsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.pubsub.v1.IListSnapshotsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.pubsub.v1.IListSubscriptionsRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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
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
Name | Description |
request |
protos.google.pubsub.v1.IListSubscriptionsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.pubsub.v1.IListSubscriptionsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
projectName |
string
A fully-qualified path representing Project resource.
|
Returns
Type | Description |
string | number | {string} A string representing the project.
|
matchProjectFromProjectTopicName(projectTopicName)
matchProjectFromProjectTopicName(projectTopicName: string): string | number;
Parse the project from ProjectTopic resource.
Parameter
Name | Description |
projectTopicName |
string
A fully-qualified path representing project_topic resource.
|
Returns
Type | Description |
string | number | {string} A string representing the project.
|
matchProjectFromSchemaName(schemaName)
matchProjectFromSchemaName(schemaName: string): string | number;
Parse the project from Schema resource.
Parameter
Name | Description |
schemaName |
string
A fully-qualified path representing Schema resource.
|
Returns
Type | Description |
string | number | {string} A string representing the project.
|
matchProjectFromSnapshotName(snapshotName)
matchProjectFromSnapshotName(snapshotName: string): string | number;
Parse the project from Snapshot resource.
Parameter
Name | Description |
snapshotName |
string
A fully-qualified path representing Snapshot resource.
|
Returns
Type | Description |
string | number | {string} A string representing the project.
|
matchProjectFromSubscriptionName(subscriptionName)
matchProjectFromSubscriptionName(subscriptionName: string): string | number;
Parse the project from Subscription resource.
Parameter
Name | Description |
subscriptionName |
string
A fully-qualified path representing Subscription resource.
|
Returns
Type | Description |
string | number | {string} A string representing the project.
|
matchSchemaFromSchemaName(schemaName)
matchSchemaFromSchemaName(schemaName: string): string | number;
Parse the schema from Schema resource.
Parameter
Name | Description |
schemaName |
string
A fully-qualified path representing Schema resource.
|
Returns
Type | Description |
string | number | {string} A string representing the schema.
|
matchSnapshotFromSnapshotName(snapshotName)
matchSnapshotFromSnapshotName(snapshotName: string): string | number;
Parse the snapshot from Snapshot resource.
Parameter
Name | Description |
snapshotName |
string
A fully-qualified path representing Snapshot resource.
|
Returns
Type | Description |
string | number | {string} A string representing the snapshot.
|
matchSubscriptionFromSubscriptionName(subscriptionName)
matchSubscriptionFromSubscriptionName(subscriptionName: string): string | number;
Parse the subscription from Subscription resource.
Parameter
Name | Description |
subscriptionName |
string
A fully-qualified path representing Subscription resource.
|
Returns
Type | Description |
string | number | {string} A string representing the subscription.
|
matchTopicFromProjectTopicName(projectTopicName)
matchTopicFromProjectTopicName(projectTopicName: string): string | number;
Parse the topic from ProjectTopic resource.
Parameter
Name | Description |
projectTopicName |
string
A fully-qualified path representing project_topic resource.
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.pubsub.v1.IModifyAckDeadlineRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.pubsub.v1.IModifyAckDeadlineRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyAckDeadlineRequest | null | undefined, {} | null | undefined>
|
Returns
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
Name | Description |
request |
protos.google.pubsub.v1.IModifyAckDeadlineRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyAckDeadlineRequest | null | undefined, {} | null | undefined>
|
Returns
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
Name | Description |
request |
protos.google.pubsub.v1.IModifyPushConfigRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.pubsub.v1.IModifyPushConfigRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyPushConfigRequest | null | undefined, {} | null | undefined>
|
Returns
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
Name | Description |
request |
protos.google.pubsub.v1.IModifyPushConfigRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyPushConfigRequest | null | undefined, {} | null | undefined>
|
Returns
projectPath(project)
projectPath(project: string): string;
Return a fully-qualified project resource name string.
Parameter
Name | Description |
project |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
projectTopicPath(project, topic)
projectTopicPath(project: string, topic: string): string;
Return a fully-qualified projectTopic resource name string.
Parameters
Name | Description |
project |
string
|
topic |
string
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.pubsub.v1.IPullRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
request |
protos.google.pubsub.v1.IPullRequest
|
callback |
Callback<protos.google.pubsub.v1.IPullResponse, protos.google.pubsub.v1.IPullRequest | null | undefined, {} | null | undefined>
|
Returns
schemaPath(project, schema)
schemaPath(project: string, schema: string): string;
Return a fully-qualified schema resource name string.
Parameters
Name | Description |
project |
string
|
schema |
string
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.pubsub.v1.ISeekRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
request |
protos.google.pubsub.v1.ISeekRequest
|
callback |
Callback<protos.google.pubsub.v1.ISeekResponse, protos.google.pubsub.v1.ISeekRequest | null | undefined, {} | null | undefined>
|
Returns
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
Name | Description |
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
Type | Description |
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
Name | Description |
project |
string
|
snapshot |
string
|
Returns
Type | Description |
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
Name | Description |
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
project |
string
|
subscription |
string
|
Returns
Type | Description |
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
Name | Description |
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
Type | Description |
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
Name | Description |
request |
protos.google.pubsub.v1.IUpdateSnapshotRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
request |
protos.google.pubsub.v1.IUpdateSnapshotRequest
|
callback |
Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IUpdateSnapshotRequest | null | undefined, {} | null | undefined>
|
Returns
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
Name | Description |
request |
protos.google.pubsub.v1.IUpdateSubscriptionRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
request |
protos.google.pubsub.v1.IUpdateSubscriptionRequest
|
callback |
Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IUpdateSubscriptionRequest | null | undefined, {} | null | undefined>
|
Returns