-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
-
OS type and version
Any and all -
Python version and virtual environment information
python --version
Python 3.6.3 -
google-cloud-python version
pip show google-cloud,pip show google-<service>orpip freeze
google==1.9.3
google-api-core==0.1.1
google-auth==1.2.1
google-cloud-core==0.28.0
google-cloud-pubsub==0.29.0
google-gax==0.15.16
googleapis-common-protos==1.5.3
grpc-google-iam-v1==0.11.4 -
Stacktrace if available
-
Steps to reproduce
Run example code for listing subscriptions for a topic from here:
https://cloud.google.com/pubsub/docs/admin -
Code example
def list_subscriptions_in_topic(project, topic_name):
"""Lists all subscriptions for a given topic."""
subscriber = pubsub_v1.SubscriberClient()
topic_path = subscriber.topic_path(project, topic_name)
for subscription in subscriber.list_subscriptions(topic_path):
print(subscription.name)topic path being used as shown by topic_path = subscriber.topic_path(project, topic_name):
projects/my-team-dev/topics/testing-topic
Using GitHub flavored markdown can help make your request clearer.
See: https://guides.github.com/features/mastering-markdown/