Package Classes (2.27.0)

Summary of entries of Classes for pubsub.

Classes

Client

A publisher client for Google Cloud Pub/Sub.

This creates an object that is capable of publishing messages. Generally, you can instantiate this client with no arguments, and you get sensible defaults.

Future

This future object is returned from asychronous Pub/Sub publishing calls.

Calling result will resolve the future by returning the message ID, unless an error occurs.

Client

A subscriber client for Google Cloud Pub/Sub.

This creates an object that is capable of subscribing to messages. Generally, you can instantiate this client with no arguments, and you get sensible defaults.

Future

This future object is for subscribe-side calls.

Calling result will resolve the future by returning the message ID, unless an error occurs.

StreamingPullFuture

Represents a process that asynchronously performs streaming pull and schedules messages to be processed.

This future is resolved when the process is stopped (via cancel) or if it encounters an unrecoverable error. Calling .result() will cause the calling thread to block indefinitely.

Message

A representation of a single Pub/Sub message.

The common way to interact with .pubsub_v1.subscriber.message.Message objects is to receive them in callbacks on subscriptions; most users should never have a need to instantiate them by hand. (The exception to this is if you are implementing a custom subclass to .pubsub_v1.subscriber._consumer.Consumer.)

Scheduler

Abstract base class for schedulers.

Schedulers are used to schedule callbacks asynchronously.

ThreadScheduler

A thread pool-based scheduler. It must not be shared across SubscriberClients.

This scheduler is useful in typical I/O-bound message processing.

AcknowledgeRequest

Request for the Acknowledge method.

AuditConfig

API documentation for pubsub_v1.types.AuditConfig class.

AuditConfigDelta

API documentation for pubsub_v1.types.AuditConfigDelta class.

AuditData

API documentation for pubsub_v1.types.AuditData class.

AuditLogConfig

API documentation for pubsub_v1.types.AuditLogConfig class.

BatchSettings

The settings for batch publishing the messages.

BigQueryConfig

Configuration for a BigQuery subscription.

State

Possible states for a BigQuery subscription.

    -  Pub/Sub SA has not been granted the `appropriate BigQuery
       IAM
       permissions <https://cloud.google.com/pubsub/docs/create-subscription#assign_bigquery_service_account>`__
    -  bigquery.googleapis.com API is not enabled for the
       project
       (`instructions <https://cloud.google.com/service-usage/docs/enable-disable>`__)
NOT_FOUND (3):
    Cannot write to the BigQuery table because it
    does not exist.
SCHEMA_MISMATCH (4):
    Cannot write to the BigQuery table due to a
    schema mismatch.
IN_TRANSIT_LOCATION_RESTRICTION (5):
    Cannot write to the destination because enforce_in_transit
    is set to true and the destination locations are not in the
    allowed regions.

Binding

API documentation for pubsub_v1.types.Binding class.

BindingDelta

API documentation for pubsub_v1.types.BindingDelta class.

CloudStorageConfig

Configuration for a Cloud Storage subscription.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

AvroConfig

Configuration for writing message data in Avro format. Message payloads and metadata will be written to files as an Avro binary.

State

Possible states for a Cloud Storage subscription.

TextConfig

Configuration for writing message data in text format. Message payloads will be written to files as raw text, separated by a newline.

CreateSnapshotRequest

Request for the CreateSnapshot method.

LabelsEntry

The abstract base class for a message.

CustomHttpPattern

API documentation for pubsub_v1.types.CustomHttpPattern class.

DeadLetterPolicy

Dead lettering is done on a best effort basis. The same message might be dead lettered multiple times.

If validation on any of the fields fails at subscription creation/updation, the create/update subscription request will fail.

DeleteSnapshotRequest

Request for the DeleteSnapshot method.

DeleteSubscriptionRequest

Request for the DeleteSubscription method.

DeleteTopicRequest

Request for the DeleteTopic method.

DescriptorProto

API documentation for pubsub_v1.types.DescriptorProto class.

