From 479e9f72fa400f591b824dad7b548954ae6c97b7 Mon Sep 17 00:00:00 2001 From: michaelawyu Date: Thu, 7 Dec 2017 10:34:29 -0800 Subject: [PATCH] Added "Open in Cloud Shell" buttons to README files [(#1254)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/1254) --- samples/snippets/README.rst | 55 ++++++++++++++++++++++++---------- samples/snippets/README.rst.in | 2 ++ 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/samples/snippets/README.rst b/samples/snippets/README.rst index df1dbf7c6..0ecf4b193 100644 --- a/samples/snippets/README.rst +++ b/samples/snippets/README.rst @@ -3,6 +3,10 @@ Google Cloud Pub/Sub Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :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 + + 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. @@ -54,6 +58,10 @@ Samples Quickstart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :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 + + To run this sample: @@ -66,6 +74,10 @@ To run this sample: Publisher +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :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 + + To run this sample: @@ -78,13 +90,13 @@ To run this sample: project {list,create,delete,publish,publish-with-futures,publish-with-batch-settings} ... - + This application demonstrates how to perform basic operations on topics with the Cloud Pub/Sub API. - + For more information, see the README.md under /pubsub and the documentation at https://cloud.google.com/pubsub/docs. - + positional arguments: project Your Google Cloud project ID {list,create,delete,publish,publish-with-futures,publish-with-batch-settings} @@ -98,14 +110,19 @@ To run this sample: publish-with-batch-settings Publishes multiple messages to a Pub/Sub topic with batch settings. - + optional arguments: -h, --help show this help message and exit + Subscribers +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :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 + + To run this sample: @@ -115,33 +132,40 @@ To run this sample: $ python subscriber.py usage: subscriber.py [-h] - project {list,create,delete,receive,receive-flow-control} + project + {list_in_topic,list_in_project,create,delete,receive,receive-flow-control} ... - + This application demonstrates how to perform basic operations on subscriptions with the Cloud Pub/Sub API. - + For more information, see the README.md under /pubsub and the documentation at https://cloud.google.com/pubsub/docs. - + positional arguments: project Your Google Cloud project ID - {list,create,delete,receive,receive-flow-control} - list Lists all subscriptions for a given topic. + {list_in_topic,list_in_project,create,delete,receive,receive-flow-control} + list_in_topic Lists all subscriptions for a given topic. + list_in_project Lists all subscriptions in the current project. create Create a new pull subscription on the given topic. delete Deletes an existing Pub/Sub topic. receive Receives messages from a pull subscription. receive-flow-control Receives messages from a pull subscription with flow control. - + optional arguments: -h, --help show this help message and exit + Identity and Access Management +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :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 + + To run this sample: @@ -154,13 +178,13 @@ To run this sample: project {get-topic-policy,get-subscription-policy,set-topic-policy,set-subscription-policy,check-topic-permissions,check-subscription-permissions} ... - + This application demonstrates how to perform basic operations on IAM policies with the Cloud Pub/Sub API. - + For more information, see the README.md under /pubsub and the documentation at https://cloud.google.com/pubsub/docs. - + positional arguments: project Your Google Cloud project ID {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: check-subscription-permissions Checks to which permissions are available on the given subscription. - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/samples/snippets/README.rst.in b/samples/snippets/README.rst.in index 6a9fd00c7..ddbc64712 100644 --- a/samples/snippets/README.rst.in +++ b/samples/snippets/README.rst.in @@ -26,3 +26,5 @@ samples: show_help: true cloud_client_library: true + +folder: pubsub/cloud-client \ No newline at end of file