3.0.20220806 • Published 3 years ago

@maxim_mazurok/gapi.client.monitoring v3.0.20220806

Weekly downloads
91
License
MIT
Repository
github
Last release
3 years 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('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({  });
3.0.20220725

3 years ago

3.0.20220806

3 years ago

3.0.20220730

3 years ago

3.0.20220612

3 years ago

3.0.20220715

3 years ago

3.0.20220713

3 years ago

3.0.20220704

3 years ago

3.0.20220626

3 years ago

3.0.20220708

3 years ago

3.0.20220619

3 years ago

3.0.20220606

3 years ago

3.0.20220529

3 years ago

3.0.20220525

3 years ago

3.0.20220507

3 years ago

3.0.20220430

3 years ago

3.0.20220513

3 years ago

3.0.20220411

3 years ago

3.0.20220413

3 years ago

3.0.20220319

3 years ago

3.0.20220322

3 years ago

3.0.20220327

3 years ago

3.0.20220402

3 years ago

3.0.20220418

3 years ago

3.0.20220426

3 years ago

3.0.20220424

3 years ago

3.0.20220312

3 years ago

3.0.20220131

3 years ago

3.0.20220214

3 years ago

3.0.20220124

3 years ago

3.0.20220205

3 years ago

3.0.20220117

3 years ago

3.0.20220218

3 years ago

3.0.20211230

4 years ago

3.0.20220107

3 years ago

3.0.20211108

4 years ago

3.0.20211213

4 years ago

3.0.20211201

4 years ago

3.0.20211206

4 years ago

3.0.20211115

4 years ago

3.0.20211026

4 years ago

3.0.20211031

4 years ago

3.0.20211002

4 years ago

3.0.20211017

4 years ago

3.0.20210926

4 years ago

3.0.20210922

4 years ago

3.0.20210830

4 years ago

3.0.20210816

4 years ago

3.0.20210809

4 years ago

3.0.20210803

4 years ago

3.0.20210727

4 years ago

3.0.20210720

4 years ago

3.0.20210712

4 years ago

3.0.20210702

4 years ago

3.0.20210625

4 years ago

3.0.20210618

4 years ago

3.0.20210614

4 years ago

3.0.20210606

4 years ago

3.0.20210529

4 years ago

3.0.20210522

4 years ago

3.0.20210514

4 years ago

3.0.20210509

4 years ago

3.0.20210501

4 years ago

3.0.20210430

4 years ago

3.0.20210427

4 years ago

3.0.20210417

4 years ago

3.0.20210414

4 years ago

3.0.20210409

4 years ago

3.0.20210403

4 years ago

3.0.20210326

4 years ago

3.0.20210322

4 years ago

3.0.20210316

4 years ago

3.0.20210307

4 years ago

3.0.20210227

4 years ago

3.0.20210222

4 years ago

3.0.20210213

4 years ago

3.0.20210206

4 years ago

3.0.20210131

4 years ago

3.0.20210124

4 years ago

3.0.20210109

4 years ago

3.0.20201213

5 years ago

3.0.20201208

5 years ago

3.0.20201203

5 years ago

3.0.20201201

5 years ago

3.0.20201116

5 years ago

3.0.20201107

5 years ago