ExtensionRange

API documentation for pubsub_v1.types.DescriptorProto.ExtensionRange class.

ReservedRange

API documentation for pubsub_v1.types.DescriptorProto.ReservedRange class.

DetachSubscriptionRequest

Request for the DetachSubscription method.

DetachSubscriptionResponse

Response for the DetachSubscription method. Reserved for future use.

Duration

API documentation for pubsub_v1.types.Duration class.

Empty

API documentation for pubsub_v1.types.Empty class.

EnumDescriptorProto

API documentation for pubsub_v1.types.EnumDescriptorProto class.

EnumReservedRange

API documentation for pubsub_v1.types.EnumDescriptorProto.EnumReservedRange class.

EnumOptions

API documentation for pubsub_v1.types.EnumOptions class.

EnumValueDescriptorProto

API documentation for pubsub_v1.types.EnumValueDescriptorProto class.

EnumValueOptions

API documentation for pubsub_v1.types.EnumValueOptions class.

ExpirationPolicy

A policy that specifies the conditions for resource expiration (i.e., automatic resource deletion).

ExtensionRangeOptions

API documentation for pubsub_v1.types.ExtensionRangeOptions class.

Declaration

API documentation for pubsub_v1.types.ExtensionRangeOptions.Declaration class.

FeatureSet

API documentation for pubsub_v1.types.FeatureSet class.

FeatureSetDefaults

API documentation for pubsub_v1.types.FeatureSetDefaults class.

FeatureSetEditionDefault

API documentation for pubsub_v1.types.FeatureSetDefaults.FeatureSetEditionDefault class.

FieldDescriptorProto

API documentation for pubsub_v1.types.FieldDescriptorProto class.

FieldMask

API documentation for pubsub_v1.types.FieldMask class.

FieldOptions

API documentation for pubsub_v1.types.FieldOptions class.

EditionDefault

API documentation for pubsub_v1.types.FieldOptions.EditionDefault class.

FeatureSupport

API documentation for pubsub_v1.types.FieldOptions.FeatureSupport class.

FileDescriptorProto

API documentation for pubsub_v1.types.FileDescriptorProto class.

FileDescriptorSet

API documentation for pubsub_v1.types.FileDescriptorSet class.

FileOptions

API documentation for pubsub_v1.types.FileOptions class.

FlowControl

The settings for controlling the rate at which messages are pulled with an asynchronous subscription.

GeneratedCodeInfo

API documentation for pubsub_v1.types.GeneratedCodeInfo class.

Annotation

API documentation for pubsub_v1.types.GeneratedCodeInfo.Annotation class.

GetIamPolicyRequest

API documentation for pubsub_v1.types.GetIamPolicyRequest class.

GetSnapshotRequest

Request for the GetSnapshot method.

GetSubscriptionRequest

Request for the GetSubscription method.

GetTopicRequest

Request for the GetTopic method.

Http

API documentation for pubsub_v1.types.Http class.

HttpRule

API documentation for pubsub_v1.types.HttpRule class.

IngestionDataSourceSettings

Settings for an ingestion data source on a topic.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

AwsKinesis

Ingestion settings for Amazon Kinesis Data Streams.

State

Possible states for ingestion from Amazon Kinesis Data Streams.

    -  The provided `aws_role_arn` does not exist or does not
       have the appropriate permissions attached.
    -  The provided `aws_role_arn` is not set up properly for
       Identity Federation using `gcp_service_account`.
    -  The Pub/Sub SA is not granted the
       `iam.serviceAccounts.getOpenIdToken` permission on
       `gcp_service_account`.
PUBLISH_PERMISSION_DENIED (3):
    Permission denied encountered while publishing to the topic.
    This can happen if the Pub/Sub SA has not been granted the
    `appropriate publish
    permissions <https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher>`__
STREAM_NOT_FOUND (4):
    The Kinesis stream does not exist.
