Module types (1.6.1)

API documentation for pubsub_v1.types module.

Classes

AcknowledgeRequest

Request for the Acknowledge method.

Required. The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the Pull response. Must not be empty.

AuditConfigDelta

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

.. attribute:: action

The action that was performed on an audit configuration in a policy. Required

A single identity that is exempted from “data access” audit logging for the service specified above. Follows the same format of Binding.members.

AuditData

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

.. attribute:: policy_delta

Policy delta between the original policy and the newly set policy.

BatchSettings

BatchSettings(max_bytes=1000000, max_latency=0.01, max_messages=100)

The settings for batch publishing the messages.

Binding

Associates members with a role.

.. attribute:: role

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

The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.

BindingDelta

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

.. attribute:: action

The action that was performed on a Binding. Required

A single identity requesting access for a Cloud Platform resource. Follows the same format of Binding.members. Required

CreateSnapshotRequest

Request for the CreateSnapshot method.

Required. The subscription whose backlog the snapshot retains. Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the subscription. More precisely, this is defined as the messages in the subscription’s backlog that are unacknowledged upon the successful completion of the CreateSnapshot request; as well as: (b) Any messages published to the subscription’s topic following the successful completion of the CreateSnapshot request. Format is projects/{project}/subscriptions/{sub}.

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.

The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.

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.

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.

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.

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=104857600,
    max_messages=1000,
    max_lease_duration=3600,
    max_duration_per_lease_extension=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.

.. attribute:: resource

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

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.

ListSnapshotsRequest

Request for the ListSnapshots method.

Maximum number of snapshots to return.

ListSnapshotsResponse

Response for the ListSnapshots method.

If not empty, indicates that there may be more snapshot that match the request; this value should be passed in a new ListSnapshotsRequest.

ListSubscriptionsRequest

Request for the ListSubscriptions method.

Maximum number of subscriptions to return.

ListSubscriptionsResponse

Response for the ListSubscriptions method.

If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new ListSubscriptionsRequest to get more subscriptions.

ListTopicSnapshotsRequest

Request for the ListTopicSnapshots method.

Maximum number of snapshot names to return.

ListTopicSnapshotsResponse

Response for the ListTopicSnapshots method.

If not empty, indicates that there may be more snapshots that match the request; this value should be passed in a new ListTopicSnapshotsRequest to get more snapshots.

ListTopicSubscriptionsRequest

Request for the ListTopicSubscriptions method.

Maximum number of subscription names to return.

ListTopicSubscriptionsResponse

Response for the ListTopicSubscriptions method.

If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new ListTopicSubscriptionsRequest to get more subscriptions.

ListTopicsRequest

Request for the ListTopics method.

Maximum number of topics to return.

ListTopicsResponse

Response for the ListTopics method.

If not empty, indicates that there may be more topics that match the request; this value should be passed in a new ListTopicsRequest.

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.

Required. List of acknowledgment IDs.

ModifyPushConfigRequest

Request for the ModifyPushConfig method.

Required. The push configuration for future deliveries. An empty pushConfig indicates that the Pub/Sub system should stop pushing messages from the given subscription and allow messages to be pulled and acknowledged - effectively pausing the subscription if Pull or StreamingPull is not called.

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>__.

.. attribute:: version

Deprecated.

etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy. If no etag is provided in the call to setIamPolicy, then the existing policy is overwritten blindly.

PolicyDelta

The difference delta between two policies.

.. attribute:: binding_deltas

The delta for Bindings between two policies.

PublishRequest

Request for the Publish method.

Required. The messages to publish.

PublishResponse

Response for the Publish method.

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 for more information. See Quotas and limits for more information about message limits.

Attributes for this message. If this field is empty, the message must contain non-empty data.

The time at which the message was published, populated by the server when it receives the Publish call. It must not be populated by the publisher in a Publish call.

PullRequest

Request for the Pull method.

Optional. If this field set to true, the system will respond immediately even if it there are no messages available to return in the Pull response. Otherwise, the system may wait (for a bounded amount of time) until at least one message is available, rather than returning no messages. Warning: setting this field to true is discouraged because it adversely impacts the performance of Pull operations. We recommend that users do not set this field.

PullResponse

