@google-cloud/pubsub-api 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -0
- package/build/protos/google/pubsub/v1/pubsub.proto +2588 -0
- package/build/protos/google/pubsub/v1/schema.proto +409 -0
- package/build/protos/protos.d.ts +18963 -0
- package/build/protos/protos.js +1 -0
- package/build/protos/protos.json +1 -0
- package/build/src/index.d.ts +17 -0
- package/build/src/index.js +32 -0
- package/build/src/index.js.map +1 -0
- package/build/src/v1/gapic_metadata.json +424 -0
- package/build/src/v1/index.d.ts +3 -0
- package/build/src/v1/index.js +27 -0
- package/build/src/v1/index.js.map +1 -0
- package/build/src/v1/publisher_client.d.ts +835 -0
- package/build/src/v1/publisher_client.js +1260 -0
- package/build/src/v1/publisher_client.js.map +1 -0
- package/build/src/v1/publisher_client_config.json +97 -0
- package/build/src/v1/publisher_proto_list.json +4 -0
- package/build/src/v1/schema_service_client.d.ts +745 -0
- package/build/src/v1/schema_service_client.js +1176 -0
- package/build/src/v1/schema_service_client.js.map +1 -0
- package/build/src/v1/schema_service_client_config.json +79 -0
- package/build/src/v1/schema_service_proto_list.json +4 -0
- package/build/src/v1/subscriber_client.d.ts +1159 -0
- package/build/src/v1/subscriber_client.js +1491 -0
- package/build/src/v1/subscriber_client.js.map +1 -0
- package/build/src/v1/subscriber_client_config.json +136 -0
- package/build/src/v1/subscriber_proto_list.json +4 -0
- package/package.json +66 -0
|
@@ -0,0 +1,1159 @@
|
|
|
1
|
+
import type * as gax from 'google-gax';
|
|
2
|
+
import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, IamClient, IamProtos } from 'google-gax';
|
|
3
|
+
import { Transform } from 'stream';
|
|
4
|
+
import * as protos from '../../protos/protos';
|
|
5
|
+
/**
|
|
6
|
+
* The service that an application uses to manipulate subscriptions and to
|
|
7
|
+
* consume messages from a subscription via the `Pull` method or by
|
|
8
|
+
* establishing a bi-directional stream using the `StreamingPull` method.
|
|
9
|
+
* @class
|
|
10
|
+
* @memberof v1
|
|
11
|
+
*/
|
|
12
|
+
export declare class SubscriberClient {
|
|
13
|
+
private _terminated;
|
|
14
|
+
private _opts;
|
|
15
|
+
private _providedCustomServicePath;
|
|
16
|
+
private _gaxModule;
|
|
17
|
+
private _gaxGrpc;
|
|
18
|
+
private _protos;
|
|
19
|
+
private _defaults;
|
|
20
|
+
private _universeDomain;
|
|
21
|
+
private _servicePath;
|
|
22
|
+
private _log;
|
|
23
|
+
auth: gax.GoogleAuth;
|
|
24
|
+
descriptors: Descriptors;
|
|
25
|
+
warn: (code: string, message: string, warnType?: string) => void;
|
|
26
|
+
innerApiCalls: {
|
|
27
|
+
[name: string]: Function;
|
|
28
|
+
};
|
|
29
|
+
iamClient: IamClient;
|
|
30
|
+
pathTemplates: {
|
|
31
|
+
[name: string]: gax.PathTemplate;
|
|
32
|
+
};
|
|
33
|
+
subscriberStub?: Promise<{
|
|
34
|
+
[name: string]: Function;
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Construct an instance of SubscriberClient.
|
|
38
|
+
*
|
|
39
|
+
* @param {object} [options] - The configuration object.
|
|
40
|
+
* The options accepted by the constructor are described in detail
|
|
41
|
+
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
|
|
42
|
+
* The common options are:
|
|
43
|
+
* @param {object} [options.credentials] - Credentials object.
|
|
44
|
+
* @param {string} [options.credentials.client_email]
|
|
45
|
+
* @param {string} [options.credentials.private_key]
|
|
46
|
+
* @param {string} [options.email] - Account email address. Required when
|
|
47
|
+
* using a .pem or .p12 keyFilename.
|
|
48
|
+
* @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
|
|
49
|
+
* .p12 key downloaded from the Google Developers Console. If you provide
|
|
50
|
+
* a path to a JSON file, the projectId option below is not necessary.
|
|
51
|
+
* NOTE: .pem and .p12 require you to specify options.email as well.
|
|
52
|
+
* @param {number} [options.port] - The port on which to connect to
|
|
53
|
+
* the remote host.
|
|
54
|
+
* @param {string} [options.projectId] - The project ID from the Google
|
|
55
|
+
* Developer's Console, e.g. 'grape-spaceship-123'. We will also check
|
|
56
|
+
* the environment variable GCLOUD_PROJECT for your project ID. If your
|
|
57
|
+
* app is running in an environment which supports
|
|
58
|
+
* {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
|
|
59
|
+
* your project ID will be detected automatically.
|
|
60
|
+
* @param {string} [options.apiEndpoint] - The domain name of the
|
|
61
|
+
* API remote host.
|
|
62
|
+
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
|
63
|
+
* Follows the structure of {@link gapicConfig}.
|
|
64
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
|
65
|
+
* For more information, please check the
|
|
66
|
+
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
|
67
|
+
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
|
68
|
+
* need to avoid loading the default gRPC version and want to use the fallback
|
|
69
|
+
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
|
70
|
+
* ```
|
|
71
|
+
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
|
72
|
+
* const client = new SubscriberClient({fallback: true}, gax);
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
|
|
76
|
+
/**
|
|
77
|
+
* Initialize the client.
|
|
78
|
+
* Performs asynchronous operations (such as authentication) and prepares the client.
|
|
79
|
+
* This function will be called automatically when any class method is called for the
|
|
80
|
+
* first time, but if you need to initialize it before calling an actual method,
|
|
81
|
+
* feel free to call initialize() directly.
|
|
82
|
+
*
|
|
83
|
+
* You can await on this method if you want to make sure the client is initialized.
|
|
84
|
+
*
|
|
85
|
+
* @returns {Promise} A promise that resolves to an authenticated service stub.
|
|
86
|
+
*/
|
|
87
|
+
initialize(): Promise<{
|
|
88
|
+
[name: string]: Function;
|
|
89
|
+
}>;
|
|
90
|
+
/**
|
|
91
|
+
* The DNS address for this API service.
|
|
92
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
93
|
+
* @returns {string} The DNS address for this service.
|
|
94
|
+
*/
|
|
95
|
+
static get servicePath(): string;
|
|
96
|
+
/**
|
|
97
|
+
* The DNS address for this API service - same as servicePath.
|
|
98
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
99
|
+
* @returns {string} The DNS address for this service.
|
|
100
|
+
*/
|
|
101
|
+
static get apiEndpoint(): string;
|
|
102
|
+
/**
|
|
103
|
+
* The DNS address for this API service.
|
|
104
|
+
* @returns {string} The DNS address for this service.
|
|
105
|
+
*/
|
|
106
|
+
get apiEndpoint(): string;
|
|
107
|
+
get universeDomain(): string;
|
|
108
|
+
/**
|
|
109
|
+
* The port for this API service.
|
|
110
|
+
* @returns {number} The default port for this service.
|
|
111
|
+
*/
|
|
112
|
+
static get port(): number;
|
|
113
|
+
/**
|
|
114
|
+
* The scopes needed to make gRPC calls for every method defined
|
|
115
|
+
* in this service.
|
|
116
|
+
* @returns {string[]} List of default scopes.
|
|
117
|
+
*/
|
|
118
|
+
static get scopes(): string[];
|
|
119
|
+
getProjectId(): Promise<string>;
|
|
120
|
+
getProjectId(callback: Callback<string, undefined, undefined>): void;
|
|
121
|
+
/**
|
|
122
|
+
* Creates a subscription to a given topic. See the [resource name rules]
|
|
123
|
+
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
|
|
124
|
+
* If the subscription already exists, returns `ALREADY_EXISTS`.
|
|
125
|
+
* If the corresponding topic doesn't exist, returns `NOT_FOUND`.
|
|
126
|
+
*
|
|
127
|
+
* If the name is not provided in the request, the server will assign a random
|
|
128
|
+
* name for this subscription on the same project as the topic, conforming
|
|
129
|
+
* to the [resource name format]
|
|
130
|
+
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
|
|
131
|
+
* generated name is populated in the returned Subscription object. Note that
|
|
132
|
+
* for REST API requests, you must specify a name in the request.
|
|
133
|
+
*
|
|
134
|
+
* @param {Object} request
|
|
135
|
+
* The request object that will be sent.
|
|
136
|
+
* @param {string} request.name
|
|
137
|
+
* Required. Identifier. The name of the subscription. It must have the format
|
|
138
|
+
* `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
|
|
139
|
+
* start with a letter, and contain only letters (`[A-Za-z]`), numbers
|
|
140
|
+
* (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
|
|
141
|
+
* plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
|
|
142
|
+
* in length, and it must not start with `"goog"`.
|
|
143
|
+
* @param {string} request.topic
|
|
144
|
+
* Required. The name of the topic from which this subscription is receiving
|
|
145
|
+
* messages. Format is `projects/{project}/topics/{topic}`. The value of this
|
|
146
|
+
* field will be `_deleted-topic_` if the topic has been deleted.
|
|
147
|
+
* @param {google.pubsub.v1.PushConfig} [request.pushConfig]
|
|
148
|
+
* Optional. If push delivery is used with this subscription, this field is
|
|
149
|
+
* used to configure it.
|
|
150
|
+
* @param {google.pubsub.v1.BigQueryConfig} [request.bigqueryConfig]
|
|
151
|
+
* Optional. If delivery to BigQuery is used with this subscription, this
|
|
152
|
+
* field is used to configure it.
|
|
153
|
+
* @param {google.pubsub.v1.CloudStorageConfig} [request.cloudStorageConfig]
|
|
154
|
+
* Optional. If delivery to Google Cloud Storage is used with this
|
|
155
|
+
* subscription, this field is used to configure it.
|
|
156
|
+
* @param {google.pubsub.v1.BigtableConfig} [request.bigtableConfig]
|
|
157
|
+
* Optional. If delivery to Bigtable is used with this subscription, this
|
|
158
|
+
* field is used to configure it.
|
|
159
|
+
* @param {number} [request.ackDeadlineSeconds]
|
|
160
|
+
* Optional. The approximate amount of time (on a best-effort basis) Pub/Sub
|
|
161
|
+
* waits for the subscriber to acknowledge receipt before resending the
|
|
162
|
+
* message. In the interval after the message is delivered and before it is
|
|
163
|
+
* acknowledged, it is considered to be _outstanding_. During that time
|
|
164
|
+
* period, the message will not be redelivered (on a best-effort basis).
|
|
165
|
+
*
|
|
166
|
+
* For pull subscriptions, this value is used as the initial value for the ack
|
|
167
|
+
* deadline. To override this value for a given message, call
|
|
168
|
+
* `ModifyAckDeadline` with the corresponding `ack_id` if using
|
|
169
|
+
* non-streaming pull or send the `ack_id` in a
|
|
170
|
+
* `StreamingModifyAckDeadlineRequest` if using streaming pull.
|
|
171
|
+
* The minimum custom deadline you can specify is 10 seconds.
|
|
172
|
+
* The maximum custom deadline you can specify is 600 seconds (10 minutes).
|
|
173
|
+
* If this parameter is 0, a default value of 10 seconds is used.
|
|
174
|
+
*
|
|
175
|
+
* For push delivery, this value is also used to set the request timeout for
|
|
176
|
+
* the call to the push endpoint.
|
|
177
|
+
*
|
|
178
|
+
* If the subscriber never acknowledges the message, the Pub/Sub
|
|
179
|
+
* system will eventually redeliver the message.
|
|
180
|
+
* @param {boolean} [request.retainAckedMessages]
|
|
181
|
+
* Optional. Indicates whether to retain acknowledged messages. If true, then
|
|
182
|
+
* messages are not expunged from the subscription's backlog, even if they are
|
|
183
|
+
* acknowledged, until they fall out of the `message_retention_duration`
|
|
184
|
+
* window. This must be true if you would like to [`Seek` to a timestamp]
|
|
185
|
+
* (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
|
|
186
|
+
* the past to replay previously-acknowledged messages.
|
|
187
|
+
* @param {google.protobuf.Duration} [request.messageRetentionDuration]
|
|
188
|
+
* Optional. How long to retain unacknowledged messages in the subscription's
|
|
189
|
+
* backlog, from the moment a message is published. If `retain_acked_messages`
|
|
190
|
+
* is true, then this also configures the retention of acknowledged messages,
|
|
191
|
+
* and thus configures how far back in time a `Seek` can be done. Defaults to
|
|
192
|
+
* 7 days. Cannot be more than 31 days or less than 10 minutes.
|
|
193
|
+
* @param {number[]} [request.labels]
|
|
194
|
+
* Optional. See [Creating and managing
|
|
195
|
+
* labels](https://cloud.google.com/pubsub/docs/labels).
|
|
196
|
+
* @param {boolean} [request.enableMessageOrdering]
|
|
197
|
+
* Optional. If true, messages published with the same `ordering_key` in
|
|
198
|
+
* `PubsubMessage` will be delivered to the subscribers in the order in which
|
|
199
|
+
* they are received by the Pub/Sub system. Otherwise, they may be delivered
|
|
200
|
+
* in any order.
|
|
201
|
+
* @param {google.pubsub.v1.ExpirationPolicy} [request.expirationPolicy]
|
|
202
|
+
* Optional. A policy that specifies the conditions for this subscription's
|
|
203
|
+
* expiration. A subscription is considered active as long as any connected
|
|
204
|
+
* subscriber is successfully consuming messages from the subscription or is
|
|
205
|
+
* issuing operations on the subscription. If `expiration_policy` is not set,
|
|
206
|
+
* a *default policy* with `ttl` of 31 days will be used. The minimum allowed
|
|
207
|
+
* value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set,
|
|
208
|
+
* but `expiration_policy.ttl` is not set, the subscription never expires.
|
|
209
|
+
* @param {string} [request.filter]
|
|
210
|
+
* Optional. An expression written in the Pub/Sub [filter
|
|
211
|
+
* language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
|
|
212
|
+
* then only `PubsubMessage`s whose `attributes` field matches the filter are
|
|
213
|
+
* delivered on this subscription. If empty, then no messages are filtered
|
|
214
|
+
* out.
|
|
215
|
+
* @param {google.pubsub.v1.DeadLetterPolicy} [request.deadLetterPolicy]
|
|
216
|
+
* Optional. A policy that specifies the conditions for dead lettering
|
|
217
|
+
* messages in this subscription. If dead_letter_policy is not set, dead
|
|
218
|
+
* lettering is disabled.
|
|
219
|
+
*
|
|
220
|
+
* The Pub/Sub service account associated with this subscriptions's
|
|
221
|
+
* parent project (i.e.,
|
|
222
|
+
* service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
|
|
223
|
+
* permission to Acknowledge() messages on this subscription.
|
|
224
|
+
* @param {google.pubsub.v1.RetryPolicy} [request.retryPolicy]
|
|
225
|
+
* Optional. A policy that specifies how Pub/Sub retries message delivery for
|
|
226
|
+
* this subscription.
|
|
227
|
+
*
|
|
228
|
+
* If not set, the default retry policy is applied. This generally implies
|
|
229
|
+
* that messages will be retried as soon as possible for healthy subscribers.
|
|
230
|
+
* RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded
|
|
231
|
+
* events for a given message.
|
|
232
|
+
* @param {boolean} [request.detached]
|
|
233
|
+
* Optional. Indicates whether the subscription is detached from its topic.
|
|
234
|
+
* Detached subscriptions don't receive messages from their topic and don't
|
|
235
|
+
* retain any backlog. `Pull` and `StreamingPull` requests will return
|
|
236
|
+
* FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
|
|
237
|
+
* the endpoint will not be made.
|
|
238
|
+
* @param {boolean} [request.enableExactlyOnceDelivery]
|
|
239
|
+
* Optional. If true, Pub/Sub provides the following guarantees for the
|
|
240
|
+
* delivery of a message with a given value of `message_id` on this
|
|
241
|
+
* subscription:
|
|
242
|
+
*
|
|
243
|
+
* * The message sent to a subscriber is guaranteed not to be resent
|
|
244
|
+
* before the message's acknowledgment deadline expires.
|
|
245
|
+
* * An acknowledged message will not be resent to a subscriber.
|
|
246
|
+
*
|
|
247
|
+
* Note that subscribers may still receive multiple copies of a message
|
|
248
|
+
* when `enable_exactly_once_delivery` is true if the message was published
|
|
249
|
+
* multiple times by a publisher client. These copies are considered distinct
|
|
250
|
+
* by Pub/Sub and have distinct `message_id` values.
|
|
251
|
+
* @param {google.protobuf.Duration} request.topicMessageRetentionDuration
|
|
252
|
+
* Output only. Indicates the minimum duration for which a message is retained
|
|
253
|
+
* after it is published to the subscription's topic. If this field is set,
|
|
254
|
+
* messages published to the subscription's topic in the last
|
|
255
|
+
* `topic_message_retention_duration` are always available to subscribers. See
|
|
256
|
+
* the `message_retention_duration` field in `Topic`. This field is set only
|
|
257
|
+
* in responses from the server; it is ignored if it is set in any requests.
|
|
258
|
+
* @param {google.pubsub.v1.Subscription.State} request.state
|
|
259
|
+
* Output only. An output-only field indicating whether or not the
|
|
260
|
+
* subscription can receive messages.
|
|
261
|
+
* @param {google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo} request.analyticsHubSubscriptionInfo
|
|
262
|
+
* Output only. Information about the associated Analytics Hub subscription.
|
|
263
|
+
* Only set if the subscription is created by Analytics Hub.
|
|
264
|
+
* @param {number[]} [request.messageTransforms]
|
|
265
|
+
* Optional. Transforms to be applied to messages before they are delivered to
|
|
266
|
+
* subscribers. Transforms are applied in the order specified.
|
|
267
|
+
* @param {number[]} request.tags
|
|
268
|
+
* Optional. Input only. Immutable. Tag keys/values directly bound to this
|
|
269
|
+
* resource. For example:
|
|
270
|
+
* "123/environment": "production",
|
|
271
|
+
* "123/costCenter": "marketing"
|
|
272
|
+
* See https://docs.cloud.google.com/pubsub/docs/tags for more information on
|
|
273
|
+
* using tags with Pub/Sub resources.
|
|
274
|
+
* @param {object} [options]
|
|
275
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
276
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
277
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.Subscription|Subscription}.
|
|
278
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
279
|
+
* for more details and examples.
|
|
280
|
+
* @example <caption>include:samples/generated/v1/subscriber.create_subscription.js</caption>
|
|
281
|
+
* region_tag:pubsub_v1_generated_Subscriber_CreateSubscription_async
|
|
282
|
+
*/
|
|
283
|
+
createSubscription(request?: protos.google.pubsub.v1.ISubscription, options?: CallOptions): Promise<[
|
|
284
|
+
protos.google.pubsub.v1.ISubscription,
|
|
285
|
+
protos.google.pubsub.v1.ISubscription | undefined,
|
|
286
|
+
{} | undefined
|
|
287
|
+
]>;
|
|
288
|
+
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;
|
|
289
|
+
createSubscription(request: protos.google.pubsub.v1.ISubscription, callback: Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.ISubscription | null | undefined, {} | null | undefined>): void;
|
|
290
|
+
/**
|
|
291
|
+
* Gets the configuration details of a subscription.
|
|
292
|
+
*
|
|
293
|
+
* @param {Object} request
|
|
294
|
+
* The request object that will be sent.
|
|
295
|
+
* @param {string} request.subscription
|
|
296
|
+
* Required. The name of the subscription to get.
|
|
297
|
+
* Format is `projects/{project}/subscriptions/{sub}`.
|
|
298
|
+
* @param {object} [options]
|
|
299
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
300
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
301
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.Subscription|Subscription}.
|
|
302
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
303
|
+
* for more details and examples.
|
|
304
|
+
* @example <caption>include:samples/generated/v1/subscriber.get_subscription.js</caption>
|
|
305
|
+
* region_tag:pubsub_v1_generated_Subscriber_GetSubscription_async
|
|
306
|
+
*/
|
|
307
|
+
getSubscription(request?: protos.google.pubsub.v1.IGetSubscriptionRequest, options?: CallOptions): Promise<[
|
|
308
|
+
protos.google.pubsub.v1.ISubscription,
|
|
309
|
+
protos.google.pubsub.v1.IGetSubscriptionRequest | undefined,
|
|
310
|
+
{} | undefined
|
|
311
|
+
]>;
|
|
312
|
+
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;
|
|
313
|
+
getSubscription(request: protos.google.pubsub.v1.IGetSubscriptionRequest, callback: Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IGetSubscriptionRequest | null | undefined, {} | null | undefined>): void;
|
|
314
|
+
/**
|
|
315
|
+
* Updates an existing subscription by updating the fields specified in the
|
|
316
|
+
* update mask. Note that certain properties of a subscription, such as its
|
|
317
|
+
* topic, are not modifiable.
|
|
318
|
+
*
|
|
319
|
+
* @param {Object} request
|
|
320
|
+
* The request object that will be sent.
|
|
321
|
+
* @param {google.pubsub.v1.Subscription} request.subscription
|
|
322
|
+
* Required. The updated subscription object.
|
|
323
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
324
|
+
* Required. Indicates which fields in the provided subscription to update.
|
|
325
|
+
* Must be specified and non-empty.
|
|
326
|
+
* @param {object} [options]
|
|
327
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
328
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
329
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.Subscription|Subscription}.
|
|
330
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
331
|
+
* for more details and examples.
|
|
332
|
+
* @example <caption>include:samples/generated/v1/subscriber.update_subscription.js</caption>
|
|
333
|
+
* region_tag:pubsub_v1_generated_Subscriber_UpdateSubscription_async
|
|
334
|
+
*/
|
|
335
|
+
updateSubscription(request?: protos.google.pubsub.v1.IUpdateSubscriptionRequest, options?: CallOptions): Promise<[
|
|
336
|
+
protos.google.pubsub.v1.ISubscription,
|
|
337
|
+
protos.google.pubsub.v1.IUpdateSubscriptionRequest | undefined,
|
|
338
|
+
{} | undefined
|
|
339
|
+
]>;
|
|
340
|
+
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;
|
|
341
|
+
updateSubscription(request: protos.google.pubsub.v1.IUpdateSubscriptionRequest, callback: Callback<protos.google.pubsub.v1.ISubscription, protos.google.pubsub.v1.IUpdateSubscriptionRequest | null | undefined, {} | null | undefined>): void;
|
|
342
|
+
/**
|
|
343
|
+
* Deletes an existing subscription. All messages retained in the subscription
|
|
344
|
+
* are immediately dropped. Calls to `Pull` after deletion will return
|
|
345
|
+
* `NOT_FOUND`. After a subscription is deleted, a new one may be created with
|
|
346
|
+
* the same name, but the new one has no association with the old
|
|
347
|
+
* subscription or its topic unless the same topic is specified.
|
|
348
|
+
*
|
|
349
|
+
* @param {Object} request
|
|
350
|
+
* The request object that will be sent.
|
|
351
|
+
* @param {string} request.subscription
|
|
352
|
+
* Required. The subscription to delete.
|
|
353
|
+
* Format is `projects/{project}/subscriptions/{sub}`.
|
|
354
|
+
* @param {object} [options]
|
|
355
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
356
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
357
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
358
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
359
|
+
* for more details and examples.
|
|
360
|
+
* @example <caption>include:samples/generated/v1/subscriber.delete_subscription.js</caption>
|
|
361
|
+
* region_tag:pubsub_v1_generated_Subscriber_DeleteSubscription_async
|
|
362
|
+
*/
|
|
363
|
+
deleteSubscription(request?: protos.google.pubsub.v1.IDeleteSubscriptionRequest, options?: CallOptions): Promise<[
|
|
364
|
+
protos.google.protobuf.IEmpty,
|
|
365
|
+
protos.google.pubsub.v1.IDeleteSubscriptionRequest | undefined,
|
|
366
|
+
{} | undefined
|
|
367
|
+
]>;
|
|
368
|
+
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;
|
|
369
|
+
deleteSubscription(request: protos.google.pubsub.v1.IDeleteSubscriptionRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSubscriptionRequest | null | undefined, {} | null | undefined>): void;
|
|
370
|
+
/**
|
|
371
|
+
* Modifies the ack deadline for a specific message. This method is useful
|
|
372
|
+
* to indicate that more time is needed to process a message by the
|
|
373
|
+
* subscriber, or to make the message available for redelivery if the
|
|
374
|
+
* processing was interrupted. Note that this does not modify the
|
|
375
|
+
* subscription-level `ackDeadlineSeconds` used for subsequent messages.
|
|
376
|
+
*
|
|
377
|
+
* @param {Object} request
|
|
378
|
+
* The request object that will be sent.
|
|
379
|
+
* @param {string} request.subscription
|
|
380
|
+
* Required. The name of the subscription.
|
|
381
|
+
* Format is `projects/{project}/subscriptions/{sub}`.
|
|
382
|
+
* @param {string[]} request.ackIds
|
|
383
|
+
* Required. List of acknowledgment IDs.
|
|
384
|
+
* @param {number} request.ackDeadlineSeconds
|
|
385
|
+
* Required. The new ack deadline with respect to the time this request was
|
|
386
|
+
* sent to the Pub/Sub system. For example, if the value is 10, the new ack
|
|
387
|
+
* deadline will expire 10 seconds after the `ModifyAckDeadline` call was
|
|
388
|
+
* made. Specifying zero might immediately make the message available for
|
|
389
|
+
* delivery to another subscriber client. This typically results in an
|
|
390
|
+
* increase in the rate of message redeliveries (that is, duplicates).
|
|
391
|
+
* The minimum deadline you can specify is 0 seconds.
|
|
392
|
+
* The maximum deadline you can specify in a single request is 600 seconds
|
|
393
|
+
* (10 minutes).
|
|
394
|
+
* @param {object} [options]
|
|
395
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
396
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
397
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
398
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
399
|
+
* for more details and examples.
|
|
400
|
+
* @example <caption>include:samples/generated/v1/subscriber.modify_ack_deadline.js</caption>
|
|
401
|
+
* region_tag:pubsub_v1_generated_Subscriber_ModifyAckDeadline_async
|
|
402
|
+
*/
|
|
403
|
+
modifyAckDeadline(request?: protos.google.pubsub.v1.IModifyAckDeadlineRequest, options?: CallOptions): Promise<[
|
|
404
|
+
protos.google.protobuf.IEmpty,
|
|
405
|
+
protos.google.pubsub.v1.IModifyAckDeadlineRequest | undefined,
|
|
406
|
+
{} | undefined
|
|
407
|
+
]>;
|
|
408
|
+
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;
|
|
409
|
+
modifyAckDeadline(request: protos.google.pubsub.v1.IModifyAckDeadlineRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyAckDeadlineRequest | null | undefined, {} | null | undefined>): void;
|
|
410
|
+
/**
|
|
411
|
+
* Acknowledges the messages associated with the `ack_ids` in the
|
|
412
|
+
* `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
|
|
413
|
+
* from the subscription.
|
|
414
|
+
*
|
|
415
|
+
* Acknowledging a message whose ack deadline has expired may succeed,
|
|
416
|
+
* but such a message may be redelivered later. Acknowledging a message more
|
|
417
|
+
* than once will not result in an error.
|
|
418
|
+
*
|
|
419
|
+
* @param {Object} request
|
|
420
|
+
* The request object that will be sent.
|
|
421
|
+
* @param {string} request.subscription
|
|
422
|
+
* Required. The subscription whose message is being acknowledged.
|
|
423
|
+
* Format is `projects/{project}/subscriptions/{sub}`.
|
|
424
|
+
* @param {string[]} request.ackIds
|
|
425
|
+
* Required. The acknowledgment ID for the messages being acknowledged that
|
|
426
|
+
* was returned by the Pub/Sub system in the `Pull` response. Must not be
|
|
427
|
+
* empty.
|
|
428
|
+
* @param {object} [options]
|
|
429
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
430
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
431
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
432
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
433
|
+
* for more details and examples.
|
|
434
|
+
* @example <caption>include:samples/generated/v1/subscriber.acknowledge.js</caption>
|
|
435
|
+
* region_tag:pubsub_v1_generated_Subscriber_Acknowledge_async
|
|
436
|
+
*/
|
|
437
|
+
acknowledge(request?: protos.google.pubsub.v1.IAcknowledgeRequest, options?: CallOptions): Promise<[
|
|
438
|
+
protos.google.protobuf.IEmpty,
|
|
439
|
+
protos.google.pubsub.v1.IAcknowledgeRequest | undefined,
|
|
440
|
+
{} | undefined
|
|
441
|
+
]>;
|
|
442
|
+
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;
|
|
443
|
+
acknowledge(request: protos.google.pubsub.v1.IAcknowledgeRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IAcknowledgeRequest | null | undefined, {} | null | undefined>): void;
|
|
444
|
+
/**
|
|
445
|
+
* Pulls messages from the server.
|
|
446
|
+
*
|
|
447
|
+
* @param {Object} request
|
|
448
|
+
* The request object that will be sent.
|
|
449
|
+
* @param {string} request.subscription
|
|
450
|
+
* Required. The subscription from which messages should be pulled.
|
|
451
|
+
* Format is `projects/{project}/subscriptions/{sub}`.
|
|
452
|
+
* @param {boolean} [request.returnImmediately]
|
|
453
|
+
* Optional. If this field set to true, the system will respond immediately
|
|
454
|
+
* even if it there are no messages available to return in the `Pull`
|
|
455
|
+
* response. Otherwise, the system may wait (for a bounded amount of time)
|
|
456
|
+
* until at least one message is available, rather than returning no messages.
|
|
457
|
+
* Warning: setting this field to `true` is discouraged because it adversely
|
|
458
|
+
* impacts the performance of `Pull` operations. We recommend that users do
|
|
459
|
+
* not set this field.
|
|
460
|
+
* @param {number} request.maxMessages
|
|
461
|
+
* Required. The maximum number of messages to return for this request. Must
|
|
462
|
+
* be a positive integer. The Pub/Sub system may return fewer than the number
|
|
463
|
+
* specified.
|
|
464
|
+
* @param {object} [options]
|
|
465
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
466
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
467
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.PullResponse|PullResponse}.
|
|
468
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
469
|
+
* for more details and examples.
|
|
470
|
+
* @example <caption>include:samples/generated/v1/subscriber.pull.js</caption>
|
|
471
|
+
* region_tag:pubsub_v1_generated_Subscriber_Pull_async
|
|
472
|
+
*/
|
|
473
|
+
pull(request?: protos.google.pubsub.v1.IPullRequest, options?: CallOptions): Promise<[
|
|
474
|
+
protos.google.pubsub.v1.IPullResponse,
|
|
475
|
+
protos.google.pubsub.v1.IPullRequest | undefined,
|
|
476
|
+
{} | undefined
|
|
477
|
+
]>;
|
|
478
|
+
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;
|
|
479
|
+
pull(request: protos.google.pubsub.v1.IPullRequest, callback: Callback<protos.google.pubsub.v1.IPullResponse, protos.google.pubsub.v1.IPullRequest | null | undefined, {} | null | undefined>): void;
|
|
480
|
+
/**
|
|
481
|
+
* Modifies the `PushConfig` for a specified subscription.
|
|
482
|
+
*
|
|
483
|
+
* This may be used to change a push subscription to a pull one (signified by
|
|
484
|
+
* an empty `PushConfig`) or vice versa, or change the endpoint URL and other
|
|
485
|
+
* attributes of a push subscription. Messages will accumulate for delivery
|
|
486
|
+
* continuously through the call regardless of changes to the `PushConfig`.
|
|
487
|
+
*
|
|
488
|
+
* @param {Object} request
|
|
489
|
+
* The request object that will be sent.
|
|
490
|
+
* @param {string} request.subscription
|
|
491
|
+
* Required. The name of the subscription.
|
|
492
|
+
* Format is `projects/{project}/subscriptions/{sub}`.
|
|
493
|
+
* @param {google.pubsub.v1.PushConfig} request.pushConfig
|
|
494
|
+
* Required. The push configuration for future deliveries.
|
|
495
|
+
*
|
|
496
|
+
* An empty `pushConfig` indicates that the Pub/Sub system should
|
|
497
|
+
* stop pushing messages from the given subscription and allow
|
|
498
|
+
* messages to be pulled and acknowledged - effectively pausing
|
|
499
|
+
* the subscription if `Pull` or `StreamingPull` is not called.
|
|
500
|
+
* @param {object} [options]
|
|
501
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
502
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
503
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
504
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
505
|
+
* for more details and examples.
|
|
506
|
+
* @example <caption>include:samples/generated/v1/subscriber.modify_push_config.js</caption>
|
|
507
|
+
* region_tag:pubsub_v1_generated_Subscriber_ModifyPushConfig_async
|
|
508
|
+
*/
|
|
509
|
+
modifyPushConfig(request?: protos.google.pubsub.v1.IModifyPushConfigRequest, options?: CallOptions): Promise<[
|
|
510
|
+
protos.google.protobuf.IEmpty,
|
|
511
|
+
protos.google.pubsub.v1.IModifyPushConfigRequest | undefined,
|
|
512
|
+
{} | undefined
|
|
513
|
+
]>;
|
|
514
|
+
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;
|
|
515
|
+
modifyPushConfig(request: protos.google.pubsub.v1.IModifyPushConfigRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IModifyPushConfigRequest | null | undefined, {} | null | undefined>): void;
|
|
516
|
+
/**
|
|
517
|
+
* Gets the configuration details of a snapshot. Snapshots are used in
|
|
518
|
+
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
|
|
519
|
+
* which allow you to manage message acknowledgments in bulk. That is, you can
|
|
520
|
+
* set the acknowledgment state of messages in an existing subscription to the
|
|
521
|
+
* state captured by a snapshot.
|
|
522
|
+
*
|
|
523
|
+
* @param {Object} request
|
|
524
|
+
* The request object that will be sent.
|
|
525
|
+
* @param {string} request.snapshot
|
|
526
|
+
* Required. The name of the snapshot to get.
|
|
527
|
+
* Format is `projects/{project}/snapshots/{snap}`.
|
|
528
|
+
* @param {object} [options]
|
|
529
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
530
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
531
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.Snapshot|Snapshot}.
|
|
532
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
533
|
+
* for more details and examples.
|
|
534
|
+
* @example <caption>include:samples/generated/v1/subscriber.get_snapshot.js</caption>
|
|
535
|
+
* region_tag:pubsub_v1_generated_Subscriber_GetSnapshot_async
|
|
536
|
+
*/
|
|
537
|
+
getSnapshot(request?: protos.google.pubsub.v1.IGetSnapshotRequest, options?: CallOptions): Promise<[
|
|
538
|
+
protos.google.pubsub.v1.ISnapshot,
|
|
539
|
+
protos.google.pubsub.v1.IGetSnapshotRequest | undefined,
|
|
540
|
+
{} | undefined
|
|
541
|
+
]>;
|
|
542
|
+
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;
|
|
543
|
+
getSnapshot(request: protos.google.pubsub.v1.IGetSnapshotRequest, callback: Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IGetSnapshotRequest | null | undefined, {} | null | undefined>): void;
|
|
544
|
+
/**
|
|
545
|
+
* Creates a snapshot from the requested subscription. Snapshots are used in
|
|
546
|
+
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
|
|
547
|
+
* which allow you to manage message acknowledgments in bulk. That is, you can
|
|
548
|
+
* set the acknowledgment state of messages in an existing subscription to the
|
|
549
|
+
* state captured by a snapshot.
|
|
550
|
+
* If the snapshot already exists, returns `ALREADY_EXISTS`.
|
|
551
|
+
* If the requested subscription doesn't exist, returns `NOT_FOUND`.
|
|
552
|
+
* If the backlog in the subscription is too old -- and the resulting snapshot
|
|
553
|
+
* would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
|
|
554
|
+
* See also the `Snapshot.expire_time` field. If the name is not provided in
|
|
555
|
+
* the request, the server will assign a random
|
|
556
|
+
* name for this snapshot on the same project as the subscription, conforming
|
|
557
|
+
* to the [resource name format]
|
|
558
|
+
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
|
|
559
|
+
* generated name is populated in the returned Snapshot object. Note that for
|
|
560
|
+
* REST API requests, you must specify a name in the request.
|
|
561
|
+
*
|
|
562
|
+
* @param {Object} request
|
|
563
|
+
* The request object that will be sent.
|
|
564
|
+
* @param {string} request.name
|
|
565
|
+
* Required. User-provided name for this snapshot. If the name is not provided
|
|
566
|
+
* in the request, the server will assign a random name for this snapshot on
|
|
567
|
+
* the same project as the subscription. Note that for REST API requests, you
|
|
568
|
+
* must specify a name. See the [resource name
|
|
569
|
+
* rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
|
|
570
|
+
* Format is `projects/{project}/snapshots/{snap}`.
|
|
571
|
+
* @param {string} request.subscription
|
|
572
|
+
* Required. The subscription whose backlog the snapshot retains.
|
|
573
|
+
* Specifically, the created snapshot is guaranteed to retain:
|
|
574
|
+
* (a) The existing backlog on the subscription. More precisely, this is
|
|
575
|
+
* defined as the messages in the subscription's backlog that are
|
|
576
|
+
* unacknowledged upon the successful completion of the
|
|
577
|
+
* `CreateSnapshot` request; as well as:
|
|
578
|
+
* (b) Any messages published to the subscription's topic following the
|
|
579
|
+
* successful completion of the CreateSnapshot request.
|
|
580
|
+
* Format is `projects/{project}/subscriptions/{sub}`.
|
|
581
|
+
* @param {number[]} [request.labels]
|
|
582
|
+
* Optional. See [Creating and managing
|
|
583
|
+
* labels](https://cloud.google.com/pubsub/docs/labels).
|
|
584
|
+
* @param {number[]} request.tags
|
|
585
|
+
* Optional. Input only. Immutable. Tag keys/values directly bound to this
|
|
586
|
+
* resource. For example:
|
|
587
|
+
* "123/environment": "production",
|
|
588
|
+
* "123/costCenter": "marketing"
|
|
589
|
+
* See https://docs.cloud.google.com/pubsub/docs/tags for more information on
|
|
590
|
+
* using tags with Pub/Sub resources.
|
|
591
|
+
* @param {object} [options]
|
|
592
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
593
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
594
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.Snapshot|Snapshot}.
|
|
595
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
596
|
+
* for more details and examples.
|
|
597
|
+
* @example <caption>include:samples/generated/v1/subscriber.create_snapshot.js</caption>
|
|
598
|
+
* region_tag:pubsub_v1_generated_Subscriber_CreateSnapshot_async
|
|
599
|
+
*/
|
|
600
|
+
createSnapshot(request?: protos.google.pubsub.v1.ICreateSnapshotRequest, options?: CallOptions): Promise<[
|
|
601
|
+
protos.google.pubsub.v1.ISnapshot,
|
|
602
|
+
protos.google.pubsub.v1.ICreateSnapshotRequest | undefined,
|
|
603
|
+
{} | undefined
|
|
604
|
+
]>;
|
|
605
|
+
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;
|
|
606
|
+
createSnapshot(request: protos.google.pubsub.v1.ICreateSnapshotRequest, callback: Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.ICreateSnapshotRequest | null | undefined, {} | null | undefined>): void;
|
|
607
|
+
/**
|
|
608
|
+
* Updates an existing snapshot by updating the fields specified in the update
|
|
609
|
+
* mask. Snapshots are used in
|
|
610
|
+
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
|
|
611
|
+
* which allow you to manage message acknowledgments in bulk. That is, you can
|
|
612
|
+
* set the acknowledgment state of messages in an existing subscription to the
|
|
613
|
+
* state captured by a snapshot.
|
|
614
|
+
*
|
|
615
|
+
* @param {Object} request
|
|
616
|
+
* The request object that will be sent.
|
|
617
|
+
* @param {google.pubsub.v1.Snapshot} request.snapshot
|
|
618
|
+
* Required. The updated snapshot object.
|
|
619
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
620
|
+
* Required. Indicates which fields in the provided snapshot to update.
|
|
621
|
+
* Must be specified and non-empty.
|
|
622
|
+
* @param {object} [options]
|
|
623
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
624
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
625
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.Snapshot|Snapshot}.
|
|
626
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
627
|
+
* for more details and examples.
|
|
628
|
+
* @example <caption>include:samples/generated/v1/subscriber.update_snapshot.js</caption>
|
|
629
|
+
* region_tag:pubsub_v1_generated_Subscriber_UpdateSnapshot_async
|
|
630
|
+
*/
|
|
631
|
+
updateSnapshot(request?: protos.google.pubsub.v1.IUpdateSnapshotRequest, options?: CallOptions): Promise<[
|
|
632
|
+
protos.google.pubsub.v1.ISnapshot,
|
|
633
|
+
protos.google.pubsub.v1.IUpdateSnapshotRequest | undefined,
|
|
634
|
+
{} | undefined
|
|
635
|
+
]>;
|
|
636
|
+
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;
|
|
637
|
+
updateSnapshot(request: protos.google.pubsub.v1.IUpdateSnapshotRequest, callback: Callback<protos.google.pubsub.v1.ISnapshot, protos.google.pubsub.v1.IUpdateSnapshotRequest | null | undefined, {} | null | undefined>): void;
|
|
638
|
+
/**
|
|
639
|
+
* Removes an existing snapshot. Snapshots are used in [Seek]
|
|
640
|
+
* (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
|
|
641
|
+
* allow you to manage message acknowledgments in bulk. That is, you can set
|
|
642
|
+
* the acknowledgment state of messages in an existing subscription to the
|
|
643
|
+
* state captured by a snapshot.
|
|
644
|
+
* When the snapshot is deleted, all messages retained in the snapshot
|
|
645
|
+
* are immediately dropped. After a snapshot is deleted, a new one may be
|
|
646
|
+
* created with the same name, but the new one has no association with the old
|
|
647
|
+
* snapshot or its subscription, unless the same subscription is specified.
|
|
648
|
+
*
|
|
649
|
+
* @param {Object} request
|
|
650
|
+
* The request object that will be sent.
|
|
651
|
+
* @param {string} request.snapshot
|
|
652
|
+
* Required. The name of the snapshot to delete.
|
|
653
|
+
* Format is `projects/{project}/snapshots/{snap}`.
|
|
654
|
+
* @param {object} [options]
|
|
655
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
656
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
657
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
658
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
659
|
+
* for more details and examples.
|
|
660
|
+
* @example <caption>include:samples/generated/v1/subscriber.delete_snapshot.js</caption>
|
|
661
|
+
* region_tag:pubsub_v1_generated_Subscriber_DeleteSnapshot_async
|
|
662
|
+
*/
|
|
663
|
+
deleteSnapshot(request?: protos.google.pubsub.v1.IDeleteSnapshotRequest, options?: CallOptions): Promise<[
|
|
664
|
+
protos.google.protobuf.IEmpty,
|
|
665
|
+
protos.google.pubsub.v1.IDeleteSnapshotRequest | undefined,
|
|
666
|
+
{} | undefined
|
|
667
|
+
]>;
|
|
668
|
+
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;
|
|
669
|
+
deleteSnapshot(request: protos.google.pubsub.v1.IDeleteSnapshotRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSnapshotRequest | null | undefined, {} | null | undefined>): void;
|
|
670
|
+
/**
|
|
671
|
+
* Seeks an existing subscription to a point in time or to a given snapshot,
|
|
672
|
+
* whichever is provided in the request. Snapshots are used in [Seek]
|
|
673
|
+
* (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
|
|
674
|
+
* allow you to manage message acknowledgments in bulk. That is, you can set
|
|
675
|
+
* the acknowledgment state of messages in an existing subscription to the
|
|
676
|
+
* state captured by a snapshot. Note that both the subscription and the
|
|
677
|
+
* snapshot must be on the same topic.
|
|
678
|
+
*
|
|
679
|
+
* @param {Object} request
|
|
680
|
+
* The request object that will be sent.
|
|
681
|
+
* @param {string} request.subscription
|
|
682
|
+
* Required. The subscription to affect.
|
|
683
|
+
* @param {google.protobuf.Timestamp} [request.time]
|
|
684
|
+
* Optional. The time to seek to.
|
|
685
|
+
* Messages retained in the subscription that were published before this
|
|
686
|
+
* time are marked as acknowledged, and messages retained in the
|
|
687
|
+
* subscription that were published after this time are marked as
|
|
688
|
+
* unacknowledged. Note that this operation affects only those messages
|
|
689
|
+
* retained in the subscription (configured by the combination of
|
|
690
|
+
* `message_retention_duration` and `retain_acked_messages`). For example,
|
|
691
|
+
* if `time` corresponds to a point before the message retention
|
|
692
|
+
* window (or to a point before the system's notion of the subscription
|
|
693
|
+
* creation time), only retained messages will be marked as unacknowledged,
|
|
694
|
+
* and already-expunged messages will not be restored.
|
|
695
|
+
* @param {string} [request.snapshot]
|
|
696
|
+
* Optional. The snapshot to seek to. The snapshot's topic must be the same
|
|
697
|
+
* as that of the provided subscription. Format is
|
|
698
|
+
* `projects/{project}/snapshots/{snap}`.
|
|
699
|
+
* @param {object} [options]
|
|
700
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
701
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
702
|
+
* The first element of the array is an object representing {@link protos.google.pubsub.v1.SeekResponse|SeekResponse}.
|
|
703
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
704
|
+
* for more details and examples.
|
|
705
|
+
* @example <caption>include:samples/generated/v1/subscriber.seek.js</caption>
|
|
706
|
+
* region_tag:pubsub_v1_generated_Subscriber_Seek_async
|
|
707
|
+
*/
|
|
708
|
+
seek(request?: protos.google.pubsub.v1.ISeekRequest, options?: CallOptions): Promise<[
|
|
709
|
+
protos.google.pubsub.v1.ISeekResponse,
|
|
710
|
+
protos.google.pubsub.v1.ISeekRequest | undefined,
|
|
711
|
+
{} | undefined
|
|
712
|
+
]>;
|
|
713
|
+
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;
|
|
714
|
+
seek(request: protos.google.pubsub.v1.ISeekRequest, callback: Callback<protos.google.pubsub.v1.ISeekResponse, protos.google.pubsub.v1.ISeekRequest | null | undefined, {} | null | undefined>): void;
|
|
715
|
+
/**
|
|
716
|
+
* Establishes a stream with the server, which sends messages down to the
|
|
717
|
+
* client. The client streams acknowledgments and ack deadline modifications
|
|
718
|
+
* back to the server. The server will close the stream and return the status
|
|
719
|
+
* on any error. The server may close the stream with status `UNAVAILABLE` to
|
|
720
|
+
* reassign server-side resources, in which case, the client should
|
|
721
|
+
* re-establish the stream. Flow control can be achieved by configuring the
|
|
722
|
+
* underlying RPC channel.
|
|
723
|
+
*
|
|
724
|
+
* @param {object} [options]
|
|
725
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
726
|
+
* @returns {Stream}
|
|
727
|
+
* An object stream which is both readable and writable. It accepts objects
|
|
728
|
+
* representing {@link protos.google.pubsub.v1.StreamingPullRequest|StreamingPullRequest} for write() method, and
|
|
729
|
+
* will emit objects representing {@link protos.google.pubsub.v1.StreamingPullResponse|StreamingPullResponse} on 'data' event asynchronously.
|
|
730
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming | documentation }
|
|
731
|
+
* for more details and examples.
|
|
732
|
+
* @example <caption>include:samples/generated/v1/subscriber.streaming_pull.js</caption>
|
|
733
|
+
* region_tag:pubsub_v1_generated_Subscriber_StreamingPull_async
|
|
734
|
+
*/
|
|
735
|
+
streamingPull(options?: CallOptions): gax.CancellableStream;
|
|
736
|
+
/**
|
|
737
|
+
* Lists matching subscriptions.
|
|
738
|
+
*
|
|
739
|
+
* @param {Object} request
|
|
740
|
+
* The request object that will be sent.
|
|
741
|
+
* @param {string} request.project
|
|
742
|
+
* Required. The name of the project in which to list subscriptions.
|
|
743
|
+
* Format is `projects/{project-id}`.
|
|
744
|
+
* @param {number} [request.pageSize]
|
|
745
|
+
* Optional. Maximum number of subscriptions to return.
|
|
746
|
+
* @param {string} [request.pageToken]
|
|
747
|
+
* Optional. The value returned by the last `ListSubscriptionsResponse`;
|
|
748
|
+
* indicates that this is a continuation of a prior `ListSubscriptions` call,
|
|
749
|
+
* and that the system should return the next page of data.
|
|
750
|
+
* @param {object} [options]
|
|
751
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
752
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
753
|
+
* The first element of the array is Array of {@link protos.google.pubsub.v1.Subscription|Subscription}.
|
|
754
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
755
|
+
* times as needed and will merge results from all the pages into this array.
|
|
756
|
+
* Note that it can affect your quota.
|
|
757
|
+
* We recommend using `listSubscriptionsAsync()`
|
|
758
|
+
* method described below for async iteration which you can stop as needed.
|
|
759
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
760
|
+
* for more details and examples.
|
|
761
|
+
*/
|
|
762
|
+
listSubscriptions(request?: protos.google.pubsub.v1.IListSubscriptionsRequest, options?: CallOptions): Promise<[
|
|
763
|
+
protos.google.pubsub.v1.ISubscription[],
|
|
764
|
+
protos.google.pubsub.v1.IListSubscriptionsRequest | null,
|
|
765
|
+
protos.google.pubsub.v1.IListSubscriptionsResponse
|
|
766
|
+
]>;
|
|
767
|
+
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;
|
|
768
|
+
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;
|
|
769
|
+
/**
|
|
770
|
+
* Equivalent to `listSubscriptions`, but returns a NodeJS Stream object.
|
|
771
|
+
* @param {Object} request
|
|
772
|
+
* The request object that will be sent.
|
|
773
|
+
* @param {string} request.project
|
|
774
|
+
* Required. The name of the project in which to list subscriptions.
|
|
775
|
+
* Format is `projects/{project-id}`.
|
|
776
|
+
* @param {number} [request.pageSize]
|
|
777
|
+
* Optional. Maximum number of subscriptions to return.
|
|
778
|
+
* @param {string} [request.pageToken]
|
|
779
|
+
* Optional. The value returned by the last `ListSubscriptionsResponse`;
|
|
780
|
+
* indicates that this is a continuation of a prior `ListSubscriptions` call,
|
|
781
|
+
* and that the system should return the next page of data.
|
|
782
|
+
* @param {object} [options]
|
|
783
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
784
|
+
* @returns {Stream}
|
|
785
|
+
* An object stream which emits an object representing {@link protos.google.pubsub.v1.Subscription|Subscription} on 'data' event.
|
|
786
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
787
|
+
* times as needed. Note that it can affect your quota.
|
|
788
|
+
* We recommend using `listSubscriptionsAsync()`
|
|
789
|
+
* method described below for async iteration which you can stop as needed.
|
|
790
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
791
|
+
* for more details and examples.
|
|
792
|
+
*/
|
|
793
|
+
listSubscriptionsStream(request?: protos.google.pubsub.v1.IListSubscriptionsRequest, options?: CallOptions): Transform;
|
|
794
|
+
/**
|
|
795
|
+
* Equivalent to `listSubscriptions`, but returns an iterable object.
|
|
796
|
+
*
|
|
797
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
798
|
+
* @param {Object} request
|
|
799
|
+
* The request object that will be sent.
|
|
800
|
+
* @param {string} request.project
|
|
801
|
+
* Required. The name of the project in which to list subscriptions.
|
|
802
|
+
* Format is `projects/{project-id}`.
|
|
803
|
+
* @param {number} [request.pageSize]
|
|
804
|
+
* Optional. Maximum number of subscriptions to return.
|
|
805
|
+
* @param {string} [request.pageToken]
|
|
806
|
+
* Optional. The value returned by the last `ListSubscriptionsResponse`;
|
|
807
|
+
* indicates that this is a continuation of a prior `ListSubscriptions` call,
|
|
808
|
+
* and that the system should return the next page of data.
|
|
809
|
+
* @param {object} [options]
|
|
810
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
811
|
+
* @returns {Object}
|
|
812
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
813
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
814
|
+
* {@link protos.google.pubsub.v1.Subscription|Subscription}. The API will be called under the hood as needed, once per the page,
|
|
815
|
+
* so you can stop the iteration when you don't need more results.
|
|
816
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
817
|
+
* for more details and examples.
|
|
818
|
+
* @example <caption>include:samples/generated/v1/subscriber.list_subscriptions.js</caption>
|
|
819
|
+
* region_tag:pubsub_v1_generated_Subscriber_ListSubscriptions_async
|
|
820
|
+
*/
|
|
821
|
+
listSubscriptionsAsync(request?: protos.google.pubsub.v1.IListSubscriptionsRequest, options?: CallOptions): AsyncIterable<protos.google.pubsub.v1.ISubscription>;
|
|
822
|
+
/**
|
|
823
|
+
* Lists the existing snapshots. Snapshots are used in [Seek](
|
|
824
|
+
* https://cloud.google.com/pubsub/docs/replay-overview) operations, which
|
|
825
|
+
* allow you to manage message acknowledgments in bulk. That is, you can set
|
|
826
|
+
* the acknowledgment state of messages in an existing subscription to the
|
|
827
|
+
* state captured by a snapshot.
|
|
828
|
+
*
|
|
829
|
+
* @param {Object} request
|
|
830
|
+
* The request object that will be sent.
|
|
831
|
+
* @param {string} request.project
|
|
832
|
+
* Required. The name of the project in which to list snapshots.
|
|
833
|
+
* Format is `projects/{project-id}`.
|
|
834
|
+
* @param {number} [request.pageSize]
|
|
835
|
+
* Optional. Maximum number of snapshots to return.
|
|
836
|
+
* @param {string} [request.pageToken]
|
|
837
|
+
* Optional. The value returned by the last `ListSnapshotsResponse`; indicates
|
|
838
|
+
* that this is a continuation of a prior `ListSnapshots` call, and that the
|
|
839
|
+
* system should return the next page of data.
|
|
840
|
+
* @param {object} [options]
|
|
841
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
842
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
843
|
+
* The first element of the array is Array of {@link protos.google.pubsub.v1.Snapshot|Snapshot}.
|
|
844
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
845
|
+
* times as needed and will merge results from all the pages into this array.
|
|
846
|
+
* Note that it can affect your quota.
|
|
847
|
+
* We recommend using `listSnapshotsAsync()`
|
|
848
|
+
* method described below for async iteration which you can stop as needed.
|
|
849
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
850
|
+
* for more details and examples.
|
|
851
|
+
*/
|
|
852
|
+
listSnapshots(request?: protos.google.pubsub.v1.IListSnapshotsRequest, options?: CallOptions): Promise<[
|
|
853
|
+
protos.google.pubsub.v1.ISnapshot[],
|
|
854
|
+
protos.google.pubsub.v1.IListSnapshotsRequest | null,
|
|
855
|
+
protos.google.pubsub.v1.IListSnapshotsResponse
|
|
856
|
+
]>;
|
|
857
|
+
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;
|
|
858
|
+
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;
|
|
859
|
+
/**
|
|
860
|
+
* Equivalent to `listSnapshots`, but returns a NodeJS Stream object.
|
|
861
|
+
* @param {Object} request
|
|
862
|
+
* The request object that will be sent.
|
|
863
|
+
* @param {string} request.project
|
|
864
|
+
* Required. The name of the project in which to list snapshots.
|
|
865
|
+
* Format is `projects/{project-id}`.
|
|
866
|
+
* @param {number} [request.pageSize]
|
|
867
|
+
* Optional. Maximum number of snapshots to return.
|
|
868
|
+
* @param {string} [request.pageToken]
|
|
869
|
+
* Optional. The value returned by the last `ListSnapshotsResponse`; indicates
|
|
870
|
+
* that this is a continuation of a prior `ListSnapshots` call, and that the
|
|
871
|
+
* system should return the next page of data.
|
|
872
|
+
* @param {object} [options]
|
|
873
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
874
|
+
* @returns {Stream}
|
|
875
|
+
* An object stream which emits an object representing {@link protos.google.pubsub.v1.Snapshot|Snapshot} on 'data' event.
|
|
876
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
877
|
+
* times as needed. Note that it can affect your quota.
|
|
878
|
+
* We recommend using `listSnapshotsAsync()`
|
|
879
|
+
* method described below for async iteration which you can stop as needed.
|
|
880
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
881
|
+
* for more details and examples.
|
|
882
|
+
*/
|
|
883
|
+
listSnapshotsStream(request?: protos.google.pubsub.v1.IListSnapshotsRequest, options?: CallOptions): Transform;
|
|
884
|
+
/**
|
|
885
|
+
* Equivalent to `listSnapshots`, but returns an iterable object.
|
|
886
|
+
*
|
|
887
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
888
|
+
* @param {Object} request
|
|
889
|
+
* The request object that will be sent.
|
|
890
|
+
* @param {string} request.project
|
|
891
|
+
* Required. The name of the project in which to list snapshots.
|
|
892
|
+
* Format is `projects/{project-id}`.
|
|
893
|
+
* @param {number} [request.pageSize]
|
|
894
|
+
* Optional. Maximum number of snapshots to return.
|
|
895
|
+
* @param {string} [request.pageToken]
|
|
896
|
+
* Optional. The value returned by the last `ListSnapshotsResponse`; indicates
|
|
897
|
+
* that this is a continuation of a prior `ListSnapshots` call, and that the
|
|
898
|
+
* system should return the next page of data.
|
|
899
|
+
* @param {object} [options]
|
|
900
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
901
|
+
* @returns {Object}
|
|
902
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
903
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
904
|
+
* {@link protos.google.pubsub.v1.Snapshot|Snapshot}. The API will be called under the hood as needed, once per the page,
|
|
905
|
+
* so you can stop the iteration when you don't need more results.
|
|
906
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
907
|
+
* for more details and examples.
|
|
908
|
+
* @example <caption>include:samples/generated/v1/subscriber.list_snapshots.js</caption>
|
|
909
|
+
* region_tag:pubsub_v1_generated_Subscriber_ListSnapshots_async
|
|
910
|
+
*/
|
|
911
|
+
listSnapshotsAsync(request?: protos.google.pubsub.v1.IListSnapshotsRequest, options?: CallOptions): AsyncIterable<protos.google.pubsub.v1.ISnapshot>;
|
|
912
|
+
/**
|
|
913
|
+
* Gets the access control policy for a resource. Returns an empty policy
|
|
914
|
+
* if the resource exists and does not have a policy set.
|
|
915
|
+
*
|
|
916
|
+
* @param {Object} request
|
|
917
|
+
* The request object that will be sent.
|
|
918
|
+
* @param {string} request.resource
|
|
919
|
+
* REQUIRED: The resource for which the policy is being requested.
|
|
920
|
+
* See the operation documentation for the appropriate value for this field.
|
|
921
|
+
* @param {Object} [request.options]
|
|
922
|
+
* OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
|
923
|
+
* `GetIamPolicy`. This field is only used by Cloud IAM.
|
|
924
|
+
*
|
|
925
|
+
* This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}.
|
|
926
|
+
* @param {Object} [options]
|
|
927
|
+
* Optional parameters. You can override the default settings for this call, e.g, timeout,
|
|
928
|
+
* retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
|
|
929
|
+
* @param {function(?Error, ?Object)} [callback]
|
|
930
|
+
* The function which will be called with the result of the API call.
|
|
931
|
+
*
|
|
932
|
+
* The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}.
|
|
933
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
934
|
+
* The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}.
|
|
935
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
|
936
|
+
*/
|
|
937
|
+
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]>;
|
|
938
|
+
/**
|
|
939
|
+
* Returns permissions that a caller has on the specified resource. If the
|
|
940
|
+
* resource does not exist, this will return an empty set of
|
|
941
|
+
* permissions, not a NOT_FOUND error.
|
|
942
|
+
*
|
|
943
|
+
* Note: This operation is designed to be used for building
|
|
944
|
+
* permission-aware UIs and command-line tools, not for authorization
|
|
945
|
+
* checking. This operation may "fail open" without warning.
|
|
946
|
+
*
|
|
947
|
+
* @param {Object} request
|
|
948
|
+
* The request object that will be sent.
|
|
949
|
+
* @param {string} request.resource
|
|
950
|
+
* REQUIRED: The resource for which the policy detail is being requested.
|
|
951
|
+
* See the operation documentation for the appropriate value for this field.
|
|
952
|
+
* @param {string[]} request.permissions
|
|
953
|
+
* The set of permissions to check for the `resource`. Permissions with
|
|
954
|
+
* wildcards (such as '*' or 'storage.*') are not allowed. For more
|
|
955
|
+
* information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }.
|
|
956
|
+
* @param {Object} [options]
|
|
957
|
+
* Optional parameters. You can override the default settings for this call, e.g, timeout,
|
|
958
|
+
* retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
|
|
959
|
+
* @param {function(?Error, ?Object)} [callback]
|
|
960
|
+
* The function which will be called with the result of the API call.
|
|
961
|
+
*
|
|
962
|
+
* The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
|
|
963
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
964
|
+
* The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
|
|
965
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
|
966
|
+
*/
|
|
967
|
+
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]>;
|
|
968
|
+
/**
|
|
969
|
+
* Returns permissions that a caller has on the specified resource. If the
|
|
970
|
+
* resource does not exist, this will return an empty set of
|
|
971
|
+
* permissions, not a NOT_FOUND error.
|
|
972
|
+
*
|
|
973
|
+
* Note: This operation is designed to be used for building
|
|
974
|
+
* permission-aware UIs and command-line tools, not for authorization
|
|
975
|
+
* checking. This operation may "fail open" without warning.
|
|
976
|
+
*
|
|
977
|
+
* @param {Object} request
|
|
978
|
+
* The request object that will be sent.
|
|
979
|
+
* @param {string} request.resource
|
|
980
|
+
* REQUIRED: The resource for which the policy detail is being requested.
|
|
981
|
+
* See the operation documentation for the appropriate value for this field.
|
|
982
|
+
* @param {string[]} request.permissions
|
|
983
|
+
* The set of permissions to check for the `resource`. Permissions with
|
|
984
|
+
* wildcards (such as '*' or 'storage.*') are not allowed. For more
|
|
985
|
+
* information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }.
|
|
986
|
+
* @param {Object} [options]
|
|
987
|
+
* Optional parameters. You can override the default settings for this call, e.g, timeout,
|
|
988
|
+
* retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
|
|
989
|
+
* @param {function(?Error, ?Object)} [callback]
|
|
990
|
+
* The function which will be called with the result of the API call.
|
|
991
|
+
*
|
|
992
|
+
* The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
|
|
993
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
994
|
+
* The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
|
|
995
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
|
996
|
+
*
|
|
997
|
+
*/
|
|
998
|
+
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]>;
|
|
999
|
+
/**
|
|
1000
|
+
* Return a fully-qualified cryptoKey resource name string.
|
|
1001
|
+
*
|
|
1002
|
+
* @param {string} project
|
|
1003
|
+
* @param {string} location
|
|
1004
|
+
* @param {string} key_ring
|
|
1005
|
+
* @param {string} crypto_key
|
|
1006
|
+
* @returns {string} Resource name string.
|
|
1007
|
+
*/
|
|
1008
|
+
cryptoKeyPath(project: string, location: string, keyRing: string, cryptoKey: string): string;
|
|
1009
|
+
/**
|
|
1010
|
+
* Parse the project from CryptoKey resource.
|
|
1011
|
+
*
|
|
1012
|
+
* @param {string} cryptoKeyName
|
|
1013
|
+
* A fully-qualified path representing CryptoKey resource.
|
|
1014
|
+
* @returns {string} A string representing the project.
|
|
1015
|
+
*/
|
|
1016
|
+
matchProjectFromCryptoKeyName(cryptoKeyName: string): string | number;
|
|
1017
|
+
/**
|
|
1018
|
+
* Parse the location from CryptoKey resource.
|
|
1019
|
+
*
|
|
1020
|
+
* @param {string} cryptoKeyName
|
|
1021
|
+
* A fully-qualified path representing CryptoKey resource.
|
|
1022
|
+
* @returns {string} A string representing the location.
|
|
1023
|
+
*/
|
|
1024
|
+
matchLocationFromCryptoKeyName(cryptoKeyName: string): string | number;
|
|
1025
|
+
/**
|
|
1026
|
+
* Parse the key_ring from CryptoKey resource.
|
|
1027
|
+
*
|
|
1028
|
+
* @param {string} cryptoKeyName
|
|
1029
|
+
* A fully-qualified path representing CryptoKey resource.
|
|
1030
|
+
* @returns {string} A string representing the key_ring.
|
|
1031
|
+
*/
|
|
1032
|
+
matchKeyRingFromCryptoKeyName(cryptoKeyName: string): string | number;
|
|
1033
|
+
/**
|
|
1034
|
+
* Parse the crypto_key from CryptoKey resource.
|
|
1035
|
+
*
|
|
1036
|
+
* @param {string} cryptoKeyName
|
|
1037
|
+
* A fully-qualified path representing CryptoKey resource.
|
|
1038
|
+
* @returns {string} A string representing the crypto_key.
|
|
1039
|
+
*/
|
|
1040
|
+
matchCryptoKeyFromCryptoKeyName(cryptoKeyName: string): string | number;
|
|
1041
|
+
/**
|
|
1042
|
+
* Return a fully-qualified project resource name string.
|
|
1043
|
+
*
|
|
1044
|
+
* @param {string} project
|
|
1045
|
+
* @returns {string} Resource name string.
|
|
1046
|
+
*/
|
|
1047
|
+
projectPath(project: string): string;
|
|
1048
|
+
/**
|
|
1049
|
+
* Parse the project from Project resource.
|
|
1050
|
+
*
|
|
1051
|
+
* @param {string} projectName
|
|
1052
|
+
* A fully-qualified path representing Project resource.
|
|
1053
|
+
* @returns {string} A string representing the project.
|
|
1054
|
+
*/
|
|
1055
|
+
matchProjectFromProjectName(projectName: string): string | number;
|
|
1056
|
+
/**
|
|
1057
|
+
* Return a fully-qualified projectTopics resource name string.
|
|
1058
|
+
*
|
|
1059
|
+
* @param {string} project
|
|
1060
|
+
* @param {string} topic
|
|
1061
|
+
* @returns {string} Resource name string.
|
|
1062
|
+
*/
|
|
1063
|
+
projectTopicsPath(project: string, topic: string): string;
|
|
1064
|
+
/**
|
|
1065
|
+
* Parse the project from ProjectTopics resource.
|
|
1066
|
+
*
|
|
1067
|
+
* @param {string} projectTopicsName
|
|
1068
|
+
* A fully-qualified path representing project_topics resource.
|
|
1069
|
+
* @returns {string} A string representing the project.
|
|
1070
|
+
*/
|
|
1071
|
+
matchProjectFromProjectTopicsName(projectTopicsName: string): string | number;
|
|
1072
|
+
/**
|
|
1073
|
+
* Parse the topic from ProjectTopics resource.
|
|
1074
|
+
*
|
|
1075
|
+
* @param {string} projectTopicsName
|
|
1076
|
+
* A fully-qualified path representing project_topics resource.
|
|
1077
|
+
* @returns {string} A string representing the topic.
|
|
1078
|
+
*/
|
|
1079
|
+
matchTopicFromProjectTopicsName(projectTopicsName: string): string | number;
|
|
1080
|
+
/**
|
|
1081
|
+
* Return a fully-qualified schema resource name string.
|
|
1082
|
+
*
|
|
1083
|
+
* @param {string} project
|
|
1084
|
+
* @param {string} schema
|
|
1085
|
+
* @returns {string} Resource name string.
|
|
1086
|
+
*/
|
|
1087
|
+
schemaPath(project: string, schema: string): string;
|
|
1088
|
+
/**
|
|
1089
|
+
* Parse the project from Schema resource.
|
|
1090
|
+
*
|
|
1091
|
+
* @param {string} schemaName
|
|
1092
|
+
* A fully-qualified path representing Schema resource.
|
|
1093
|
+
* @returns {string} A string representing the project.
|
|
1094
|
+
*/
|
|
1095
|
+
matchProjectFromSchemaName(schemaName: string): string | number;
|
|
1096
|
+
/**
|
|
1097
|
+
* Parse the schema from Schema resource.
|
|
1098
|
+
*
|
|
1099
|
+
* @param {string} schemaName
|
|
1100
|
+
* A fully-qualified path representing Schema resource.
|
|
1101
|
+
* @returns {string} A string representing the schema.
|
|
1102
|
+
*/
|
|
1103
|
+
matchSchemaFromSchemaName(schemaName: string): string | number;
|
|
1104
|
+
/**
|
|
1105
|
+
* Return a fully-qualified snapshot resource name string.
|
|
1106
|
+
*
|
|
1107
|
+
* @param {string} project
|
|
1108
|
+
* @param {string} snapshot
|
|
1109
|
+
* @returns {string} Resource name string.
|
|
1110
|
+
*/
|
|
1111
|
+
snapshotPath(project: string, snapshot: string): string;
|
|
1112
|
+
/**
|
|
1113
|
+
* Parse the project from Snapshot resource.
|
|
1114
|
+
*
|
|
1115
|
+
* @param {string} snapshotName
|
|
1116
|
+
* A fully-qualified path representing Snapshot resource.
|
|
1117
|
+
* @returns {string} A string representing the project.
|
|
1118
|
+
*/
|
|
1119
|
+
matchProjectFromSnapshotName(snapshotName: string): string | number;
|
|
1120
|
+
/**
|
|
1121
|
+
* Parse the snapshot from Snapshot resource.
|
|
1122
|
+
*
|
|
1123
|
+
* @param {string} snapshotName
|
|
1124
|
+
* A fully-qualified path representing Snapshot resource.
|
|
1125
|
+
* @returns {string} A string representing the snapshot.
|
|
1126
|
+
*/
|
|
1127
|
+
matchSnapshotFromSnapshotName(snapshotName: string): string | number;
|
|
1128
|
+
/**
|
|
1129
|
+
* Return a fully-qualified subscription resource name string.
|
|
1130
|
+
*
|
|
1131
|
+
* @param {string} project
|
|
1132
|
+
* @param {string} subscription
|
|
1133
|
+
* @returns {string} Resource name string.
|
|
1134
|
+
*/
|
|
1135
|
+
subscriptionPath(project: string, subscription: string): string;
|
|
1136
|
+
/**
|
|
1137
|
+
* Parse the project from Subscription resource.
|
|
1138
|
+
*
|
|
1139
|
+
* @param {string} subscriptionName
|
|
1140
|
+
* A fully-qualified path representing Subscription resource.
|
|
1141
|
+
* @returns {string} A string representing the project.
|
|
1142
|
+
*/
|
|
1143
|
+
matchProjectFromSubscriptionName(subscriptionName: string): string | number;
|
|
1144
|
+
/**
|
|
1145
|
+
* Parse the subscription from Subscription resource.
|
|
1146
|
+
*
|
|
1147
|
+
* @param {string} subscriptionName
|
|
1148
|
+
* A fully-qualified path representing Subscription resource.
|
|
1149
|
+
* @returns {string} A string representing the subscription.
|
|
1150
|
+
*/
|
|
1151
|
+
matchSubscriptionFromSubscriptionName(subscriptionName: string): string | number;
|
|
1152
|
+
/**
|
|
1153
|
+
* Terminate the gRPC channel and close the client.
|
|
1154
|
+
*
|
|
1155
|
+
* The client will no longer be usable and all future behavior is undefined.
|
|
1156
|
+
* @returns {Promise} A promise that resolves when the client is closed.
|
|
1157
|
+
*/
|
|
1158
|
+
close(): Promise<void>;
|
|
1159
|
+
}
|