CONSUMER_NOT_FOUND (5):
    The Kinesis consumer does not exist.

CloudStorage

Ingestion settings for Cloud Storage.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

AvroFormat

Configuration for reading Cloud Storage data in Avro binary format. The bytes of each object will be set to the data field of a Pub/Sub message.

PubSubAvroFormat

Configuration for reading Cloud Storage data written via Cloud Storage subscriptions <https://cloud.google.com/pubsub/docs/cloudstorage>__. The data and attributes fields of the originally exported Pub/Sub message will be restored when publishing.

State

Possible states for ingestion from Cloud Storage.

    -  storage.objects.list: to list the objects in a bucket.
    -  storage.objects.get: to read the objects in a bucket.
    -  storage.buckets.get: to verify the bucket exists.
PUBLISH_PERMISSION_DENIED (3):
    Permission denied encountered while publishing to the topic.
    This can happen if the Pub/Sub SA has not been granted the
    `appropriate publish
    permissions <https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher>`__
BUCKET_NOT_FOUND (4):
    The provided Cloud Storage bucket doesn't
    exist.
TOO_MANY_OBJECTS (5):
    The Cloud Storage bucket has too many
    objects, ingestion will be paused.

TextFormat

Configuration for reading Cloud Storage data in text format. Each line of text as specified by the delimiter will be set to the data field of a Pub/Sub message.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

LimitExceededBehavior

The possible actions when exceeding the publish flow control limits.

ListSnapshotsRequest

Request for the ListSnapshots method.

ListSnapshotsResponse

Response for the ListSnapshots method.

ListSubscriptionsRequest

Request for the ListSubscriptions method.

ListSubscriptionsResponse

Response for the ListSubscriptions method.

ListTopicSnapshotsRequest

Request for the ListTopicSnapshots method.

ListTopicSnapshotsResponse

Response for the ListTopicSnapshots method.

ListTopicSubscriptionsRequest

Request for the ListTopicSubscriptions method.

ListTopicSubscriptionsResponse

Response for the ListTopicSubscriptions method.

ListTopicsRequest

Request for the ListTopics method.

ListTopicsResponse

Response for the ListTopics method.

MessageOptions

API documentation for pubsub_v1.types.MessageOptions class.

MessageStoragePolicy

A policy constraining the storage of messages published to the topic.

MethodDescriptorProto

API documentation for pubsub_v1.types.MethodDescriptorProto class.

MethodOptions

API documentation for pubsub_v1.types.MethodOptions class.

ModifyAckDeadlineRequest

Request for the ModifyAckDeadline method.

ModifyPushConfigRequest

Request for the ModifyPushConfig method.

OneofDescriptorProto

API documentation for pubsub_v1.types.OneofDescriptorProto class.

OneofOptions

API documentation for pubsub_v1.types.OneofOptions class.

PlatformLogsSettings

Settings for Platform Logs produced by Pub/Sub.

Severity

Severity levels of Platform Logs.

Policy

API documentation for pubsub_v1.types.Policy class.

PolicyDelta

API documentation for pubsub_v1.types.PolicyDelta class.

PublishFlowControl

The client flow control settings for message publishing.

PublishRequest

Request for the Publish method.

PublishResponse

Response for the Publish method.

PublisherOptions

The options for the publisher client.

PubsubMessage

A message that is published by publishers and consumed by subscribers. The message must contain either a non-empty data field or at least one attribute. Note that client libraries represent this object differently depending on the language. See the corresponding client library documentation <https://cloud.google.com/pubsub/docs/reference/libraries>__ for more information. See quotas and limits for more information about message limits.

AttributesEntry

The abstract base class for a message.

PullRequest

Request for the Pull method.

PullResponse

Response for the Pull method.

PushConfig

Configuration for a push delivery endpoint.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

AttributesEntry

The abstract base class for a message.

NoWrapper

Sets the data field as the HTTP body for delivery.

OidcToken

Contains information needed for generating an OpenID Connect token <https://developers.google.com/identity/protocols/OpenIDConnect>__.