Response for the Pull method.

PushConfig

Configuration for a push delivery endpoint.

Endpoint configuration attributes that can be used to control different aspects of the message delivery. The only currently supported attribute is x-goog-version, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata). If not present during the CreateSubscription call, it will default to the version of the Pub/Sub API used to make such call. If not present in a ModifyPushConfig call, its value will not be changed. GetSubscription calls will always return a valid version, even if the subscription was created without this attribute. The only supported values for the x-goog-version attribute are: - v1beta1: uses the push format defined in the v1beta1 Pub/Sub API. - v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API. For example: .. raw:: html

attributes { "x-goog-version": "v1"
   } 

If specified, Pub/Sub will generate and attach an OIDC JWT token as an Authorization header in the HTTP request for every pushed message.

ReceivedMessage

A message and its corresponding acknowledgment ID.

The message.

RetryPolicy

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.

The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds.

SeekRequest

Request for the Seek method.

The time to seek to. Messages retained in the subscription that were published before this time are marked as acknowledged, and messages retained in the subscription that were published after this time are marked as unacknowledged. Note that this operation affects only those messages retained in the subscription (configured by the combination of message_retention_duration and retain_acked_messages). For example, if time corresponds to a point before the message retention window (or to a point before the system’s notion of the subscription creation time), only retained messages will be marked as unacknowledged, and already- expunged messages will not be restored.

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

Request message for SetIamPolicy method.

.. attribute:: resource

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

Snapshot

A snapshot resource. Snapshots are used in Seek 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.

The name of the topic from which this snapshot is retaining messages.

See Creating and managing labels.

SourceCodeInfo

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

List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status INVALID_ARGUMENT.

List of acknowledgement IDs whose deadline will be modified based on the corresponding element in modify_deadline_seconds. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

A unique identifier that is used to distinguish client instances from each other. Only needs to be provided on the initial request. When a stream disconnects and reconnects for the same stream, the client_id should be set to the same value so that state associated with the old stream can be transferred to the new stream. The same client_id should not be used for different client instances.

StreamingPullResponse

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

Subscription

A subscription resource.

Required. The name of the topic from which this subscription is receiving messages. Format is projects/{project}/topics/{topic}. The value of this field will be _deleted-topic_ if the topic has been deleted.

The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In the interval after the message is delivered and before it is acknowledged, it is considered to be outstanding. During that time period, the message will not be redelivered (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call ModifyAckDeadline with the corresponding ack_id if using non-streaming pull or send the ack_id in a StreamingModifyAckDeadlineRequest if using streaming pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message.

How long to retain unacknowledged messages in the subscription’s backlog, from the moment a message is published. If retain_acked_messages is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a Seek can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 minutes.

If true, messages published with the same ordering_key in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order. EXPERIMENTAL: This feature is part of a closed alpha release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.

An expression written in the Cloud Pub/Sub filter language. If non-empty, then only PubsubMessage\ s whose attributes field matches the filter are delivered on this subscription. If empty, then no messages are filtered out.

A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message.

TestIamPermissionsRequest

Request message for TestIamPermissions method.

.. attribute:: resource

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

TestIamPermissionsResponse

Response message for TestIamPermissions method.

.. attribute:: permissions

A subset of TestPermissionsRequest.permissions that the caller is allowed.

Timestamp

API documentation for pubsub_v1.types.Timestamp class.

Topic

A topic resource.

See Creating and managing labels.

The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is projects/*/locations/*/keyRings/*/cryptoKeys/*.

UninterpretedOption

API documentation for pubsub_v1.types.UninterpretedOption class.

UpdateSnapshotRequest

Request for the UpdateSnapshot method.

Required. Indicates which fields in the provided snapshot to update. Must be specified and non-empty.

UpdateSubscriptionRequest

Request for the UpdateSubscription method.

Required. Indicates which fields in the provided subscription to update. Must be specified and non-empty.

UpdateTopicRequest

Request for the UpdateTopic method.

Required. Indicates which fields in the provided topic to update. Must be specified and non-empty. Note that if update_mask contains “message_storage_policy” but the message_storage_policy is not set in the topic provided above, then the updated value is determined by the policy configured at the project or organization level.