3.0.20220806 • Published 2 years ago

@maxim_mazurok/gapi.client.monitoring v3.0.20220806

Weekly downloads
91
License
MIT
Repository
github
Last release
2 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

2 years ago

3.0.20220806

2 years ago

3.0.20220730

2 years ago

3.0.20220612

2 years ago

3.0.20220715

2 years ago

3.0.20220713

2 years ago

3.0.20220704

2 years ago

3.0.20220626

2 years ago

3.0.20220708

2 years ago

3.0.20220619

2 years ago

3.0.20220606

2 years ago

3.0.20220529

2 years ago

3.0.20220525

2 years ago

3.0.20220507

2 years ago

3.0.20220430

2 years ago

3.0.20220513

2 years ago

3.0.20220411

2 years ago

3.0.20220413

2 years ago

3.0.20220319

2 years ago

3.0.20220322

2 years ago

3.0.20220327

2 years ago

3.0.20220402

2 years ago

3.0.20220418

2 years ago

3.0.20220426

2 years ago

3.0.20220424

2 years ago

3.0.20220312

2 years ago

3.0.20220131

2 years ago

3.0.20220214

2 years ago

3.0.20220124

2 years ago

3.0.20220205

2 years ago

3.0.20220117

2 years ago

3.0.20220218

2 years ago

3.0.20211230

2 years ago

3.0.20220107

2 years ago

3.0.20211108

2 years ago

3.0.20211213

2 years ago

3.0.20211201

2 years ago

3.0.20211206

2 years ago

3.0.20211115

2 years ago

3.0.20211026

3 years ago

3.0.20211031

3 years ago

3.0.20211002

3 years ago

3.0.20211017

3 years ago

3.0.20210926

3 years ago

3.0.20210922

3 years ago

3.0.20210830

3 years ago

3.0.20210816

3 years ago

3.0.20210809

3 years ago

3.0.20210803

3 years ago

3.0.20210727

3 years ago

3.0.20210720

3 years ago

3.0.20210712

3 years ago

3.0.20210702

3 years ago

3.0.20210625

3 years ago

3.0.20210618

3 years ago

3.0.20210614

3 years ago

3.0.20210606

3 years ago

3.0.20210529

3 years ago

3.0.20210522

3 years ago

3.0.20210514

3 years ago

3.0.20210509

3 years ago

3.0.20210501

3 years ago

3.0.20210430

3 years ago

3.0.20210427

3 years ago

3.0.20210417

3 years ago

3.0.20210414

3 years ago

3.0.20210409

3 years ago

3.0.20210403

3 years ago

3.0.20210326

3 years ago

3.0.20210322

3 years ago

3.0.20210316

3 years ago

3.0.20210307

3 years ago

3.0.20210227

3 years ago

3.0.20210222

3 years ago

3.0.20210213

3 years ago

3.0.20210206

3 years ago

3.0.20210131

3 years ago

3.0.20210124

3 years ago

3.0.20210109

3 years ago

3.0.20201213

3 years ago

3.0.20201208

3 years ago

3.0.20201203

3 years ago

3.0.20201201

3 years ago

3.0.20201116

3 years ago

3.0.20201107

3 years ago