PubsubWrapper

The payload to the push endpoint is in the form of the JSON representation of a PubsubMessage (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).

ReceivedMessage

A message and its corresponding acknowledgment ID.

RetryPolicy

A policy that specifies how Pub/Sub retries message delivery.

Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.

RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message.

Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.

SchemaSettings

Settings for validating messages published against a schema.

SeekRequest

Request for the Seek method.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

SeekResponse

Response for the Seek method (this response is empty).

ServiceDescriptorProto

API documentation for pubsub_v1.types.ServiceDescriptorProto class.

ServiceOptions

API documentation for pubsub_v1.types.ServiceOptions class.

SetIamPolicyRequest

API documentation for pubsub_v1.types.SetIamPolicyRequest class.

Snapshot

A snapshot resource. Snapshots are used in Seek <https://cloud.google.com/pubsub/docs/replay-overview>__ operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.

LabelsEntry

The abstract base class for a message.

SourceCodeInfo

API documentation for pubsub_v1.types.SourceCodeInfo class.

Location

API documentation for pubsub_v1.types.SourceCodeInfo.Location class.

StreamingPullRequest

Request for the StreamingPull streaming RPC method. This request is used to establish the initial stream as well as to stream acknowledgements and ack deadline modifications from the client to the server.

StreamingPullResponse

Response for the StreamingPull method. This response is used to stream messages from the server to the client.

AcknowledgeConfirmation

Acknowledgement IDs sent in one or more previous requests to acknowledge a previously received message.

ModifyAckDeadlineConfirmation

Acknowledgement IDs sent in one or more previous requests to modify the deadline for a specific message.

SubscriptionProperties

Subscription properties sent as part of the response.

Subscription

A subscription resource. If none of push_config, bigquery_config, or cloud_storage_config is set, then the subscriber will pull and ack messages using API methods. At most one of these fields may be set.

AnalyticsHubSubscriptionInfo

Information about an associated Analytics Hub subscription (https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).

LabelsEntry

The abstract base class for a message.

State

Possible states for a subscription.

TestIamPermissionsRequest

API documentation for pubsub_v1.types.TestIamPermissionsRequest class.

TestIamPermissionsResponse

API documentation for pubsub_v1.types.TestIamPermissionsResponse class.

Timestamp

API documentation for pubsub_v1.types.Timestamp class.

Topic

A topic resource.

LabelsEntry

The abstract base class for a message.

State

The state of the topic.

UninterpretedOption

API documentation for pubsub_v1.types.UninterpretedOption class.

NamePart

API documentation for pubsub_v1.types.UninterpretedOption.NamePart class.

UpdateSnapshotRequest

Request for the UpdateSnapshot method.

UpdateSubscriptionRequest

Request for the UpdateSubscription method.

UpdateTopicRequest

Request for the UpdateTopic method.

ListTopicSnapshotsAsyncPager

A pager for iterating through list_topic_snapshots requests.

This class thinly wraps an initial google.pubsub_v1.types.ListTopicSnapshotsResponse object, and provides an __aiter__ method to iterate through its snapshots field.

If there are more pages, the __aiter__ method will make additional ListTopicSnapshots requests and continue to iterate through the snapshots field on the corresponding responses.

All the usual google.pubsub_v1.types.ListTopicSnapshotsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

ListTopicSnapshotsPager

A pager for iterating through list_topic_snapshots requests.

This class thinly wraps an initial google.pubsub_v1.types.ListTopicSnapshotsResponse object, and provides an __iter__ method to iterate through its snapshots field.

If there are more pages, the __iter__ method will make additional ListTopicSnapshots requests and continue to iterate through the snapshots field on the corresponding responses.

All the usual google.pubsub_v1.types.ListTopicSnapshotsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

ListTopicSubscriptionsAsyncPager

A pager for iterating through list_topic_subscriptions requests.

