Summary of entries of Methods for pubsublite.
google.cloud.pubsublite.admin_client.AdminClient
AdminClient(
region: google.cloud.pubsublite.types.location.CloudRegion,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: typing.Optional[str] = None,
client_options: typing.Optional[
google.api_core.client_options.ClientOptions
] = None,
)
Create a new AdminClient.
google.cloud.pubsublite.admin_client.AdminClient.create_reservation
create_reservation(
reservation: google.cloud.pubsublite_v1.types.common.Reservation,
) -> google.cloud.pubsublite_v1.types.common.Reservation
Create a reservation, returns the created reservation.
See more: google.cloud.pubsublite.admin_client.AdminClient.create_reservation
google.cloud.pubsublite.admin_client.AdminClient.create_subscription
create_subscription(
subscription: google.cloud.pubsublite_v1.types.common.Subscription,
target: typing.Union[
google.cloud.pubsublite.types.backlog_location.BacklogLocation,
google.cloud.pubsublite.types.backlog_location.PublishTime,
google.cloud.pubsublite.types.backlog_location.EventTime,
] = BacklogLocation.END,
starting_offset: typing.Optional[
google.cloud.pubsublite.types.backlog_location.BacklogLocation
] = None,
) -> google.cloud.pubsublite_v1.types.common.Subscription
Create a subscription, returns the created subscription.
See more: google.cloud.pubsublite.admin_client.AdminClient.create_subscription
google.cloud.pubsublite.admin_client.AdminClient.create_topic
create_topic(
topic: google.cloud.pubsublite_v1.types.common.Topic,
) -> google.cloud.pubsublite_v1.types.common.Topic
Create a topic, returns the created topic.
See more: google.cloud.pubsublite.admin_client.AdminClient.create_topic
google.cloud.pubsublite.admin_client.AdminClient.delete_reservation
delete_reservation(
reservation_path: google.cloud.pubsublite.types.paths.ReservationPath,
)
Delete a reservation and all associated messages.
See more: google.cloud.pubsublite.admin_client.AdminClient.delete_reservation
google.cloud.pubsublite.admin_client.AdminClient.delete_subscription
delete_subscription(
subscription_path: google.cloud.pubsublite.types.paths.SubscriptionPath,
)
Delete a subscription and all associated messages.
See more: google.cloud.pubsublite.admin_client.AdminClient.delete_subscription
google.cloud.pubsublite.admin_client.AdminClient.delete_topic
delete_topic(topic_path: google.cloud.pubsublite.types.paths.TopicPath)
Delete a topic and all associated messages.
See more: google.cloud.pubsublite.admin_client.AdminClient.delete_topic
google.cloud.pubsublite.admin_client.AdminClient.get_reservation
get_reservation(
reservation_path: google.cloud.pubsublite.types.paths.ReservationPath,
) -> google.cloud.pubsublite_v1.types.common.Reservation
Get the reservation object from the server.
See more: google.cloud.pubsublite.admin_client.AdminClient.get_reservation
google.cloud.pubsublite.admin_client.AdminClient.get_subscription
get_subscription(
subscription_path: google.cloud.pubsublite.types.paths.SubscriptionPath,
) -> google.cloud.pubsublite_v1.types.common.Subscription
Get the subscription object from the server.
See more: google.cloud.pubsublite.admin_client.AdminClient.get_subscription
google.cloud.pubsublite.admin_client.AdminClient.get_topic
get_topic(
topic_path: google.cloud.pubsublite.types.paths.TopicPath,
) -> google.cloud.pubsublite_v1.types.common.Topic
Get the topic object from the server.
See more: google.cloud.pubsublite.admin_client.AdminClient.get_topic
google.cloud.pubsublite.admin_client.AdminClient.get_topic_partition_count
get_topic_partition_count(
topic_path: google.cloud.pubsublite.types.paths.TopicPath,
) -> int
Get the number of partitions in the provided topic.
See more: google.cloud.pubsublite.admin_client.AdminClient.get_topic_partition_count
google.cloud.pubsublite.admin_client.AdminClient.list_reservation_topics
list_reservation_topics(
reservation_path: google.cloud.pubsublite.types.paths.ReservationPath,
) -> typing.List[google.cloud.pubsublite.types.paths.TopicPath]
List the subscriptions that exist for a given reservation.
See more: google.cloud.pubsublite.admin_client.AdminClient.list_reservation_topics
google.cloud.pubsublite.admin_client.AdminClient.list_reservations
list_reservations(
location_path: google.cloud.pubsublite.types.paths.LocationPath,
) -> typing.List[google.cloud.pubsublite_v1.types.common.Reservation]
List the Pub/Sub lite reservations that exist for a project in a given location.
See more: google.cloud.pubsublite.admin_client.AdminClient.list_reservations
google.cloud.pubsublite.admin_client.AdminClient.list_subscriptions
list_subscriptions(
location_path: google.cloud.pubsublite.types.paths.LocationPath,
) -> typing.List[google.cloud.pubsublite_v1.types.common.Subscription]
List the Pub/Sub lite subscriptions that exist for a project in a given location.
See more: google.cloud.pubsublite.admin_client.AdminClient.list_subscriptions
google.cloud.pubsublite.admin_client.AdminClient.list_topic_subscriptions
list_topic_subscriptions(
topic_path: google.cloud.pubsublite.types.paths.TopicPath,
) -> typing.List[google.cloud.pubsublite.types.paths.SubscriptionPath]
List the subscriptions that exist for a given topic.
See more: google.cloud.pubsublite.admin_client.AdminClient.list_topic_subscriptions
google.cloud.pubsublite.admin_client.AdminClient.list_topics
list_topics(
location_path: google.cloud.pubsublite.types.paths.LocationPath,
) -> typing.List[google.cloud.pubsublite_v1.types.common.Topic]
List the Pub/Sub lite topics that exist for a project in a given location.
See more: google.cloud.pubsublite.admin_client.AdminClient.list_topics
google.cloud.pubsublite.admin_client.AdminClient.region
region() -> google.cloud.pubsublite.types.location.CloudRegion
The region this client is for.
See more: google.cloud.pubsublite.admin_client.AdminClient.region
google.cloud.pubsublite.admin_client.AdminClient.seek_subscription
seek_subscription(
subscription_path: google.cloud.pubsublite.types.paths.SubscriptionPath,
target: typing.Union[
google.cloud.pubsublite.types.backlog_location.BacklogLocation,
google.cloud.pubsublite.types.backlog_location.PublishTime,
google.cloud.pubsublite.types.backlog_location.EventTime,
],
) -> google.api_core.operation.Operation
Initiate an out-of-band seek for a subscription to a specified target.
See more: google.cloud.pubsublite.admin_client.AdminClient.seek_subscription
google.cloud.pubsublite.admin_client.AdminClient.update_reservation
update_reservation(
reservation: google.cloud.pubsublite_v1.types.common.Reservation,
update_mask: google.protobuf.field_mask_pb2.FieldMask,
) -> google.cloud.pubsublite_v1.types.common.Reservation
Update the masked fields of the provided reservation.
See more: google.cloud.pubsublite.admin_client.AdminClient.update_reservation
google.cloud.pubsublite.admin_client.AdminClient.update_subscription
update_subscription(
subscription: google.cloud.pubsublite_v1.types.common.Subscription,
update_mask: google.protobuf.field_mask_pb2.FieldMask,
) -> google.cloud.pubsublite_v1.types.common.Subscription
Update the masked fields of the provided subscription.
See more: google.cloud.pubsublite.admin_client.AdminClient.update_subscription
google.cloud.pubsublite.admin_client.AdminClient.update_topic
update_topic(
topic: google.cloud.pubsublite_v1.types.common.Topic,
update_mask: google.protobuf.field_mask_pb2.FieldMask,
) -> google.cloud.pubsublite_v1.types.common.Topic
Update the masked fields of the provided topic.
See more: google.cloud.pubsublite.admin_client.AdminClient.update_topic
google.cloud.pubsublite.cloudpubsub.publisher_client.AsyncPublisherClient
AsyncPublisherClient(
*,
per_partition_batching_settings: typing.Optional[
google.cloud.pubsub_v1.types.BatchSettings
] = None,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: str = "grpc_asyncio",
client_options: typing.Optional[
google.api_core.client_options.ClientOptions
] = None,
enable_idempotence: bool = False
)
Create a new AsyncPublisherClient.
See more: google.cloud.pubsublite.cloudpubsub.publisher_client.AsyncPublisherClient
google.cloud.pubsublite.cloudpubsub.publisher_client.AsyncPublisherClient.__aenter__
__aenter__()
Return self
upon entering the runtime context.
See more: google.cloud.pubsublite.cloudpubsub.publisher_client.AsyncPublisherClient.aenter
google.cloud.pubsublite.cloudpubsub.publisher_client.AsyncPublisherClient.__aexit__
__aexit__(exc_type, exc_value, traceback)
Raise any exception triggered within the runtime context.
See more: google.cloud.pubsublite.cloudpubsub.publisher_client.AsyncPublisherClient.aexit
google.cloud.pubsublite.cloudpubsub.publisher_client.AsyncPublisherClient.publish
publish(
topic: typing.Union[google.cloud.pubsublite.types.paths.TopicPath, str],
data: bytes,
ordering_key: str = "",
**attrs: typing.Mapping[str, str]
) -> str
Publish a message.
See more: google.cloud.pubsublite.cloudpubsub.publisher_client.AsyncPublisherClient.publish
google.cloud.pubsublite.cloudpubsub.publisher_client.PublisherClient
PublisherClient(
*,
per_partition_batching_settings: typing.Optional[
google.cloud.pubsub_v1.types.BatchSettings
] = None,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: str = "grpc_asyncio",
client_options: typing.Optional[
google.api_core.client_options.ClientOptions
] = None,
enable_idempotence: bool = False
)
Create a new PublisherClient.
See more: google.cloud.pubsublite.cloudpubsub.publisher_client.PublisherClient
google.cloud.pubsublite.cloudpubsub.publisher_client.PublisherClient.__enter__
__enter__()
Return self
upon entering the runtime context.
See more: google.cloud.pubsublite.cloudpubsub.publisher_client.PublisherClient.enter
google.cloud.pubsublite.cloudpubsub.publisher_client.PublisherClient.__exit__
__exit__(exc_type, exc_value, traceback)
Raise any exception triggered within the runtime context.
See more: google.cloud.pubsublite.cloudpubsub.publisher_client.PublisherClient.exit
google.cloud.pubsublite.cloudpubsub.publisher_client.PublisherClient.publish
publish(
topic: typing.Union[google.cloud.pubsublite.types.paths.TopicPath, str],
data: bytes,
ordering_key: str = "",
**attrs: typing.Mapping[str, str]
) -> concurrent.futures._base.Future[str]
Publish a message.
See more: google.cloud.pubsublite.cloudpubsub.publisher_client.PublisherClient.publish
google.cloud.pubsublite.cloudpubsub.subscriber_client.AsyncSubscriberClient
AsyncSubscriberClient(
*,
nack_handler: typing.Optional[
google.cloud.pubsublite.cloudpubsub.nack_handler.NackHandler
] = None,
reassignment_handler: typing.Optional[
google.cloud.pubsublite.cloudpubsub.reassignment_handler.ReassignmentHandler
] = None,
message_transformer: typing.Optional[
google.cloud.pubsublite.cloudpubsub.message_transformer.MessageTransformer
] = None,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: str = "grpc_asyncio",
client_options: typing.Optional[google.api_core.client_options.ClientOptions] = None
)
Create a new AsyncSubscriberClient.
See more: google.cloud.pubsublite.cloudpubsub.subscriber_client.AsyncSubscriberClient
google.cloud.pubsublite.cloudpubsub.subscriber_client.AsyncSubscriberClient.__aenter__
__aenter__()
Return self
upon entering the runtime context.
See more: google.cloud.pubsublite.cloudpubsub.subscriber_client.AsyncSubscriberClient.aenter
google.cloud.pubsublite.cloudpubsub.subscriber_client.AsyncSubscriberClient.__aexit__
__aexit__(exc_type, exc_value, traceback)
Raise any exception triggered within the runtime context.
See more: google.cloud.pubsublite.cloudpubsub.subscriber_client.AsyncSubscriberClient.aexit
google.cloud.pubsublite.cloudpubsub.subscriber_client.AsyncSubscriberClient.subscribe
subscribe(
subscription: typing.Union[
google.cloud.pubsublite.types.paths.SubscriptionPath, str
],
per_partition_flow_control_settings: google.cloud.pubsublite.types.flow_control_settings.FlowControlSettings,
fixed_partitions: typing.Optional[
typing.Set[google.cloud.pubsublite.types.partition.Partition]
] = None,
) -> typing.AsyncIterator[google.cloud.pubsub_v1.subscriber.message.Message]
Read messages from a subscription.
See more: google.cloud.pubsublite.cloudpubsub.subscriber_client.AsyncSubscriberClient.subscribe
google.cloud.pubsublite.cloudpubsub.subscriber_client.SubscriberClient
SubscriberClient(
*,
executor: typing.Optional[concurrent.futures.thread.ThreadPoolExecutor] = None,
nack_handler: typing.Optional[
google.cloud.pubsublite.cloudpubsub.nack_handler.NackHandler
] = None,
reassignment_handler: typing.Optional[
google.cloud.pubsublite.cloudpubsub.reassignment_handler.ReassignmentHandler
] = None,
message_transformer: typing.Optional[
google.cloud.pubsublite.cloudpubsub.message_transformer.MessageTransformer
] = None,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: str = "grpc_asyncio",
client_options: typing.Optional[google.api_core.client_options.ClientOptions] = None
)
Create a new SubscriberClient.
See more: google.cloud.pubsublite.cloudpubsub.subscriber_client.SubscriberClient
google.cloud.pubsublite.cloudpubsub.subscriber_client.SubscriberClient.__enter__
__enter__()
Return self
upon entering the runtime context.
See more: google.cloud.pubsublite.cloudpubsub.subscriber_client.SubscriberClient.enter
google.cloud.pubsublite.cloudpubsub.subscriber_client.SubscriberClient.__exit__
__exit__(exc_type, exc_value, traceback)
Raise any exception triggered within the runtime context.
See more: google.cloud.pubsublite.cloudpubsub.subscriber_client.SubscriberClient.exit
google.cloud.pubsublite.cloudpubsub.subscriber_client.SubscriberClient.subscribe
subscribe(
subscription: typing.Union[
google.cloud.pubsublite.types.paths.SubscriptionPath, str
],
callback: typing.Callable[
[google.cloud.pubsub_v1.subscriber.message.Message], None
],
per_partition_flow_control_settings: google.cloud.pubsublite.types.flow_control_settings.FlowControlSettings,
fixed_partitions: typing.Optional[
typing.Set[google.cloud.pubsublite.types.partition.Partition]
] = None,
) -> google.cloud.pubsub_v1.subscriber.futures.StreamingPullFuture
This method starts a background thread to begin pulling messages from
a Pub/Sub Lite subscription and scheduling them to be processed using the
provided callback
.
See more: google.cloud.pubsublite.cloudpubsub.subscriber_client.SubscriberClient.subscribe
google.cloud.pubsublite.types.CloudRegion
CloudRegion(
name,
)
Create new instance of CloudRegion(name,).
google.cloud.pubsublite.types.CloudZone
CloudZone(region, zone_id)
Create new instance of CloudZone(region, zone_id).
See more: google.cloud.pubsublite.types.CloudZone
google.cloud.pubsublite.types.EventTime
EventTime(value: datetime.datetime)
Create new instance of EventTime(value,).
See more: google.cloud.pubsublite.types.EventTime
google.cloud.pubsublite.types.FlowControlSettings
FlowControlSettings(messages_outstanding, bytes_outstanding)
Create new instance of FlowControlSettings(messages_outstanding, bytes_outstanding).
google.cloud.pubsublite.types.LocationPath
LocationPath(project, location)
Create new instance of LocationPath(project, location).
google.cloud.pubsublite.types.MessageMetadata
MessageMetadata(
partition: google.cloud.pubsublite.types.partition.Partition,
cursor: google.cloud.pubsublite_v1.types.common.Cursor,
)
Create new instance of MessageMetadata(partition, cursor).
google.cloud.pubsublite.types.Partition
Partition(
value,
)
Create new instance of Partition(value,).
See more: google.cloud.pubsublite.types.Partition
google.cloud.pubsublite.types.PublishTime
PublishTime(value: datetime.datetime)
Create new instance of PublishTime(value,).
google.cloud.pubsublite.types.ReservationPath
ReservationPath(project, location, name)
Create new instance of ReservationPath(project, location, name).
google.cloud.pubsublite.types.SubscriptionPath
SubscriptionPath(project, location, name)
Create new instance of SubscriptionPath(project, location, name).
google.cloud.pubsublite.types.TopicPath
TopicPath(project, location, name)
Create new instance of TopicPath(project, location, name).
See more: google.cloud.pubsublite.types.TopicPath