/* This is stub file for gapi.client.{{=it.name}} definition tests */ /* IMPORTANT. * This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. * In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator **/ gapi.load('client', () => { /** now we can use gapi.client */ gapi.client.load('clouduseraccounts', 'vm_alpha', () => { /** now we can use gapi.client.clouduseraccounts */ /** don't forget to authenticate your client before sending any request to resources: */ /** declare client_id registered in Google Developers Console */ const client_id = '<>'; const scope = [ /** View and manage your data across Google Cloud Platform services */ 'https://www.googleapis.com/auth/cloud-platform', /** View your data across Google Cloud Platform services */ 'https://www.googleapis.com/auth/cloud-platform.read-only', /** Manage your Google Cloud User Accounts */ 'https://www.googleapis.com/auth/cloud.useraccounts', /** View your Google Cloud User Accounts */ 'https://www.googleapis.com/auth/cloud.useraccounts.readonly', ]; const immediate = true; gapi.auth.authorize({ client_id, scope, immediate }, authResult => { if (authResult && !authResult.error) { /** handle succesfull authorization */ run(); } else { /** handle authorization error */ } }); run(); }); async function run() { /** Deletes the specified operation resource. */ await gapi.client.globalAccountsOperations.delete({ operation: "operation", project: "project", }); /** Retrieves the specified operation resource. */ await gapi.client.globalAccountsOperations.get({ operation: "operation", project: "project", }); /** Retrieves the list of operation resources contained within the specified project. */ await gapi.client.globalAccountsOperations.list({ filter: "filter", maxResults: 2, orderBy: "orderBy", pageToken: "pageToken", project: "project", }); /** Adds users to the specified group. */ await gapi.client.groups.addMember({ groupName: "groupName", project: "project", }); /** Deletes the specified Group resource. */ await gapi.client.groups.delete({ groupName: "groupName", project: "project", }); /** Returns the specified Group resource. */ await gapi.client.groups.get({ groupName: "groupName", project: "project", }); /** Gets the access control policy for a resource. May be empty if no such policy or resource exists. */ await gapi.client.groups.getIamPolicy({ project: "project", resource: "resource", }); /** Creates a Group resource in the specified project using the data included in the request. */ await gapi.client.groups.insert({ project: "project", }); /** Retrieves the list of groups contained within the specified project. */ await gapi.client.groups.list({ filter: "filter", maxResults: 2, orderBy: "orderBy", pageToken: "pageToken", project: "project", }); /** Removes users from the specified group. */ await gapi.client.groups.removeMember({ groupName: "groupName", project: "project", }); /** Sets the access control policy on the specified resource. Replaces any existing policy. */ await gapi.client.groups.setIamPolicy({ project: "project", resource: "resource", }); /** Returns permissions that a caller has on the specified resource. */ await gapi.client.groups.testIamPermissions({ project: "project", resource: "resource", }); /** Returns a list of authorized public keys for a specific user account. */ await gapi.client.linux.getAuthorizedKeysView({ instance: "instance", login: true, project: "project", user: "user", zone: "zone", }); /** Retrieves a list of user accounts for an instance within a specific project. */ await gapi.client.linux.getLinuxAccountViews({ filter: "filter", instance: "instance", maxResults: 3, orderBy: "orderBy", pageToken: "pageToken", project: "project", zone: "zone", }); /** Adds a public key to the specified User resource with the data included in the request. */ await gapi.client.users.addPublicKey({ project: "project", user: "user", }); /** Deletes the specified User resource. */ await gapi.client.users.delete({ project: "project", user: "user", }); /** Returns the specified User resource. */ await gapi.client.users.get({ project: "project", user: "user", }); /** Gets the access control policy for a resource. May be empty if no such policy or resource exists. */ await gapi.client.users.getIamPolicy({ project: "project", resource: "resource", }); /** Creates a User resource in the specified project using the data included in the request. */ await gapi.client.users.insert({ project: "project", }); /** Retrieves a list of users contained within the specified project. */ await gapi.client.users.list({ filter: "filter", maxResults: 2, orderBy: "orderBy", pageToken: "pageToken", project: "project", }); /** Removes the specified public key from the user. */ await gapi.client.users.removePublicKey({ fingerprint: "fingerprint", project: "project", user: "user", }); /** Sets the access control policy on the specified resource. Replaces any existing policy. */ await gapi.client.users.setIamPolicy({ project: "project", resource: "resource", }); /** Returns permissions that a caller has on the specified resource. */ await gapi.client.users.testIamPermissions({ project: "project", resource: "resource", }); } });