Module types (2.11.0)

API documentation for pubsub_v1.types module.

Classes

AcknowledgeRequest

AcknowledgeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the Acknowledge method.

AuditConfigDelta

One delta entry for AuditConfig. Each individual change (only one exempted_member in each entry) to a AuditConfig will be a separate entry.

Specifies a service that was configured for Cloud Audit Logging. For example, storage.googleapis.com, cloudsql.googleapis.com. allServices is a special value that covers all services. Required

Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always enabled, and cannot be configured. Required

AuditData

Audit log information specific to Cloud IAM. This message is serialized as an Any type in the ServiceData message of an AuditLog message.

BatchSettings

BatchSettings(
    max_bytes: int = 1000000, max_latency: float = 0.01, max_messages: int = 100
)

The settings for batch publishing the messages.

Binding

Associates members with a role.

Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:

  • allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
  • allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account. - user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com . - serviceAccount:{emailid}: An email address that represents a service account. For example, my-other- app@appspot.gserviceaccount.com. - group:{emailid}: An email address that represents a Google group. For example, admins@example.com. - domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.

BindingDelta

One delta entry for Binding. Each individual change (only one member in each entry) to a binding will be a separate entry.

Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. Required

Unimplemented. The condition that is associated with this binding. This field is logged only for Cloud Audit Logging.

CreateSnapshotRequest

CreateSnapshotRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the CreateSnapshot method.

CustomHttpPattern

API documentation for pubsub_v1.types.CustomHttpPattern class.

DeadLetterPolicy

