0.0.20240505 • Published 4 days ago

@maxim_mazurok/gapi.client.monitoring-v3 v0.0.20240505

Weekly downloads
-
License
MIT
Repository
github
Last release
4 days ago

TypeScript typings for Cloud Monitoring API v3

Manages your Cloud Monitoring data and configurations. For detailed description please check documentation.

Installing

Install typings for Cloud Monitoring API:

npm install @types/gapi.client.monitoring-v3 --save-dev

Usage

You need to initialize Google API client in your code:

gapi.load('client', () => {
  // now we can use gapi.client
  // ...
});

Then load api client wrapper:

gapi.client.load(
  'https://monitoring.googleapis.com/$discovery/rest?version=v3',
  () => {
    // now we can use:
    // gapi.client.monitoring
  }
);
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
gapi.client.load('monitoring', 'v3', () => {
  // now we can use:
  // gapi.client.monitoring
});

Don't forget to authenticate your client before sending any request to resources:

// declare client_id registered in Google Developers Console
var client_id = '',
  scope = [
    // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
    'https://www.googleapis.com/auth/cloud-platform',

    // View and write monitoring data for all of your Google and third-party Cloud and API projects
    'https://www.googleapis.com/auth/monitoring',

    // View monitoring data for all of your Google Cloud and third-party projects
    'https://www.googleapis.com/auth/monitoring.read',

    // Publish metric data to your Google Cloud projects
    'https://www.googleapis.com/auth/monitoring.write',
  ],
  immediate = true;
// ...

gapi.auth.authorize(
  {client_id: client_id, scope: scope, immediate: immediate},
  authResult => {
    if (authResult && !authResult.error) {
      /* handle successful authorization */
    } else {
      /* handle authorization error */
    }
  }
);

After that you can use Cloud Monitoring API resources:

/*
Create a Service.
*/
await gapi.client.monitoring.services.create({parent: 'parent'});

/*
Soft delete this Service.
*/
await gapi.client.monitoring.services.delete({name: 'name'});

/*
Get the named Service.
*/
await gapi.client.monitoring.services.get({name: 'name'});

/*
List Services for this Metrics Scope.
*/
await gapi.client.monitoring.services.list({parent: 'parent'});

/*
Update this Service.
*/
await gapi.client.monitoring.services.patch({name: 'name'});

/*
Returns the list of IP addresses that checkers run from
*/
await gapi.client.monitoring.uptimeCheckIps.list({});
0.0.20240505

4 days ago

0.0.20240427

8 days ago

0.0.20240420

18 days ago

0.0.20240414

25 days ago

0.0.20240324

2 months ago

0.0.20240317

2 months ago

0.0.20240310

2 months ago

0.0.20240303

2 months ago

0.0.20240211

3 months ago

0.0.20240128

3 months ago

0.0.20240121

4 months ago

0.0.20240118

4 months ago

0.0.20240116

4 months ago

0.0.20240115

4 months ago

0.0.20240111

4 months ago

0.0.20240110

4 months ago

0.0.20240109

4 months ago

0.0.20240105

4 months ago

0.0.20240104

4 months ago

0.0.20240103

4 months ago

0.0.20240101

4 months ago

0.0.20240102

4 months ago

0.0.20231220

5 months ago

0.0.20231218

5 months ago

0.0.20231215

5 months ago

0.0.20231214

5 months ago

0.0.20231213

5 months ago

0.0.20231212

5 months ago

0.0.20231208

5 months ago

0.0.20231207

5 months ago

0.0.20231205

5 months ago

0.0.20231204

5 months ago

0.0.20231201

5 months ago

0.0.20231130

5 months ago

0.0.20231105

6 months ago

0.0.20231108

6 months ago

0.0.20230731

9 months ago

0.0.20231107

6 months ago

0.0.20231109

6 months ago

0.0.20230813

9 months ago

0.0.20231111

6 months ago

0.0.20231113

6 months ago

0.0.20231115

6 months ago

0.0.20231114

6 months ago

0.0.20231030

6 months ago

0.0.20230806

9 months ago

0.0.20230924

8 months ago

0.0.20230724

10 months ago

0.0.20231023

7 months ago

0.0.20231102

6 months ago

0.0.20230918

8 months ago

0.0.20230910

8 months ago

0.0.20231009

7 months ago

0.0.20230913

8 months ago

0.0.20230716

10 months ago

0.0.20231016

7 months ago

0.0.20230708

10 months ago

0.0.20230907

8 months ago

0.0.20230821

9 months ago

0.0.20231116

6 months ago

0.0.20230903

8 months ago

0.0.20230703

10 months ago

0.0.20231001

7 months ago

0.0.20230626

11 months ago

0.0.20230618

11 months ago

0.0.20230612

11 months ago

0.0.20230605

11 months ago

0.0.20230529

12 months ago

0.0.20230531

11 months ago

0.0.20230518

12 months ago

0.0.20230515

12 months ago

0.0.20230521

12 months ago

0.0.20230429

1 year ago

0.0.20230507

1 year ago

0.0.20230414

1 year ago

0.0.20230412

1 year ago

0.0.20230417

1 year ago

0.0.20230320

1 year ago

0.0.20230403

1 year ago

0.0.20230326

1 year ago

0.0.20230304

1 year ago

0.0.20230227

1 year ago

0.0.20230424

1 year ago

0.0.20230410

1 year ago

0.0.20230220

1 year ago

0.0.20230206

1 year ago

0.0.20230203

1 year ago

0.0.20230130

1 year ago

0.0.20230212

1 year ago

0.0.20221130

1 year ago

0.0.20230115

1 year ago

0.0.20221114

1 year ago

0.0.20221212

1 year ago

0.0.20230102

1 year ago

0.0.20221107

2 years ago

0.0.20230123

1 year ago

0.0.20221205

1 year ago

0.0.20230109

1 year ago

0.0.20221219

1 year ago

0.0.20221031

2 years ago

0.0.20221017

2 years ago

0.0.20221024

2 years ago

0.0.20220928

2 years ago

0.0.20220930

2 years ago

0.0.20220926

2 years ago

0.0.20220916

2 years ago

0.0.20220819

2 years ago

0.0.20220910

2 years ago

0.0.20220826

2 years ago

0.0.20220904

2 years ago

0.0.20220812

2 years ago

0.0.20220806

2 years ago