Skip to content

Commit d249cad

Browse files
authored
Add documentation on command-line function to get client ID (GoogleCloudPlatform#5712)
## Description Fixes GoogleCloudPlatform#5546 ## Checklist - [x] I have followed [Sample Guidelines from AUTHORING_GUIDE.MD](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md) - [x] README is updated to include [all relevant information](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#readme-file) - [x] **Tests** pass: `nox -s py-3.6` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup)) - [x] **Lint** pass: `nox -s lint` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup)) - [ ] These samples need a new **API enabled** in testing projects to pass (let us know which ones) - [ ] These samples need a new/updated **env vars** in testing projects set to pass (let us know which ones) - [x] Please **merge** this PR for me once it is approved. - [ ] This sample adds a new sample directory, and I updated the [CODEOWNERS file](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/.github/CODEOWNERS) with the codeowners for this sample
1 parent f848144 commit d249cad

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

composer/rest/README.rst

+27-8
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,37 @@ Install Dependencies
6161
Samples
6262
-------------------------------------------------------------------------------
6363

64-
Determine Cloud Storage path for DAGs
64+
Determine client ID associated with a Cloud Composer environment
6565
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6666

67-
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
68-
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=composer/rest/get_dag_prefix.py,composer/rest/README.rst
67+
To run this sample:
6968

69+
.. code-block:: bash
7070
71+
$ python get_client_id.py
72+
usage: get_client_id.py [-h] project_id location composer_environment
7173
74+
Get the client ID associated with a Cloud Composer environment.
75+
76+
positional arguments:
77+
project_id Your Project ID.
78+
location Region of the Cloud Composer environment.
79+
composer_environment Name of the Cloud Composer environment.
80+
81+
optional arguments:
82+
-h, --help show this help message and exit
83+
84+
In case of any issue with `get_client_id.py`, you can also get the client ID using the following command, where `AIRFLOW_URL` would be the URL of your Airflow webserver (ex. `https://*****************-tp.appspot.com`_):
85+
86+
.. code-block:: bash
87+
88+
$ curl -v AIRFLOW_URL 2>&1 >/dev/null | grep -o "client_id\=[A-Za-z0-9-]*\.apps\.googleusercontent\.com"
89+
90+
Determine Cloud Storage path for DAGs
91+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
92+
93+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
94+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=composer/rest/get_dag_prefix.py,composer/rest/README.rst
7295

7396
To run this sample:
7497

@@ -91,8 +114,4 @@ To run this sample:
91114
optional arguments:
92115
-h, --help show this help message and exit
93116
94-
95-
96-
97-
98-
.. _Google Cloud SDK: https://cloud.google.com/sdk/
117+
.. _Google Cloud SDK: https://cloud.google.com/sdk/

0 commit comments

Comments
 (0)