Skip to content

Commit 86e4e0f

Browse files
author
Takashi Matsuo
committed
[monitoring] testing: start using build specific projects
part of GoogleCloudPlatform#3310
1 parent e32c38a commit 86e4e0f

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

monitoring/api/v3/alerts-client/README.rst

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ This directory contains samples for Google Stackdriver Alerting API. Stackdriver
1414

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

17+
To run the sample, you need to enable the API at: https://console.cloud.google.com/apis/library/monitoring.googleapis.com
18+
19+
To run the sample, you need to have `Monitoring Admin` role.
20+
21+
1722
Setup
1823
-------------------------------------------------------------------------------
1924

@@ -87,7 +92,21 @@ To run this sample:
8792
list-alert-policies
8893
list-notification-channels
8994
enable-alert-policies
95+
Enable or disable alert policies in a project.
96+
Arguments: project_name (str) enable (bool): Enable or
97+
disable the policies. filter_ (str, optional): Only
98+
enable/disable alert policies that match this filter_.
99+
See
100+
https://cloud.google.com/monitoring/api/v3/sorting-
101+
and-filtering
90102
disable-alert-policies
103+
Enable or disable alert policies in a project.
104+
Arguments: project_name (str) enable (bool): Enable or
105+
disable the policies. filter_ (str, optional): Only
106+
enable/disable alert policies that match this filter_.
107+
See
108+
https://cloud.google.com/monitoring/api/v3/sorting-
109+
and-filtering
91110
replace-notification-channels
92111
backup
93112
restore
@@ -114,4 +133,4 @@ to `browse the source`_ and `report issues`_.
114133
https://github.com/GoogleCloudPlatform/google-cloud-python/issues
115134

116135

117-
.. _Google Cloud SDK: https://cloud.google.com/sdk/
136+
.. _Google Cloud SDK: https://cloud.google.com/sdk/

monitoring/api/v3/alerts-client/README.rst.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ product:
1212
and many others. Stackdriver's Alerting API allows you to create,
1313
delete, and make back up copies of your alert policies.
1414

15+
required_api_url: https://pantheon.corp.google.com/apis/library/monitoring.googleapis.com
16+
required_role: Monitoring Admin
17+
1518
setup:
1619
- auth
1720
- install_deps
@@ -23,4 +26,4 @@ samples:
2326

2427
cloud_client_library: true
2528

26-
folder: monitoring/api/v3/alerts-client
29+
folder: monitoring/api/v3/alerts-client

scripts/readme-gen/templates/README.tmpl.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ This directory contains samples for {{product.name}}. {{product.description}}
1515

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

18+
{% if required_api_url %}
19+
To run the sample, you need to enable the API at: {{required_api_url}}
20+
{% endif %}
21+
22+
{% if required_role %}
23+
To run the sample, you need to have `{{required_role}}` role.
24+
{% endif %}
25+
26+
1827
{% if setup %}
1928
Setup
2029
-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)