Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: migrate code from googleapis/nodejs-monitoring #2807

Merged
merged 146 commits into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
f72c911
Add Monitoring v3 Samples
Mar 16, 2016
de6667d
Fix metric filter call
Mar 17, 2016
139d160
Update README.md
waprin Mar 22, 2016
97372e2
Add Monitoring Tests
Mar 17, 2016
f6b13aa
Switched from JSHint to Semistandard and upgraded dependencies.
jmdobry May 23, 2016
51c28a0
Re-organized readme files.
jmdobry May 24, 2016
45bda51
Fixed mismatched links.
jmdobry May 25, 2016
90fc988
New samples for Cloud Functions docs (#132)
jmdobry Jun 23, 2016
ff6b93c
Refactored tests (#159)
jmdobry Aug 3, 2016
5dcb2d9
* Refactored Pub/Sub samples into nice command-line programs, like th…
jmdobry Aug 10, 2016
75a6693
Remove output only fields (#170)
waprin Aug 16, 2016
ddbe898
Stackdriver product rename (#209)
Sep 8, 2016
c2a1f81
Refactor Cloud Functions samples. (#245)
jmdobry Nov 16, 2016
350056a
Update storage samples. (#263)
jmdobry Dec 9, 2016
f5869a0
Switch from Mocha to Ava for faster tests (#289)
jmdobry Jan 6, 2017
1dbde86
Switch to Yarn for CI build. (#290)
jmdobry Jan 9, 2017
bad23d1
Vision snippets. (#294)
jmdobry Jan 10, 2017
5d68c38
Add region tags for writing timeseries (#298)
waprin Jan 13, 2017
b3f701e
Add new Monitoring snippets. (#301)
jmdobry Jan 25, 2017
ed71f33
Update dependencies.
jmdobry Feb 6, 2017
f412dec
Travis: fix failing tests + update dependencies (#335)
Apr 5, 2017
106b269
Cleanup App Engine samples and re-work tests. (#354)
jmdobry Apr 24, 2017
9eaf725
Upgrade to repo tools v1.4.7 (#370)
jmdobry May 2, 2017
242843b
Upgrade repo tools and regenerate READMEs. (#384)
jmdobry May 10, 2017
1dde6ee
Upgrade repo tools and regenerate READMEs.
jmdobry May 16, 2017
e4d39b8
Add + run dependency updating (bash) script (#401)
Jun 19, 2017
0d17aa1
Build updates. (#462)
jmdobry Aug 23, 2017
77b253d
Update dependencies (#468)
Aug 31, 2017
7b559bf
Update Monitoring samples. (#493)
jmdobry Sep 29, 2017
1ebfc82
Add Uptime Check Config API samples.
jmdobry Sep 12, 2017
3a47626
Add Uptime Check Service, Migrate Repository (#2)
lukesneeringer Oct 19, 2017
a60d8c0
Pin monitoring version for samples. (#6)
lukesneeringer Oct 19, 2017
f82d8b8
Make samples tests permissive of lack of data. (#7)
lukesneeringer Oct 19, 2017
cbe9d41
Fix docs, upgrade tools, and regenerate. (#9)
jmdobry Oct 23, 2017
934fb23
Upgrade repo-tools and regenerate scaffolding. (#14)
jmdobry Oct 30, 2017
6a1b9a8
Upgrade repo-tools and regenerate scaffolding. (#26)
jmdobry Mar 16, 2018
1e7a0c5
chore: make samples depend on the current version (#30)
alexander-fenster Mar 21, 2018
ddc0a57
chore: revert version back, was bumped by mistake (#35)
alexander-fenster Mar 30, 2018
88b03c1
Fixes #29 (#34)
jmdobry Mar 30, 2018
1d1531c
chore: bump version to 0.5.0 (#38)
alexander-fenster Mar 30, 2018
521d50f
chore: lock files maintenance (#39)
alexander-fenster May 2, 2018
23f9e70
Add Alerting samples. (#41)
jmdobry May 4, 2018
e32fbb0
Fix region tags. (#42)
jmdobry May 4, 2018
9815f9a
Fixes #43. (#44)
jmdobry May 7, 2018
cba541f
test: add resource type filter to alerts test (#46)
alexander-fenster May 7, 2018
789cbf9
chore: lock files maintenance (#45)
alexander-fenster May 10, 2018
6da6ee2
test: fix uptime sample test (#48)
alexander-fenster May 18, 2018
f217673
chore: lock files maintenance (#51)
alexander-fenster May 22, 2018
cabdc1a
chore: update sample lockfiles (#60)
JustinBeckwith Jun 25, 2018
fd7adf4
refactor: drop repo-tool as an exec wrapper (#61)
JustinBeckwith Jun 26, 2018
9dd8c80
fix(deps): update dependency yargs to v12 (#65)
renovate[bot] Jun 27, 2018
038e5fd
chore(deps): update dependency sinon to v6 (#64)
renovate[bot] Jun 27, 2018
ce7b36d
fix: re-generate some lock files (#66)
JustinBeckwith Jul 2, 2018
f958468
chore(deps): lock file maintenance (#67)
renovate[bot] Jul 3, 2018
fa63bab
chore(deps): lock file maintenance (#69)
renovate[bot] Jul 3, 2018
ec13783
chore(deps): lock file maintenance (#70)
renovate[bot] Jul 3, 2018
8108c16
chore(deps): lock file maintenance (#71)
renovate[bot] Jul 10, 2018
9d5fbf1
chore(deps): lock file maintenance (#74)
renovate[bot] Jul 10, 2018
ab8e210
chore(deps): lock file maintenance (#75)
renovate[bot] Jul 10, 2018
db5a334
chore(deps): lock file maintenance (#79)
renovate[bot] Jul 17, 2018
d5db9d0
chore(deps): lock file maintenance (#83)
renovate[bot] Jul 24, 2018
e33bf07
chore: require node 8 for samples (#86)
JustinBeckwith Jul 30, 2018
17dddb3
chore(deps): lock file maintenance (#87)
renovate[bot] Jul 31, 2018
6695496
chore(deps): lock file maintenance (#91)
renovate[bot] Aug 7, 2018
7d38af0
chore: ignore package-lock.json (#93)
JustinBeckwith Aug 7, 2018
bf570a0
test: add sample for updating an uptime check (#95)
fhinkel Aug 10, 2018
b2bef9e
fix(deps): update dependency @google-cloud/monitoring to ^0.6.0 (#104)
renovate[bot] Aug 16, 2018
cf320ec
Enable prefer-const in the eslint config (#124)
JustinBeckwith Sep 20, 2018
1db893d
Fix failing sample tests (#126)
JustinBeckwith Sep 21, 2018
dc59072
chore(deps): update dependency sinon to v7 (#133)
renovate[bot] Oct 14, 2018
08ea9dd
refactor: remove unused deps
JustinBeckwith Nov 9, 2018
b901943
chore(deps): update dependency @google-cloud/nodejs-repo-tools to v3 …
renovate[bot] Nov 10, 2018
6b2b672
docs(samples): convert samples to async/await, and use mocha for test…
muraliQlogic Nov 16, 2018
328c888
test: fix failing tests due to leaks (#163)
JustinBeckwith Nov 16, 2018
8d34d07
chore: add samples for channel notification (#185)
fhinkel Dec 13, 2018
c02ebf9
chore: fix region tags (#187)
fhinkel Dec 13, 2018
7a18a72
chore: fix name of region tag (#188)
fhinkel Dec 13, 2018
34e6f43
refactor: modernize and fix the sample tests (#193)
JustinBeckwith Dec 19, 2018
0c155df
Release v0.7.0 (#199)
JustinBeckwith Jan 15, 2019
398d390
fix(deps): update dependency yargs to v13 (#213)
renovate[bot] Feb 12, 2019
700cb6b
chore(deps): update dependency mocha to v6 (#217)
renovate[bot] Feb 25, 2019
1757bf3
chore(deps): update dependency p-retry to v4 (#223)
renovate[bot] Mar 11, 2019
e25f48b
Release v0.7.1 (#225)
JustinBeckwith Mar 14, 2019
27bdf38
refactor: use execSync for tests (#234)
JustinBeckwith Apr 10, 2019
f7012ea
chore: release 1.0.0 (#256)
yoshi-automation May 20, 2019
d552b2f
chore: release 1.1.0 (#266)
yoshi-automation Jun 5, 2019
4bd6b71
feat: add .repo-metadata for README generation (#263)
bcoe Jun 6, 2019
0606e63
chore: release 1.2.0 (#267)
yoshi-automation Jun 6, 2019
fe3aa2c
chore: release 1.2.1 (#270)
yoshi-automation Jun 14, 2019
db95037
chore: release 1.2.2 (#274)
yoshi-automation Jun 26, 2019
9795ed1
chore: release 1.2.3 (#282)
yoshi-automation Aug 3, 2019
8b35edc
fix(deps): update dependency yargs to v14
renovate-bot Aug 20, 2019
5e716c9
chore: release 1.3.0 (#290)
yoshi-automation Sep 16, 2019
492f806
fix: update sample for enabling or disabling a policy (#305)
fhinkel Oct 3, 2019
28e9b35
chore: release 1.5.0 (#314)
release-please[bot] Oct 22, 2019
2d29d11
chore: release 1.6.0 (#330)
release-please[bot] Nov 15, 2019
7b11d9c
fix(deps): update dependency yargs to v15 (#333)
renovate-bot Nov 18, 2019
9055f56
chore: update license headers
JustinBeckwith Nov 25, 2019
095bb38
chore: release 1.6.1 (#334)
release-please[bot] Dec 5, 2019
f3d360a
docs: update jsdoc license/samples-README (#340)
bcoe Dec 24, 2019
eafbcf7
refactor: use explicit mocha imports (#343)
JustinBeckwith Dec 31, 2019
6a81074
chore: release 1.7.0 (#344)
release-please[bot] Jan 2, 2020
7065552
chore(deps): update dependency mocha to v7 (#347)
renovate-bot Jan 17, 2020
f004ed1
feat!: monitoring convert to typescript (#360)
summer-ji-eng Feb 18, 2020
bcf9545
chore(deps): update dependency uuid to v7
renovate-bot Feb 26, 2020
f94a942
test: add log to debug tests (#384)
JustinBeckwith Mar 15, 2020
da4c3b5
test: add sample test debugging (#385)
JustinBeckwith Mar 17, 2020
0e00dc1
chore: add debugging info (#394)
JustinBeckwith Mar 24, 2020
8f73e48
feat!: drop node8 support, support for async iterators (#396)
alexander-fenster Mar 31, 2020
5e5a501
refactor(test): use exponential backoff and retry some integration te…
bcoe Apr 3, 2020
aec87a5
test: handle a couple more flaky tests (#405)
bcoe Apr 3, 2020
9fea062
test: configure more tests with retries (#407)
bcoe Apr 3, 2020
daefaed
test: sometimes there are no metrics from 10 minutes ago (#411)
bcoe Apr 6, 2020
3bd0f16
feat: Update public client library for Cloud Monitoring to introduce …
yoshi-automation Apr 23, 2020
80b9f08
chore(deps): update dependency uuid to v8 (#428)
renovate-bot May 1, 2020
e86ab25
chore: release 2.0.0 (#377)
release-please[bot] May 18, 2020
de4ab50
chore: release 2.1.0 (#441)
release-please[bot] Jun 22, 2020
e5b9555
chore(deps): update dependency mocha to v8 (#448)
renovate-bot Jun 24, 2020
f5340af
chore: release 2.1.1 (#465)
release-please[bot] Jul 27, 2020
222446a
fix(deps): update dependency yargs to v16 (#480)
renovate-bot Sep 9, 2020
c51d6e8
chore: release 2.1.2 (#481)
release-please[bot] Sep 17, 2020
69a4936
chore: release 2.1.3 (#498)
release-please[bot] Nov 11, 2020
049344e
chore: release 2.1.4 (#502)
release-please[bot] Dec 2, 2020
f9e5fb6
fix: update alert policies one at a time because (concurrent updates …
syedashrafulla Dec 22, 2020
23ac167
chore: release 2.1.5 (#509)
release-please[bot] Jan 7, 2021
322de41
chore: release 2.2.0 (#514)
release-please[bot] Jan 12, 2021
f800984
chore: release 2.3.0 (#524)
release-please[bot] Mar 29, 2021
81da98f
chore: release 2.3.1 (#535)
release-please[bot] May 13, 2021
429bd34
chore: release 2.3.2 (#553)
release-please[bot] Jun 29, 2021
d6eb750
chore: release 2.3.3 (#559)
release-please[bot] Jul 16, 2021
ea969b1
samples: use modern samples layout (#556)
JustinBeckwith Aug 4, 2021
12ed444
chore: remove duplicate alert samples (#568)
JustinBeckwith Aug 5, 2021
d2af0cc
chore: release 2.3.4 (#571)
release-please[bot] Aug 17, 2021
2fa61f0
chore: split metrics samples (#572)
JustinBeckwith Aug 30, 2021
b69e84c
fix(build): update branch to main (#574)
bcoe Sep 8, 2021
c648052
chore: release 2.3.5 (#575)
release-please[bot] Sep 8, 2021
34d6133
build!: update library to use Node 12 (#617)
sofisl May 20, 2022
0c13388
chore(main): release 3.0.0 (#618)
release-please[bot] Jun 7, 2022
cba101a
chore(main): release 3.0.1 (#625)
release-please[bot] Aug 26, 2022
73178fc
chore(deps): update dependency uuid to v9 (#629)
renovate-bot Sep 9, 2022
7df60e4
chore(main): release 3.0.2 (#628)
release-please[bot] Sep 26, 2022
c7a74a4
Adds monitoring-snippets.yaml for samples migration
ahrarmonsur Nov 8, 2022
75ff39b
Adds the monitoring/snippets directory to workflows
ahrarmonsur Nov 8, 2022
2539789
Excluding README and quickstart.js sample from migration
ahrarmonsur Nov 9, 2022
4623641
Adjusts order of CI tasks to fix failing tests
ahrarmonsur Nov 9, 2022
7be98e2
Update Google Inc to Google LLC
ahrarmonsur Nov 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/monitoring-snippets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: monitoring-snippets
on:
push:
branches:
- main
paths:
- 'monitoring/snippets/**'
pull_request:
paths:
- 'monitoring/snippets/**'
pull_request_target:
types: [labeled]
schedule:
- cron: '0 0 * * 0'
jobs:
test:
if: ${{ github.event.action != 'labeled' || github.event.label.name == 'actions:force-run' }}
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: 'write'
pull-requests: 'write'
id-token: 'write'
steps:
- uses: actions/checkout@v3.1.0
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: 'google-github-actions/auth@v0.8.3'
with:
workload_identity_provider: 'projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider'
service_account: 'kokoro-system-test@long-door-651.iam.gserviceaccount.com'
create_credentials_file: 'true'
access_token_lifetime: 600s
- uses: actions/setup-node@v3.5.1
with:
node-version: 16
- run: npm install
working-directory: monitoring/snippets
- run: npm test
working-directory: monitoring/snippets
env:
MOCHA_REPORTER_SUITENAME: monitoring_snippets
MOCHA_REPORTER_OUTPUT: monitoring_snippets_sponge_log.xml
MOCHA_REPORTER: xunit
- if: ${{ github.event.action == 'labeled' && github.event.label.name == 'actions:force-run' }}
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
await github.rest.issues.removeLabel({
name: 'actions:force-run',
owner: 'GoogleCloudPlatform',
repo: 'nodejs-docs-samples',
issue_number: context.payload.pull_request.number
});
} catch (e) {
if (!e.message.includes('Label does not exist')) {
throw e;
}
}
- if: ${{ github.event_name == 'schedule'}}
run: |
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot -o flakybot -s -L
chmod +x ./flakybot
./flakybot --repo GoogleCloudPlatform/nodejs-docs-samples --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
1 change: 1 addition & 0 deletions .github/workflows/workflows.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"mediatranslation",
"monitoring/opencensus",
"monitoring/prometheus",
"monitoring/snippets",
"datacatalog/cloud-client",
"datacatalog/quickstart",
"datastore/functions",
Expand Down
3 changes: 3 additions & 0 deletions monitoring/snippets/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
rules:
no-console: off
2 changes: 2 additions & 0 deletions monitoring/snippets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
policies_backup.json
package-lock.json
60 changes: 60 additions & 0 deletions monitoring/snippets/alerts.backupPolicies.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

function main(projectId) {
// [START monitoring_alert_backup_policies]
const fs = require('fs');

// Imports the Google Cloud client library
const monitoring = require('@google-cloud/monitoring');

// Creates a client
const client = new monitoring.AlertPolicyServiceClient();

async function backupPolicies() {
/**
* TODO(developer): Uncomment the following lines before running the sample.
*/
// const projectId = 'YOUR_PROJECT_ID';

const listAlertPoliciesRequest = {
name: client.projectPath(projectId),
};

let [policies] = await client.listAlertPolicies(listAlertPoliciesRequest);

// filter out any policies created by tests for this sample
policies = policies.filter(policy => {
return !policy.displayName.startsWith('gcloud-tests-');
});

fs.writeFileSync(
'./policies_backup.json',
JSON.stringify(policies, null, 2),
'utf-8'
);

console.log('Saved policies to ./policies_backup.json');
// [END monitoring_alert_backup_policies]
}
backupPolicies();
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
60 changes: 60 additions & 0 deletions monitoring/snippets/alerts.deleteChannels.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

function main(projectId, filter) {
// [START monitoring_alert_delete_channel]
// [START monitoring_alert_list_channels]

// Imports the Google Cloud client library
const monitoring = require('@google-cloud/monitoring');

// Creates a client
const client = new monitoring.NotificationChannelServiceClient();

async function deleteChannels() {
/**
* TODO(developer): Uncomment the following lines before running the sample.
*/
// const projectId = 'YOUR_PROJECT_ID';
// const filter = 'A filter for selecting policies, e.g. description:"cloud"';

const request = {
name: client.projectPath(projectId),
filter,
};
const channels = await client.listNotificationChannels(request);
console.log(channels);
for (const channel of channels[0]) {
console.log(`Deleting channel ${channel.displayName}`);
try {
await client.deleteNotificationChannel({
name: channel.name,
});
} catch (err) {
// ignore error
}
}
}
deleteChannels();
// [END monitoring_alert_delete_channel]
// [END monitoring_alert_list_channels]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
71 changes: 71 additions & 0 deletions monitoring/snippets/alerts.enablePolicies.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

function main(projectId, enabled, filter) {
enabled = enabled === 'true';

// [START monitoring_alert_enable_policies]
// Imports the Google Cloud client library
const monitoring = require('@google-cloud/monitoring');

// Creates a client
const client = new monitoring.AlertPolicyServiceClient();

async function enablePolicies() {
/**
* TODO(developer): Uncomment the following lines before running the sample.
*/
// const projectId = 'YOUR_PROJECT_ID';
// const enabled = true;
// const filter = 'A filter for selecting policies, e.g. description:"cloud"';

const listAlertPoliciesRequest = {
name: client.projectPath(projectId),
// See https://cloud.google.com/monitoring/alerting/docs/sorting-and-filtering
filter: filter,
};

const [policies] = await client.listAlertPolicies(listAlertPoliciesRequest);
const responses = [];
for (const policy of policies) {
responses.push(
await client.updateAlertPolicy({
updateMask: {
paths: ['enabled'],
},
alertPolicy: {
name: policy.name,
enabled: {
value: enabled,
},
},
})
);
}
responses.forEach(response => {
const alertPolicy = response[0];
console.log(`${enabled ? 'Enabled' : 'Disabled'} ${alertPolicy.name}.`);
});
}
enablePolicies();
// [END monitoring_alert_enable_policies]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
51 changes: 51 additions & 0 deletions monitoring/snippets/alerts.listPolicies.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

function main(projectId) {
// [START monitoring_alert_list_policies]
// Imports the Google Cloud client library
const monitoring = require('@google-cloud/monitoring');

// Creates a client
const client = new monitoring.AlertPolicyServiceClient();

async function listPolicies() {
/**
* TODO(developer): Uncomment the following lines before running the sample.
*/
// const projectId = 'YOUR_PROJECT_ID';

const listAlertPoliciesRequest = {
name: client.projectPath(projectId),
};
const [policies] = await client.listAlertPolicies(listAlertPoliciesRequest);
console.log('Policies:');
policies.forEach(policy => {
console.log(` Display name: ${policy.displayName}`);
if (policy.documentation && policy.documentation.content) {
console.log(` Documentation: ${policy.documentation.content}`);
}
});
}
listPolicies();
// [END monitoring_alert_list_policies]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Loading