NAME
Google::Cloud::Pubsub::V1beta2 - Client library for Google Cloud Services
SYNOPSIS
use Google::Cloud::Pubsub::V1beta2;
use Google::Auth;
my $auth = Google::Auth->default();
# 1. High-performance gRPC Transport (Default)
my $grpc_client = Google::Cloud::Pubsub::V1beta2->new(
credentials => $auth,
transport => 'grpc', # Optional: 'grpc' is default
);
# 2. HTTP/REST Transport
my $rest_client = Google::Cloud::Pubsub::V1beta2->new(
credentials => $auth,
transport => 'rest',
);
# Execute service methods
my $res = $grpc_client->some_method( %params );
DESCRIPTION
Google::Cloud::Pubsub::V1beta2 is an auto-generated client library for Google Cloud Services.
It provides a unified client interface supporting both high-performance HTTP/2 gRPC and HTTP/REST transports, with automatic Google Cloud Application Default Credentials (ADC) resolution and typed Protocol Buffers message handling.
SOURCE
Generated from the following Protocol Buffers schemas:
googleapis/google/pubsub/v1beta2/pubsub.proto
CONSTRUCTOR
new
my $client = Google::Cloud::Pubsub::V1beta2->new(
credentials => $auth, # Optional: Google::Auth object (defaults to ADC)
transport => 'grpc', # Optional: 'grpc' (default) or 'rest'
);
ATTRIBUTES
credentials
Returns or accepts the Google::Auth credentials object.
transport
Returns or accepts the active transport object (Google::gRPC::Client or Google::Cloud::REST::Client).
METHODS
METHODS
The following RPC methods are available in this client:
create_subscription
my $response = $client->create_subscription( name => $name, topic => $topic, push_config => $push_config, ack_deadline_seconds => $ack_deadline_seconds, );Calls the RPC method
CreateSubscriptionongoogle.pubsub.v1beta2.Subscriber.Request: Google::Pubsub::V1beta2::Pubsub::Subscription
Returns: Google::Pubsub::V1beta2::Pubsub::Subscription
Parameters:
name-stringtopic-stringpush_config- Google::Pubsub::V1beta2::Pubsub::PushConfigack_deadline_seconds-int32
get_subscription
my $response = $client->get_subscription( subscription => $subscription, );Calls the RPC method
GetSubscriptionongoogle.pubsub.v1beta2.Subscriber.Request: Google::Pubsub::V1beta2::Pubsub::GetSubscriptionRequest
Returns: Google::Pubsub::V1beta2::Pubsub::Subscription
Parameters:
subscription-string
list_subscriptions
my $response = $client->list_subscriptions( project => $project, page_size => $page_size, page_token => $page_token, );Calls the RPC method
ListSubscriptionsongoogle.pubsub.v1beta2.Subscriber.Request: Google::Pubsub::V1beta2::Pubsub::ListSubscriptionsRequest
Returns: Google::Pubsub::V1beta2::Pubsub::ListSubscriptionsResponse
Parameters:
project-stringpage_size-int32page_token-string
delete_subscription
my $response = $client->delete_subscription( subscription => $subscription, );Calls the RPC method
DeleteSubscriptionongoogle.pubsub.v1beta2.Subscriber.Request: Google::Pubsub::V1beta2::Pubsub::DeleteSubscriptionRequest
Returns: Google::Protobuf::Empty::Empty
Parameters:
subscription-string
modify_ack_deadline
my $response = $client->modify_ack_deadline( subscription => $subscription, ack_id => $ack_id, ack_deadline_seconds => $ack_deadline_seconds, );Calls the RPC method
ModifyAckDeadlineongoogle.pubsub.v1beta2.Subscriber.Request: Google::Pubsub::V1beta2::Pubsub::ModifyAckDeadlineRequest
Returns: Google::Protobuf::Empty::Empty
Parameters:
subscription-stringack_id-stringack_deadline_seconds-int32
acknowledge
my $response = $client->acknowledge( subscription => $subscription, ack_ids => [ ... ], );Calls the RPC method
Acknowledgeongoogle.pubsub.v1beta2.Subscriber.Request: Google::Pubsub::V1beta2::Pubsub::AcknowledgeRequest
Returns: Google::Protobuf::Empty::Empty
Parameters:
subscription-stringack_ids- ArrayRef ofstring
pull
my $response = $client->pull( subscription => $subscription, return_immediately => $return_immediately, max_messages => $max_messages, );Calls the RPC method
Pullongoogle.pubsub.v1beta2.Subscriber.Request: Google::Pubsub::V1beta2::Pubsub::PullRequest
Returns: Google::Pubsub::V1beta2::Pubsub::PullResponse
Parameters:
subscription-stringreturn_immediately-boolmax_messages-int32
modify_push_config
my $response = $client->modify_push_config( subscription => $subscription, push_config => $push_config, );Calls the RPC method
ModifyPushConfigongoogle.pubsub.v1beta2.Subscriber.Request: Google::Pubsub::V1beta2::Pubsub::ModifyPushConfigRequest
Returns: Google::Protobuf::Empty::Empty
Parameters:
subscription-stringpush_config- Google::Pubsub::V1beta2::Pubsub::PushConfig
create_topic
my $response = $client->create_topic( name => $name, );Calls the RPC method
CreateTopicongoogle.pubsub.v1beta2.Publisher.Request: Google::Pubsub::V1beta2::Pubsub::Topic
Returns: Google::Pubsub::V1beta2::Pubsub::Topic
Parameters:
name-string
publish
my $response = $client->publish( topic => $topic, messages => [ ... ], );Calls the RPC method
Publishongoogle.pubsub.v1beta2.Publisher.Request: Google::Pubsub::V1beta2::Pubsub::PublishRequest
Returns: Google::Pubsub::V1beta2::Pubsub::PublishResponse
Parameters:
topic-stringmessages- ArrayRef of Google::Pubsub::V1beta2::Pubsub::PubsubMessage
get_topic
my $response = $client->get_topic( topic => $topic, );Calls the RPC method
GetTopicongoogle.pubsub.v1beta2.Publisher.Request: Google::Pubsub::V1beta2::Pubsub::GetTopicRequest
Returns: Google::Pubsub::V1beta2::Pubsub::Topic
Parameters:
topic-string
list_topics
my $response = $client->list_topics( project => $project, page_size => $page_size, page_token => $page_token, );Calls the RPC method
ListTopicsongoogle.pubsub.v1beta2.Publisher.Request: Google::Pubsub::V1beta2::Pubsub::ListTopicsRequest
Returns: Google::Pubsub::V1beta2::Pubsub::ListTopicsResponse
Parameters:
project-stringpage_size-int32page_token-string
list_topic_subscriptions
my $response = $client->list_topic_subscriptions( topic => $topic, page_size => $page_size, page_token => $page_token, );Calls the RPC method
ListTopicSubscriptionsongoogle.pubsub.v1beta2.Publisher.Request: Google::Pubsub::V1beta2::Pubsub::ListTopicSubscriptionsRequest
Returns: Google::Pubsub::V1beta2::Pubsub::ListTopicSubscriptionsResponse
Parameters:
topic-stringpage_size-int32page_token-string
delete_topic
my $response = $client->delete_topic( topic => $topic, );Calls the RPC method
DeleteTopicongoogle.pubsub.v1beta2.Publisher.Request: Google::Pubsub::V1beta2::Pubsub::DeleteTopicRequest
Returns: Google::Protobuf::Empty::Empty
Parameters:
topic-string
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.