TypeScript typings for Access Context Manager API v1
An API for setting attribute based access control to requests to GCP services.
For detailed description please check documentation.
Installing
Install typings for Access Context Manager API:
npm install @types/gapi.client.accesscontextmanager@v1 --save-dev
Usage
You need to initialize Google API client in your code:
gapi.load('client', () => {
});
Then load api client wrapper:
gapi.client.load('accesscontextmanager', 'v1', () => {
});
Don't forget to authenticate your client before sending any request to resources:
var client_id = '',
scope = [
'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) {
} else {
}
});
After that you can use Access Context Manager API resources:
await gapi.client.accesscontextmanager.accessPolicies.create({ });
await gapi.client.accesscontextmanager.accessPolicies.delete({ name: "name", });
await gapi.client.accesscontextmanager.accessPolicies.get({ name: "name", });
await gapi.client.accesscontextmanager.accessPolicies.getIamPolicy({ resource: "resource", });
await gapi.client.accesscontextmanager.accessPolicies.list({ });
await gapi.client.accesscontextmanager.accessPolicies.patch({ name: "name", });
await gapi.client.accesscontextmanager.accessPolicies.setIamPolicy({ resource: "resource", });
await gapi.client.accesscontextmanager.accessPolicies.testIamPermissions({ resource: "resource", });
await gapi.client.accesscontextmanager.operations.cancel({ name: "name", });
await gapi.client.accesscontextmanager.operations.delete({ name: "name", });
await gapi.client.accesscontextmanager.operations.get({ name: "name", });
operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
*/
await gapi.client.accesscontextmanager.operations.list({ name: "name", });