Skip to content

Commit

Permalink
[monitoring] testing: start using build specific projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Matsuo committed May 15, 2020
1 parent e32c38a commit 86e4e0f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
21 changes: 20 additions & 1 deletion monitoring/api/v3/alerts-client/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ This directory contains samples for Google Stackdriver Alerting API. Stackdriver

.. _Google Stackdriver Alerting API: https://cloud.google.com/monitoring/alerts/

To run the sample, you need to enable the API at: https://console.cloud.google.com/apis/library/monitoring.googleapis.com

To run the sample, you need to have `Monitoring Admin` role.


Setup
-------------------------------------------------------------------------------

Expand Down Expand Up @@ -87,7 +92,21 @@ To run this sample:
list-alert-policies
list-notification-channels
enable-alert-policies
Enable or disable alert policies in a project.
Arguments: project_name (str) enable (bool): Enable or
disable the policies. filter_ (str, optional): Only
enable/disable alert policies that match this filter_.
See
https://cloud.google.com/monitoring/api/v3/sorting-
and-filtering
disable-alert-policies
Enable or disable alert policies in a project.
Arguments: project_name (str) enable (bool): Enable or
disable the policies. filter_ (str, optional): Only
enable/disable alert policies that match this filter_.
See
https://cloud.google.com/monitoring/api/v3/sorting-
and-filtering
replace-notification-channels
backup
restore
Expand All @@ -114,4 +133,4 @@ to `browse the source`_ and `report issues`_.
https://github.com/GoogleCloudPlatform/google-cloud-python/issues


.. _Google Cloud SDK: https://cloud.google.com/sdk/
.. _Google Cloud SDK: https://cloud.google.com/sdk/
5 changes: 4 additions & 1 deletion monitoring/api/v3/alerts-client/README.rst.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ product:
and many others. Stackdriver's Alerting API allows you to create,
delete, and make back up copies of your alert policies.

required_api_url: https://pantheon.corp.google.com/apis/library/monitoring.googleapis.com
required_role: Monitoring Admin

setup:
- auth
- install_deps
Expand All @@ -23,4 +26,4 @@ samples:

cloud_client_library: true

folder: monitoring/api/v3/alerts-client
folder: monitoring/api/v3/alerts-client
9 changes: 9 additions & 0 deletions scripts/readme-gen/templates/README.tmpl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ This directory contains samples for {{product.name}}. {{product.description}}

.. _{{product.name}}: {{product.url}}

{% if required_api_url %}
To run the sample, you need to enable the API at: {{required_api_url}}
{% endif %}

{% if required_role %}
To run the sample, you need to have `{{required_role}}` role.
{% endif %}


{% if setup %}
Setup
-------------------------------------------------------------------------------
Expand Down

0 comments on commit 86e4e0f

Please sign in to comment.