0.0.20241025 • Published 10 months ago

@maxim_mazurok/gapi.client.cloudasset-v1p1beta1 v0.0.20241025

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

TypeScript typings for Cloud Asset API v1p1beta1

The Cloud Asset API manages the history and inventory of Google Cloud resources. For detailed description please check documentation.

Installing

Install typings for Cloud Asset API:

npm install @types/gapi.client.cloudasset-v1p1beta1 --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://cloudasset.googleapis.com/$discovery/rest?version=v1p1beta1',
  () => {
    // now we can use:
    // gapi.client.cloudasset
  }
);
// 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('cloudasset', 'v1p1beta1', () => {
  // now we can use:
  // gapi.client.cloudasset
});

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 Cloud Asset API resources:

/*
Searches all the IAM policies within a given accessible Resource Manager scope (project/folder/organization). This RPC gives callers especially administrators the ability to search all the IAM policies within a scope, even if they don't have `.getIamPolicy` permission of all the IAM policies. Callers should have `cloudasset.assets.searchAllIamPolicies` permission on the requested scope, otherwise the request will be rejected.
*/
await gapi.client.cloudasset.iamPolicies.searchAll({scope: 'scope'});

/*
Searches all the resources within a given accessible Resource Manager scope (project/folder/organization). This RPC gives callers especially administrators the ability to search all the resources within a scope, even if they don't have `.get` permission of all the resources. Callers should have `cloudasset.assets.searchAllResources` permission on the requested scope, otherwise the request will be rejected.
*/
await gapi.client.cloudasset.resources.searchAll({scope: 'scope'});
0.0.20241025

10 months ago

0.0.20241018

10 months ago

0.0.20241011

10 months ago

0.0.20240927

11 months ago

0.0.20241004

10 months ago

0.0.20240913

11 months ago

0.0.20240923

11 months ago

0.0.20240906

11 months ago

0.0.20240831

11 months ago

0.0.20240823

12 months ago

0.0.20240530

1 year ago

0.0.20240809

12 months ago

0.0.20240806

1 year ago

0.0.20240608

1 year ago

0.0.20240525

1 year ago

0.0.20240803

1 year ago

0.0.20240726

1 year ago

0.0.20240601

1 year ago

0.0.20240816

12 months ago

0.0.20240614

1 year ago

0.0.20240705

1 year ago

0.0.20240629

1 year ago

0.0.20240621

1 year ago

0.0.20240717

1 year ago

0.0.20240719

1 year ago

0.0.20240516

1 year ago

0.0.20240511

1 year ago

0.0.20240504

1 year ago

0.0.20240427

1 year ago

0.0.20240419

1 year ago

0.0.20240412

1 year ago

0.0.20240322

1 year ago

0.0.20240316

1 year ago

0.0.20240302

1 year ago

0.0.20240223

1 year ago

0.0.20240217

1 year ago

0.0.20240209

1 year ago

0.0.20240201

2 years ago

0.0.20240130

2 years ago

0.0.20240126

2 years ago

0.0.20240119

2 years ago

0.0.20240112

2 years ago

0.0.20240105

2 years ago

0.0.20231220

2 years ago

0.0.20231214

2 years ago

0.0.20231208

2 years ago

0.0.20231201

2 years ago

0.0.20230811

2 years ago

0.0.20231111

2 years ago

0.0.20230929

2 years ago

0.0.20230805

2 years ago

0.0.20230729

2 years ago

0.0.20230720

2 years ago

0.0.20230922

2 years ago

0.0.20231020

2 years ago

0.0.20231103

2 years ago

0.0.20230916

2 years ago

0.0.20231006

2 years ago

0.0.20230714

2 years ago

0.0.20231013

2 years ago

0.0.20230707

2 years ago

0.0.20230908

2 years ago

0.0.20230902

2 years ago

0.0.20230630

2 years ago

0.0.20230626

2 years ago

0.0.20230513

2 years ago

0.0.20230520

2 years ago

0.0.20230609

2 years ago

0.0.20230602

2 years ago

0.0.20230429

2 years ago

0.0.20230527

2 years ago

0.0.20230505

2 years ago

0.0.20230414

2 years ago

0.0.20230318

2 years ago

0.0.20230421

2 years ago

0.0.20230304

2 years ago

0.0.20230401

2 years ago

0.0.20230225

2 years ago

0.0.20230325

2 years ago

0.0.20230311

2 years ago

0.0.20230128

3 years ago

0.0.20230204

3 years ago

0.0.20230211

2 years ago

0.0.20221114

3 years ago

0.0.20221201

3 years ago

0.0.20221221

3 years ago

0.0.20221210

3 years ago

0.0.20230121

3 years ago

0.0.20230114

3 years ago

0.0.20221117

3 years ago

0.0.20221028

3 years ago

0.0.20221015

3 years ago

0.0.20221001

3 years ago

0.0.20221021

3 years ago

0.0.20220923

3 years ago

0.0.20220820

3 years ago

0.0.20220910

3 years ago

0.0.20220902

3 years ago

0.0.20220826

3 years ago

0.0.20220812

3 years ago

0.0.20220805

3 years ago