Skip to content

Commit

Permalink
docs: remove code snippet and 'Stackdriver' (#71)
Browse files Browse the repository at this point in the history
Remove the code snippet which is untested. Fixes #70. Also remove 'Stackdriver' from the README.
  • Loading branch information
busunkim96 authored Mar 6, 2021
1 parent 7e7ee9b commit 97ccaea
Showing 1 changed file with 7 additions and 32 deletions.
39 changes: 7 additions & 32 deletions packages/google-cloud-monitoring/README.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Python Client for Stackdriver Monitoring API
Python Client for Cloud Monitoring API
=======================================================

|ga| |pypi| |versions|

`Stackdriver Monitoring API`_: Manages your Stackdriver Monitoring data and
configurations. Most projects must be associated with a Stackdriver account,
`Cloud Monitoring API`_: Manages your Cloud Monitoring data and
configurations. Most projects must be associated with a Google Cloud account,
with a few exceptions as noted on the individual method pages.

- `Client Library Documentation`_
Expand All @@ -16,7 +16,7 @@ with a few exceptions as noted on the individual method pages.
:target: https://pypi.org/project/google-cloud-monitoring/
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-monitoring.svg
:target: https://pypi.org/project/google-cloud-monitoring/
.. _Stackdriver Monitoring API: https://cloud.google.com/monitoring/api/ref_v3/rest/
.. _Cloud Monitoring API: https://cloud.google.com/monitoring/api/ref_v3/rest/
.. _Client Library Documentation: https://googleapis.dev/python/monitoring/latest
.. _Product Documentation: https://cloud.google.com/monitoring/docs

Expand All @@ -27,12 +27,12 @@ In order to use this library, you first need to go through the following steps:

1. `Select or create a Cloud Platform project.`_
2. `Enable billing for your project.`_
3. `Enable the Stackdriver Monitoring API.`_
3. `Enable the Cloud Monitoring API.`_
4. `Setup Authentication.`_

.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
.. _Enable the Stackdriver Monitoring API.: https://cloud.google.com/monitoring/api/enable-api
.. _Enable the Cloud Monitoring API.: https://cloud.google.com/monitoring/api/enable-api
.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html

Installation
Expand Down Expand Up @@ -81,37 +81,12 @@ Windows
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-cloud-monitoring
Preview
~~~~~~~

MetricServiceClient
^^^^^^^^^^^^^^^^^^^

.. code:: py
from google.cloud import monitoring_v3
client = monitoring_v3.MetricServiceClient()
name = client.project_path('[PROJECT]')
# Iterate over all results
for element in client.list_monitored_resource_descriptors(name):
# process element
pass
# Or iterate over results one page at a time
for page in client.list_monitored_resource_descriptors(name).pages:
for element in page:
# process element
pass
Next Steps
~~~~~~~~~~


- Read the `Client Library Documentation`_ for Stackdriver Monitoring API
- Read the `Client Library Documentation`_ for Cloud Monitoring API
to see other available methods on the client.
- Read the `Product documentation`_ to learn more about the product and see
How-to Guides.

0 comments on commit 97ccaea

Please sign in to comment.