Skip to content

Commit 31ffa0e

Browse files
michaelawyuplamut
authored andcommitted
Added "Open in Cloud Shell" buttons to README files [(googleapis#1254)](GoogleCloudPlatform/python-docs-samples#1254)
1 parent e0e31c8 commit 31ffa0e

File tree

2 files changed

+42
-15
lines changed

2 files changed

+42
-15
lines changed

samples/snippets/README.rst

Lines changed: 40 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Google Cloud Pub/Sub Python Samples
44
===============================================================================
55

6+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
7+
: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/README.rst
8+
9+
610
This directory contains samples for Google Cloud Pub/Sub. `Google Cloud Pub/Sub`_ is a fully-managed real-time messaging service that allows you to send and receive messages between independent applications.
711

812

@@ -54,6 +58,10 @@ Samples
5458
Quickstart
5559
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5660

61+
.. 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
63+
64+
5765

5866

5967
To run this sample:
@@ -66,6 +74,10 @@ To run this sample:
6674
Publisher
6775
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6876

77+
.. 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
79+
80+
6981

7082

7183
To run this sample:
@@ -78,13 +90,13 @@ To run this sample:
7890
project
7991
{list,create,delete,publish,publish-with-futures,publish-with-batch-settings}
8092
...
81-
93+
8294
This application demonstrates how to perform basic operations on topics
8395
with the Cloud Pub/Sub API.
84-
96+
8597
For more information, see the README.md under /pubsub and the documentation
8698
at https://cloud.google.com/pubsub/docs.
87-
99+
88100
positional arguments:
89101
project Your Google Cloud project ID
90102
{list,create,delete,publish,publish-with-futures,publish-with-batch-settings}
@@ -98,14 +110,19 @@ To run this sample:
98110
publish-with-batch-settings
99111
Publishes multiple messages to a Pub/Sub topic with
100112
batch settings.
101-
113+
102114
optional arguments:
103115
-h, --help show this help message and exit
104116
105117
118+
106119
Subscribers
107120
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
108121

122+
.. 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
124+
125+
109126

110127

111128
To run this sample:
@@ -115,33 +132,40 @@ To run this sample:
115132
$ python subscriber.py
116133
117134
usage: subscriber.py [-h]
118-
project {list,create,delete,receive,receive-flow-control}
135+
project
136+
{list_in_topic,list_in_project,create,delete,receive,receive-flow-control}
119137
...
120-
138+
121139
This application demonstrates how to perform basic operations on
122140
subscriptions with the Cloud Pub/Sub API.
123-
141+
124142
For more information, see the README.md under /pubsub and the documentation
125143
at https://cloud.google.com/pubsub/docs.
126-
144+
127145
positional arguments:
128146
project Your Google Cloud project ID
129-
{list,create,delete,receive,receive-flow-control}
130-
list Lists all subscriptions for a given topic.
147+
{list_in_topic,list_in_project,create,delete,receive,receive-flow-control}
148+
list_in_topic Lists all subscriptions for a given topic.
149+
list_in_project Lists all subscriptions in the current project.
131150
create Create a new pull subscription on the given topic.
132151
delete Deletes an existing Pub/Sub topic.
133152
receive Receives messages from a pull subscription.
134153
receive-flow-control
135154
Receives messages from a pull subscription with flow
136155
control.
137-
156+
138157
optional arguments:
139158
-h, --help show this help message and exit
140159
141160
161+
142162
Identity and Access Management
143163
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
144164

165+
.. 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
167+
168+
145169

146170

147171
To run this sample:
@@ -154,13 +178,13 @@ To run this sample:
154178
project
155179
{get-topic-policy,get-subscription-policy,set-topic-policy,set-subscription-policy,check-topic-permissions,check-subscription-permissions}
156180
...
157-
181+
158182
This application demonstrates how to perform basic operations on IAM
159183
policies with the Cloud Pub/Sub API.
160-
184+
161185
For more information, see the README.md under /pubsub and the documentation
162186
at https://cloud.google.com/pubsub/docs.
163-
187+
164188
positional arguments:
165189
project Your Google Cloud project ID
166190
{get-topic-policy,get-subscription-policy,set-topic-policy,set-subscription-policy,check-topic-permissions,check-subscription-permissions}
@@ -176,13 +200,14 @@ To run this sample:
176200
check-subscription-permissions
177201
Checks to which permissions are available on the given
178202
subscription.
179-
203+
180204
optional arguments:
181205
-h, --help show this help message and exit
182206
183207
184208
185209
210+
186211
The client library
187212
-------------------------------------------------------------------------------
188213

samples/snippets/README.rst.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ samples:
2626
show_help: true
2727

2828
cloud_client_library: true
29+
30+
folder: pubsub/cloud-client

0 commit comments

Comments
 (0)