0.0.20250606 • Published 10 months ago
@maxim_mazurok/gapi.client.osconfig-v2 v0.0.20250606
TypeScript typings for OS Config API v2
OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances. For detailed description please check documentation.
Installing
Install typings for OS Config API:
npm install @types/gapi.client.osconfig-v2 --save-devUsage
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://osconfig.googleapis.com/$discovery/rest?version=v2',
() => {
// now we can use:
// gapi.client.osconfig
},
);// 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('osconfig', 'v2', () => {
// now we can use:
// gapi.client.osconfig
});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',
],
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 OS Config API resources:
0.0.20250606
10 months ago
0.0.20250601
11 months ago
0.0.20250525
11 months ago
0.0.20250519
11 months ago
0.0.20250511
11 months ago
0.0.20250504
12 months ago
0.0.20250427
12 months ago
0.0.20250420
12 months ago
0.0.20250414
1 year ago
0.0.20250407
1 year ago
0.0.20250330
1 year ago
0.0.20250323
1 year ago
0.0.20250302
1 year ago