DeadLetterPolicy(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

DeleteSnapshotRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the DeleteSnapshot method.

DeleteSubscriptionRequest

DeleteSubscriptionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the DeleteSubscription method.

DeleteTopicRequest

DeleteTopicRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the DeleteTopic method.

DescriptorProto

API documentation for pubsub_v1.types.DescriptorProto class.

DetachSubscriptionRequest

DetachSubscriptionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the DetachSubscription method.

DetachSubscriptionResponse

DetachSubscriptionResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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.

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

ExpirationPolicy(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

ExtensionRangeOptions

API documentation for pubsub_v1.types.ExtensionRangeOptions 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.

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

FlowControl(
    max_bytes: int = 104857600,
    max_messages: int = 1000,
    max_lease_duration: float = 3600,
    min_duration_per_lease_extension: float = 0,
    max_duration_per_lease_extension: float = 0,
)

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

GeneratedCodeInfo

API documentation for pubsub_v1.types.GeneratedCodeInfo class.

GetIamPolicyRequest

Request message for GetIamPolicy method.

OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy. This field is only used by Cloud IAM.

GetSnapshotRequest

GetSnapshotRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the GetSnapshot method.

GetSubscriptionRequest

GetSubscriptionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the GetSubscription method.

GetTopicRequest

GetTopicRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the GetTopic method.

Http

API documentation for pubsub_v1.types.Http class.

HttpRule

API documentation for pubsub_v1.types.HttpRule class.

LimitExceededBehavior

LimitExceededBehavior(value)

The possible actions when exceeding the publish flow control limits.

ListSnapshotsRequest

ListSnapshotsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the ListSnapshots method.

ListSnapshotsResponse

ListSnapshotsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Response for the ListSnapshots method.

ListSubscriptionsRequest

ListSubscriptionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the ListSubscriptions method.

ListSubscriptionsResponse

ListSubscriptionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Response for the ListSubscriptions method.

ListTopicSnapshotsRequest

ListTopicSnapshotsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the ListTopicSnapshots method.

ListTopicSnapshotsResponse

ListTopicSnapshotsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Response for the ListTopicSnapshots method.

ListTopicSubscriptionsRequest

ListTopicSubscriptionsRequest(
    mapping=None, *, ignore_unknown_fields=False, **kwargs
)

Request for the ListTopicSubscriptions method.

ListTopicSubscriptionsResponse

ListTopicSubscriptionsResponse(
    mapping=None, *, ignore_unknown_fields=False, **kwargs
)

Response for the ListTopicSubscriptions method.

ListTopicsRequest

ListTopicsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the ListTopics method.

ListTopicsResponse

ListTopicsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Response for the ListTopics method.

MessageOptions

API documentation for pubsub_v1.types.MessageOptions class.

MessageStoragePolicy

MessageStoragePolicy(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

ModifyAckDeadlineRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the ModifyAckDeadline method.

ModifyPushConfigRequest

ModifyPushConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the ModifyPushConfig method.

OneofDescriptorProto

API documentation for pubsub_v1.types.OneofDescriptorProto class.

OneofOptions

API documentation for pubsub_v1.types.OneofOptions class.

Policy

Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.

A Policy consists of a list of bindings. A binding binds a list of members to a role, where the members can be user accounts, Google groups, Google domains, and service accounts. A role is a named list of permissions defined by IAM.

JSON Example

::

{ "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }

YAML Example

::

bindings:

  • members:
    • user:mike@example.com
    • group:admins@example.com
    • domain:google.com
    • serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner
  • members:
    • user:sean@example.com role: roles/viewer

For a description of IAM and its features, see the IAM developer’s guide <https://cloud.google.com/iam/docs>__.

Associates a list of members to a role. bindings with no members will result in an error.

PolicyDelta

The difference delta between two policies.

The delta for AuditConfigs between two policies.

PublishFlowControl

PublishFlowControl(message_limit: int = 1000, byte_limit: int = 10000000, limit_exceeded_behavior: google.cloud.pubsub_v1.types.LimitExceededBehavior = <LimitExceededBehavior.IGNORE: 'ignore'>)

The client flow control settings for message publishing.

PublishRequest

PublishRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the Publish method.

PublishResponse

PublishResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Response for the Publish method.

PublisherOptions

PublisherOptions(enable_message_ordering: bool = False, flow_control: google.cloud.pubsub_v1.types.PublishFlowControl = PublishFlowControl(message_limit=1000, byte_limit=10000000, limit_exceeded_behavior=<LimitExceededBehavior.IGNORE: 'ignore'>), retry: OptionalRetry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: OptionalTimeout = <_MethodDefault._DEFAULT_VALUE: <object object>>)

The options for the publisher client.

PubsubMessage

PubsubMessage(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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.

PullRequest

PullRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the Pull method.

PullResponse

PullResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Response for the Pull method.

PushConfig

PushConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

ReceivedMessage

ReceivedMessage(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A message and its corresponding acknowledgment ID.

RetryPolicy

RetryPolicy(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A policy that specifies how Cloud 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

SchemaSettings(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Settings for validating messages published against a schema.

SeekRequest

SeekRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

SeekResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

Request message for SetIamPolicy method.

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

Snapshot

Snapshot(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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.

SourceCodeInfo

API documentation for pubsub_v1.types.SourceCodeInfo class.

StreamingPullRequest

StreamingPullRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

StreamingPullResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

Subscription

Subscription(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A subscription resource.

TestIamPermissionsRequest

Request message for TestIamPermissions method.

The set of permissions to check for the resource. Permissions with wildcards (such as ‘’ or ’storage.’) are not allowed. For more information see IAM Overview <https://cloud.google.com/iam/docs/overview#permissions>__.

TestIamPermissionsResponse

Response message for TestIamPermissions method.

Timestamp

API documentation for pubsub_v1.types.Timestamp class.

Topic

Topic(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A topic resource.

UninterpretedOption

API documentation for pubsub_v1.types.UninterpretedOption class.

UpdateSnapshotRequest

UpdateSnapshotRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the UpdateSnapshot method.

UpdateSubscriptionRequest

UpdateSubscriptionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the UpdateSubscription method.

UpdateTopicRequest

UpdateTopicRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request for the UpdateTopic method.