Globals

Abstract types

ClientConfig

object

Properties

Parameter

projectId

Optional

string

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

keyFilename

Optional

string

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option above is not necessary. NOTE: .pem and .p12 require you to specify the email option as well.

apiEndpoint

Optional

string

The apiEndpoint from options will set the host. If not set, the PUBSUB_EMULATOR_HOST environment variable from the gcloud SDK is honored, otherwise the actual API endpoint will be used.

email

Optional

string

Account email address. Required when using a .pem or .p12 keyFilename.

credentials

Optional

object

Credentials object.

autoRetry

Optional

boolean

Automatically retry requests if the response is related to rate limits or certain intermittent server errors. We will exponentially backoff subsequent requests by default.

maxRetries

Optional

number

Maximum number of automatic retries attempted before returning the error.

promise

Optional

Constructor

Custom promise module to use instead of native Promises.

CreateSnapshotCallback

CreateSnapshotCallback(err, snapshot, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

snapshot

Snapshot

The new Snapshot.

apiResponse

object

The full API response.

CreateSnapshotResponse

array

Properties

Parameter

0

Snapshot

The new Snapshot.

1

object

The full API response.

CreateSubscriptionCallback

CreateSubscriptionCallback(err, subscription, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

subscription

Subscription

The new Subscription.

apiResponse

object

The full API response.

CreateSubscriptionRequest

object

Options for creating a subscription.

See a Subscription resource.

Properties

Parameter

flowControl

Optional

object

Flow control configurations for receiving messages. Note that these options do not persist across subscription instances.

gaxOpts

Optional

object

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html.

messageRetentionDuration

Optional

(number or date)

Set this to override the default duration of 7 days. This value is expected in seconds. Acceptable values are in the range of 10 minutes and 7 days.

pushEndpoint

Optional

string

A URL to a custom endpoint that messages should be pushed to.

retainAckedMessages

Optional

boolean

If set, acked messages are retained in the subscription's backlog for the length of time specified by options.messageRetentionDuration.

CreateSubscriptionResponse

array

Properties

Parameter

0

Subscription

The new Subscription.

1

object

The full API response.

CreateTopicCallback

CreateTopicCallback(err, topic, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

topic

Topic

The new Topic.

apiResponse

object

The full API response.

CreateTopicResponse

array

Properties

Parameter

0

Topic

The new Topic.

1

object

The full API response.

GetPolicyCallback

GetPolicyCallback(err, acl, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

acl

object

The policy.

apiResponse

object

The full API response.

GetPolicyResponse

array

Properties

Parameter

0

object

The policy.

1

object

The full API response.

GetSnapshotsCallback

GetSnapshotsCallback(err, snapshots, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

snapshots

Array of Snapshot

Array of Snapshot instances.

apiResponse

object

The full API response.

GetSnapshotsRequest

object

Query object for listing snapshots.

Properties

Parameter

autoPaginate

Optional

boolean

Have pagination handled automatically.

options.gaxOpts

Optional

object

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html.

options.pageSize

Optional

number

Maximum number of results to return.

options.pageToken

Optional

string

Page token.

GetSnapshotsResponse

array

Properties

Parameter

0

Array of Snapshot

Array of Snapshot instances.

1

object

The full API response.

GetSubscriptionCallback

GetSubscriptionCallback(err, subscription, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

subscription

Subscription

The Subscription.

apiResponse

object

The full API response.

GetSubscriptionMetadataCallback

GetSubscriptionMetadataCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

GetSubscriptionMetadataResponse

array

Property

Parameter

0

object

The full API response.

GetSubscriptionResponse

array

Properties

Parameter

0

Subscription

The Subscription.

1

object

The full API response.

GetSubscriptionsCallback

GetSubscriptionsCallback(err, subscriptions, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

subscriptions

Array of Subscription

Array of Subscription instances.

apiResponse

object

The full API response.

GetSubscriptionsRequest

object

Query object for listing subscriptions.

Parameter

options.topic

(string or Topic)

The name of the topic to list subscriptions from.

Properties

Parameter

autoPaginate

Optional

boolean

Have pagination handled automatically.

options.gaxOpts

Optional

object

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html.

options.pageSize

Optional

number

Maximum number of results to return.

options.pageToken

Optional

string

Page token.

GetSubscriptionsResponse

array

Properties

Parameter

0

Array of Subscription

Array of Subscription instances.

1

object

The full API response.

GetTopicCallback

GetTopicCallback(err, topic, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

topic

Topic

The Topic.

apiResponse

object

The full API response.

GetTopicMetadataCallback

GetTopicMetadataCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

GetTopicMetadataResponse

array

Property

Parameter

0

object

The full API response.

GetTopicResponse

array

Properties

Parameter

0

Topic

The Topic.

1

object

The full API response.

GetTopicsCallback

GetTopicsCallback(err, topics, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

topics

Array of Topic

Array of Topic instances.

apiResponse

object

The full API response.

GetTopicsRequest

object

Query object for listing topics.

Properties

Parameter

autoPaginate

Optional

boolean

Have pagination handled automatically.

options.gaxOpts

Optional

object

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html.

options.pageSize

Optional

number

Maximum number of results to return.

options.pageToken

Optional

string

Page token.

GetTopicsResponse

array

Properties

Parameter

0

Array of Topic

Array of Topic instances.

1

object

The full API response.

ModifyPushConfigCallback

ModifyPushConfigCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

ModifyPushConfigResponse

array

Property

Parameter

0

object

The full API response.

PublisherPublishCallback

PublisherPublishCallback(err, messageId)

Parameter

err

Error

Request error, if any.

Value may be null.

messageId

string

The id for the message.

PublisherPublishResponse

array

Property

Parameter

0

string

The id for the message.

SeekCallback

SeekCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

SeekResponse

array

Property

Parameter

0

object

The full API response.

SetPolicyCallback

SetPolicyCallback(err, acl, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

acl

object

The policy.

apiResponse

object

The full API response.

SetPolicyResponse

array

Properties

Parameter

0

object

The policy.

1

object

The full API response.

SetSubscriptionMetadataCallback

SetSubscriptionMetadataCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

SetSubscriptionMetadataResponse

array

Property

Parameter

0

object

The full API response.

SubscriptionExistsCallback

SubscriptionExistsCallback(err, exists)

Parameter

err

Error

Request error, if any.

Value may be null.

exists

boolean

Whether the subscription exists.

SubscriptionExistsResponse

array

Property

Parameter

0

boolean

Whether the subscription exists

TestIamPermissionsCallback

TestIamPermissionsCallback(err, permissions, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

permissions

Array of object

A subset of permissions that the caller is allowed.

apiResponse

object

The full API response.

TestIamPermissionsResponse

array

Properties

Parameter

0

Array of object

A subset of permissions that the caller is allowed.

1

object

The full API response.

TopicExistsCallback

TopicExistsCallback(err, exists)

Parameter

err

Error

Request error, if any.

Value may be null.

exists

boolean

Whether the topic exists.

TopicExistsResponse

array

Property

Parameter

0

boolean

Whether the topic exists