Skip to content

Commit a0f9148

Browse files
chenyumicplamut
chenyumic
authored andcommitted
Regenerate the README files and fix the Open in Cloud Shell link for some samples [(#1441)](GoogleCloudPlatform/python-docs-samples#1441)
1 parent c813296 commit a0f9148

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

samples/snippets/README.rst

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This directory contains samples for Google Cloud Pub/Sub. `Google Cloud Pub/Sub`
1212

1313

1414

15-
.. _Google Cloud Pub/Sub: https://cloud.google.com/pubsub/docs
15+
.. _Google Cloud Pub/Sub: https://cloud.google.com/pubsub/docs
1616

1717
Setup
1818
-------------------------------------------------------------------------------
@@ -59,7 +59,7 @@ Quickstart
5959
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6060

6161
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
62-
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/quickstart.py;pubsub/cloud-client/README.rst
62+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/quickstart.py,pubsub/cloud-client/README.rst
6363

6464

6565

@@ -75,7 +75,7 @@ Publisher
7575
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7676

7777
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
78-
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/publisher.py;pubsub/cloud-client/README.rst
78+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/publisher.py,pubsub/cloud-client/README.rst
7979

8080

8181

@@ -88,7 +88,7 @@ To run this sample:
8888
8989
usage: publisher.py [-h]
9090
project
91-
{list,create,delete,publish,publish-with-futures,publish-with-batch-settings}
91+
{list,create,delete,publish,publish-with-custom-attributes,publish-with-futures,publish-with-batch-settings}
9292
...
9393
9494
This application demonstrates how to perform basic operations on topics
@@ -99,11 +99,14 @@ To run this sample:
9999
100100
positional arguments:
101101
project Your Google Cloud project ID
102-
{list,create,delete,publish,publish-with-futures,publish-with-batch-settings}
102+
{list,create,delete,publish,publish-with-custom-attributes,publish-with-futures,publish-with-batch-settings}
103103
list Lists all Pub/Sub topics in the given project.
104104
create Create a new Pub/Sub topic.
105105
delete Deletes an existing Pub/Sub topic.
106106
publish Publishes multiple messages to a Pub/Sub topic.
107+
publish-with-custom-attributes
108+
Publishes multiple messages with custom attributes to
109+
a Pub/Sub topic.
107110
publish-with-futures
108111
Publishes multiple messages to a Pub/Sub topic and
109112
prints their message IDs.
@@ -120,7 +123,7 @@ Subscribers
120123
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
121124

122125
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
123-
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/subscriber.py;pubsub/cloud-client/README.rst
126+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/subscriber.py,pubsub/cloud-client/README.rst
124127

125128

126129

@@ -133,7 +136,7 @@ To run this sample:
133136
134137
usage: subscriber.py [-h]
135138
project
136-
{list_in_topic,list_in_project,create,delete,receive,receive-flow-control}
139+
{list_in_topic,list_in_project,create,create-push,delete,update,receive,receive-custom-attributes,receive-flow-control,listen_for_errors}
137140
...
138141
139142
This application demonstrates how to perform basic operations on
@@ -144,15 +147,27 @@ To run this sample:
144147
145148
positional arguments:
146149
project Your Google Cloud project ID
147-
{list_in_topic,list_in_project,create,delete,receive,receive-flow-control}
150+
{list_in_topic,list_in_project,create,create-push,delete,update,receive,receive-custom-attributes,receive-flow-control,listen_for_errors}
148151
list_in_topic Lists all subscriptions for a given topic.
149152
list_in_project Lists all subscriptions in the current project.
150153
create Create a new pull subscription on the given topic.
154+
create-push Create a new push subscription on the given topic. For
155+
example, endpoint is "https://my-test-
156+
project.appspot.com/push".
151157
delete Deletes an existing Pub/Sub topic.
158+
update Updates an existing Pub/Sub subscription's push
159+
endpoint URL. Note that certain properties of a
160+
subscription, such as its topic, are not modifiable.
161+
For example, endpoint is "https://my-test-
162+
project.appspot.com/push".
152163
receive Receives messages from a pull subscription.
164+
receive-custom-attributes
165+
Receives messages from a pull subscription.
153166
receive-flow-control
154167
Receives messages from a pull subscription with flow
155168
control.
169+
listen_for_errors Receives messages and catches errors from a pull
170+
subscription.
156171
157172
optional arguments:
158173
-h, --help show this help message and exit
@@ -163,7 +178,7 @@ Identity and Access Management
163178
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
164179
165180
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
166-
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/iam.py;pubsub/cloud-client/README.rst
181+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/iam.py,pubsub/cloud-client/README.rst
167182
168183
169184

0 commit comments

Comments
 (0)