dis+/node_modules/@google-cloud/pubsub/build/src/v1/subscriber_client.js
/**
     * Updates an existing subscription. Note that certain properties of a
     * subscription, such as its topic, are not modifiable.
     *
     * @param {Object} request
     *   The request object that will be sent.
     * @param {google.pubsub.v1.Subscription} request.subscription
     *   Required. The updated subscription object.
     * @param {google.protobuf.FieldMask} request.updateMask
     *   Required. Indicates which fields in the provided subscription to update.
     *   Must be specified and non-empty.
     * @param {object} [options]
     *   Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
     * @returns {Promise} - The promise which resolves to an array.
     *   The first element of the array is an object representing [Subscription]{@link google.pubsub.v1.Subscription}.
     *   Please see the
     *   [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
     *   for more details and examples.
     * @example
     * const [response] = await client.updateSubscription(request);
     */
Updates an existing subscription. Note that certain properties of a
subscription, such as its topic, are not modifiable.

@param {Object} request
The request object that will be sent.
Updates an existing subscription . Note that certain properties of a subscription such as its topic are not modifiable . @param { Object } request The request object that will be sent .
updateSubscription(request, optionsOrCallback, callback) {
        request = request || {};
        let options;
        if (typeof optionsOrCallback === 'function' && callback === undefined) {
            callback = optionsOrCallback;
            options = {};
        }
        else {
            options = optionsOrCallback;
        }
        options = options || {};
        options.otherArgs = options.otherArgs || {};
        options.otherArgs.headers = options.otherArgs.headers || {};
        options.otherArgs.headers['x-goog-request-params'] =
            gax.routingHeader.fromParams({
                'subscription.name': request.subscription.name || '',
            });
        this.initialize();
        return this.innerApiCalls.updateSubscription(request, options, callback);
    }
updateSubscription ( request , optionsOrCallback , callback ) { request = request || { } ; let options ; if ( typeof optionsOrCallback === 'function' && callback === undefined ) { callback = optionsOrCallback ; options = { } ; } else { options = optionsOrCallback ; } options = options || { } ; options . otherArgs = options . otherArgs || { } ; options . otherArgs . headers = options . otherArgs . headers || { } ; options . otherArgs . headers [ 'x-goog-request-params' ] = gax . routingHeader . fromParams ( { 'subscription.name' : request . subscription . name || '' , } ) ; this . initialize ( ) ; return this . innerApiCalls . updateSubscription ( request , options , callback ) ; }
Updates an existing subscription.
Updates an existing subscription .