This class thinly wraps an initial google.pubsub_v1.types.ListTopicSubscriptionsResponse object, and provides an __aiter__ method to iterate through its subscriptions field.

If there are more pages, the __aiter__ method will make additional ListTopicSubscriptions requests and continue to iterate through the subscriptions field on the corresponding responses.

All the usual google.pubsub_v1.types.ListTopicSubscriptionsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

ListTopicSubscriptionsPager

A pager for iterating through list_topic_subscriptions requests.

This class thinly wraps an initial google.pubsub_v1.types.ListTopicSubscriptionsResponse object, and provides an __iter__ method to iterate through its subscriptions field.

If there are more pages, the __iter__ method will make additional ListTopicSubscriptions requests and continue to iterate through the subscriptions field on the corresponding responses.

All the usual google.pubsub_v1.types.ListTopicSubscriptionsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

ListTopicsAsyncPager

A pager for iterating through list_topics requests.

This class thinly wraps an initial google.pubsub_v1.types.ListTopicsResponse object, and provides an __aiter__ method to iterate through its topics field.

If there are more pages, the __aiter__ method will make additional ListTopics requests and continue to iterate through the topics field on the corresponding responses.

All the usual google.pubsub_v1.types.ListTopicsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

ListTopicsPager

A pager for iterating through list_topics requests.

This class thinly wraps an initial google.pubsub_v1.types.ListTopicsResponse object, and provides an __iter__ method to iterate through its topics field.

If there are more pages, the __iter__ method will make additional ListTopics requests and continue to iterate through the topics field on the corresponding responses.

All the usual google.pubsub_v1.types.ListTopicsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

ListSnapshotsAsyncPager

A pager for iterating through list_snapshots requests.

This class thinly wraps an initial google.pubsub_v1.types.ListSnapshotsResponse object, and provides an __aiter__ method to iterate through its snapshots field.

If there are more pages, the __aiter__ method will make additional ListSnapshots requests and continue to iterate through the snapshots field on the corresponding responses.

All the usual google.pubsub_v1.types.ListSnapshotsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

ListSnapshotsPager

A pager for iterating through list_snapshots requests.

This class thinly wraps an initial google.pubsub_v1.types.ListSnapshotsResponse object, and provides an __iter__ method to iterate through its snapshots field.

If there are more pages, the __iter__ method will make additional ListSnapshots requests and continue to iterate through the snapshots field on the corresponding responses.

All the usual google.pubsub_v1.types.ListSnapshotsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

ListSubscriptionsAsyncPager

A pager for iterating through list_subscriptions requests.

This class thinly wraps an initial google.pubsub_v1.types.ListSubscriptionsResponse object, and provides an __aiter__ method to iterate through its subscriptions field.

If there are more pages, the __aiter__ method will make additional ListSubscriptions requests and continue to iterate through the subscriptions field on the corresponding responses.

All the usual google.pubsub_v1.types.ListSubscriptionsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

ListSubscriptionsPager

A pager for iterating through list_subscriptions requests.

This class thinly wraps an initial google.pubsub_v1.types.ListSubscriptionsResponse object, and provides an __iter__ method to iterate through its subscriptions field.

If there are more pages, the __iter__ method will make additional ListSubscriptions requests and continue to iterate through the subscriptions field on the corresponding responses.

All the usual google.pubsub_v1.types.ListSubscriptionsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Modules

publisher.client

API documentation for pubsub_v1.publisher.client module.

publisher.futures

API documentation for pubsub_v1.publisher.futures module.

subscriber.client

API documentation for pubsub_v1.subscriber.client module.

subscriber.futures

API documentation for pubsub_v1.subscriber.futures module.

scheduler

Schedulers provide means to schedule callbacks asynchronously.

These are used by the subscriber to call the user-provided callback to process each message.

types

API documentation for pubsub_v1.types module.

publisher.pagers

API documentation for pubsub_v1.services.publisher.pagers module.

subscriber.pagers

API documentation for pubsub_v1.services.subscriber.pagers module.