-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
@tseaver I tried to use
t = client.topic('foo')
s = t.subscription('bar with space')and got a strange error. Should we forbid subscription names that don't adhere or manually escape them for users? I wrote a docstring edit but wanted to discuss before sending a PR
diff --git a/gcloud/pubsub/subscription.py b/gcloud/pubsub/subscription.py
index e3da8a0..8c54d39 100644
--- a/gcloud/pubsub/subscription.py
+++ b/gcloud/pubsub/subscription.py
@@ -26,7 +26,10 @@ class Subscription(object):
https://cloud.google.com/pubsub/reference/rest/v1/projects.subscriptions
:type name: string
- :param name: the name of the subscription
+ :param name: the name of the subscription. Must start with a letter, and
+ contain only letters, numbers, dashes, underscores, periods,
+ tildes, plus or percent signs. It must be between 3 and 255
+ characters in length, and it must not start with ``goog``.
:type topic: :class:`gcloud.pubsub.topic.Topic`
:param topic: the topic to which the subscription belongs..Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.