0.0.20241030 • Published 9 months ago

@maxim_mazurok/gapi.client.policysimulator-v1 v0.0.20241030

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

TypeScript typings for Policy Simulator API v1

Policy Simulator is a collection of endpoints for creating, running, and viewing a Replay. A Replay is a type of simulation that lets you see how your members' access to resources might change if you changed your IAM policy. During a Replay, Policy Simulator re-evaluates, or replays, past access attempts under both the current policy and your proposed policy, and compares those results to determine how your members' access might change under the proposed policy. For detailed description please check documentation.

Installing

Install typings for Policy Simulator API:

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

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 Policy Simulator API resources:

/*
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
*/
await gapi.client.policysimulator.operations.get({name: 'name'});

/*
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
*/
await gapi.client.policysimulator.operations.list({name: 'name'});
0.0.20241030

9 months ago

0.0.20241013

9 months ago

0.0.20240929

10 months ago

0.0.20241006

9 months ago

0.0.20240922

10 months ago

0.0.20240908

10 months ago

0.0.20240901

11 months ago

0.0.20240804

11 months ago

0.0.20240728

12 months ago

0.0.20240609

1 year ago

0.0.20240602

1 year ago

0.0.20240526

1 year ago

0.0.20240721

12 months ago

0.0.20240617

1 year ago

0.0.20240818

11 months ago

0.0.20240811

11 months ago

0.0.20240630

1 year ago

0.0.20240707

1 year ago

0.0.20240825

11 months ago

0.0.20240623

1 year ago

0.0.20240519

1 year ago

0.0.20240512

1 year ago

0.0.20240505

1 year ago

0.0.20240428

1 year ago

0.0.20240421

1 year ago

0.0.20240414

1 year ago

0.0.20240331

1 year ago

0.0.20240324

1 year ago

0.0.20240317

1 year ago

0.0.20240310

1 year ago

0.0.20240303

1 year ago

0.0.20240225

1 year ago

0.0.20240218

1 year ago

0.0.20240211

1 year ago

0.0.20240128

1 year ago

0.0.20240121

1 year ago

0.0.20240114

1 year ago

0.0.20240107

2 years ago

0.0.20231217

2 years ago

0.0.20231210

2 years ago

0.0.20231203

2 years ago

0.0.20231029

2 years ago

0.0.20231105

2 years ago

0.0.20231112

2 years ago

0.0.20230806

2 years ago

0.0.20230729

2 years ago

0.0.20230723

2 years ago

0.0.20230923

2 years ago

0.0.20231022

2 years ago

0.0.20230917

2 years ago

0.0.20230910

2 years ago

0.0.20231008

2 years ago

0.0.20230716

2 years ago

0.0.20231015

2 years ago

0.0.20230708

2 years ago

0.0.20230904

2 years ago

0.0.20230702

2 years ago

0.0.20231001

2 years ago

0.0.20230625

2 years ago

0.0.20230618

2 years ago

0.0.20230514

2 years ago

0.0.20230611

2 years ago

0.0.20230521

2 years ago

0.0.20230528

2 years ago

0.0.20230429

2 years ago

0.0.20230507

2 years ago

0.0.20230603

2 years ago

0.0.20230319

2 years ago

0.0.20230416

2 years ago

0.0.20230409

2 years ago

0.0.20230326

2 years ago

0.0.20230304

2 years ago

0.0.20230402

2 years ago

0.0.20230226

2 years ago

0.0.20230312

2 years ago

0.0.20230216

2 years ago

0.0.20230219

2 years ago

0.0.20221204

3 years ago

0.0.20230115

2 years ago

0.0.20221213

3 years ago

0.0.20221112

3 years ago

0.0.20230108

3 years ago

0.0.20221207

3 years ago

0.0.20221106

3 years ago

0.0.20221016

3 years ago

0.0.20221023

3 years ago

0.0.20221029

3 years ago

0.0.20220926

3 years ago

0.0.20220916

3 years ago

0.0.20220821

3 years ago

0.0.20220910

3 years ago

0.0.20220826

3 years ago

0.0.20220904

3 years ago

0.0.20220812

3 years ago

0.0.20220806

3 years ago