Class v1.IdentityAwareProxyOAuthServiceClient (2.3.1)

API to programmatically create, list and retrieve Identity Aware Proxy (IAP) OAuth brands; and create, retrieve, delete and reset-secret of IAP OAuth clients. v1

Package

@google-cloud/iap

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of IdentityAwareProxyOAuthServiceClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof gax.fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new IdentityAwareProxyOAuthServiceClient({fallback: 'rest'}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

identityAwareProxyOAuthServiceStub

identityAwareProxyOAuthServiceStub?: Promise<{
        [name: string]: Function;
    }>;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createBrand(request, options)

createBrand(request?: protos.google.cloud.iap.v1.ICreateBrandRequest, options?: CallOptions): Promise<[
        protos.google.cloud.iap.v1.IBrand,
        protos.google.cloud.iap.v1.ICreateBrandRequest | undefined,
        {} | undefined
    ]>;

Constructs a new OAuth brand for the project if one does not exist. The created brand is "internal only", meaning that OAuth clients created under it only accept requests from users who belong to the same Google Workspace organization as the project. The brand is created in an un-reviewed status. NOTE: The "internal only" status can be manually changed in the Google Cloud Console. Requires that a brand does not already exist for the project, and that the specified support email is owned by the caller.

Parameters
NameDescription
request protos.google.cloud.iap.v1.ICreateBrandRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.iap.v1.IBrand, protos.google.cloud.iap.v1.ICreateBrandRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. GCP Project number/id under which the brand is to be created.
   *  In the following format: projects/{project_number/id}.
   */
  // const parent = 'abc123'
  /**
   *  Required. The brand to be created.
   */
  // const brand = {}

  // Imports the Iap library
  const {IdentityAwareProxyOAuthServiceClient} = require('@google-cloud/iap').v1;

  // Instantiates a client
  const iapClient = new IdentityAwareProxyOAuthServiceClient();

  async function callCreateBrand() {
    // Construct request
    const request = {
      parent,
      brand,
    };

    // Run request
    const response = await iapClient.createBrand(request);
    console.log(response);
  }

  callCreateBrand();

createBrand(request, options, callback)

createBrand(request: protos.google.cloud.iap.v1.ICreateBrandRequest, options: CallOptions, callback: Callback<protos.google.cloud.iap.v1.IBrand, protos.google.cloud.iap.v1.ICreateBrandRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.ICreateBrandRequest
options CallOptions
callback Callback<protos.google.cloud.iap.v1.IBrand, protos.google.cloud.iap.v1.ICreateBrandRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createBrand(request, callback)

createBrand(request: protos.google.cloud.iap.v1.ICreateBrandRequest, callback: Callback<protos.google.cloud.iap.v1.IBrand, protos.google.cloud.iap.v1.ICreateBrandRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.ICreateBrandRequest
callback Callback<protos.google.cloud.iap.v1.IBrand, protos.google.cloud.iap.v1.ICreateBrandRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createIdentityAwareProxyClient(request, options)

createIdentityAwareProxyClient(request?: protos.google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest, options?: CallOptions): Promise<[
        protos.google.cloud.iap.v1.IIdentityAwareProxyClient,
        (protos.google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest | undefined),
        {} | undefined
    ]>;

Creates an Identity Aware Proxy (IAP) OAuth client. The client is owned by IAP. Requires that the brand for the project exists and that it is set for internal-only use.

Parameters
NameDescription
request protos.google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.iap.v1.IIdentityAwareProxyClient, (protos.google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Path to create the client in.
   *  In the following format:
   *  projects/{project_number/id}/brands/{brand}.
   *  The project must belong to a G Suite account.
   */
  // const parent = 'abc123'
  /**
   *  Required. Identity Aware Proxy Client to be created.
   */
  // const identityAwareProxyClient = {}

  // Imports the Iap library
  const {IdentityAwareProxyOAuthServiceClient} = require('@google-cloud/iap').v1;

  // Instantiates a client
  const iapClient = new IdentityAwareProxyOAuthServiceClient();

  async function callCreateIdentityAwareProxyClient() {
    // Construct request
    const request = {
      parent,
      identityAwareProxyClient,
    };

    // Run request
    const response = await iapClient.createIdentityAwareProxyClient(request);
    console.log(response);
  }

  callCreateIdentityAwareProxyClient();

createIdentityAwareProxyClient(request, options, callback)

createIdentityAwareProxyClient(request: protos.google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest, options: CallOptions, callback: Callback<protos.google.cloud.iap.v1.IIdentityAwareProxyClient, protos.google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest
options CallOptions
callback Callback<protos.google.cloud.iap.v1.IIdentityAwareProxyClient, protos.google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createIdentityAwareProxyClient(request, callback)

createIdentityAwareProxyClient(request: protos.google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest, callback: Callback<protos.google.cloud.iap.v1.IIdentityAwareProxyClient, protos.google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest
callback Callback<protos.google.cloud.iap.v1.IIdentityAwareProxyClient, protos.google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteIdentityAwareProxyClient(request, options)

deleteIdentityAwareProxyClient(request?: protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest | undefined),
        {} | undefined
    ]>;

Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing obsolete clients, managing the number of clients in a given project, and cleaning up after tests. Requires that the client is owned by IAP.

Parameters
NameDescription
request protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, (protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the Identity Aware Proxy client to be deleted.
   *  In the following format:
   *  projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}.
   */
  // const name = 'abc123'

  // Imports the Iap library
  const {IdentityAwareProxyOAuthServiceClient} = require('@google-cloud/iap').v1;

  // Instantiates a client
  const iapClient = new IdentityAwareProxyOAuthServiceClient();

  async function callDeleteIdentityAwareProxyClient() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await iapClient.deleteIdentityAwareProxyClient(request);
    console.log(response);
  }

  callDeleteIdentityAwareProxyClient();

deleteIdentityAwareProxyClient(request, options, callback)

deleteIdentityAwareProxyClient(request: protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteIdentityAwareProxyClient(request, callback)

deleteIdentityAwareProxyClient(request: protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getBrand(request, options)

getBrand(request?: protos.google.cloud.iap.v1.IGetBrandRequest, options?: CallOptions): Promise<[
        protos.google.cloud.iap.v1.IBrand,
        protos.google.cloud.iap.v1.IGetBrandRequest | undefined,
        {} | undefined
    ]>;

Retrieves the OAuth brand of the project.

Parameters
NameDescription
request protos.google.cloud.iap.v1.IGetBrandRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.iap.v1.IBrand, protos.google.cloud.iap.v1.IGetBrandRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the brand to be fetched.
   *  In the following format: projects/{project_number/id}/brands/{brand}.
   */
  // const name = 'abc123'

  // Imports the Iap library
  const {IdentityAwareProxyOAuthServiceClient} = require('@google-cloud/iap').v1;

  // Instantiates a client
  const iapClient = new IdentityAwareProxyOAuthServiceClient();

  async function callGetBrand() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await iapClient.getBrand(request);
    console.log(response);
  }

  callGetBrand();

getBrand(request, options, callback)

getBrand(request: protos.google.cloud.iap.v1.IGetBrandRequest, options: CallOptions, callback: Callback<protos.google.cloud.iap.v1.IBrand, protos.google.cloud.iap.v1.IGetBrandRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.IGetBrandRequest
options CallOptions
callback Callback<protos.google.cloud.iap.v1.IBrand, protos.google.cloud.iap.v1.IGetBrandRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getBrand(request, callback)

getBrand(request: protos.google.cloud.iap.v1.IGetBrandRequest, callback: Callback<protos.google.cloud.iap.v1.IBrand, protos.google.cloud.iap.v1.IGetBrandRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.IGetBrandRequest
callback Callback<protos.google.cloud.iap.v1.IBrand, protos.google.cloud.iap.v1.IGetBrandRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIdentityAwareProxyClient(request, options)

getIdentityAwareProxyClient(request?: protos.google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest, options?: CallOptions): Promise<[
        protos.google.cloud.iap.v1.IIdentityAwareProxyClient,
        (protos.google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest | undefined),
        {} | undefined
    ]>;

Retrieves an Identity Aware Proxy (IAP) OAuth client. Requires that the client is owned by IAP.

Parameters
NameDescription
request protos.google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.iap.v1.IIdentityAwareProxyClient, (protos.google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the Identity Aware Proxy client to be fetched.
   *  In the following format:
   *  projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}.
   */
  // const name = 'abc123'

  // Imports the Iap library
  const {IdentityAwareProxyOAuthServiceClient} = require('@google-cloud/iap').v1;

  // Instantiates a client
  const iapClient = new IdentityAwareProxyOAuthServiceClient();

  async function callGetIdentityAwareProxyClient() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await iapClient.getIdentityAwareProxyClient(request);
    console.log(response);
  }

  callGetIdentityAwareProxyClient();

getIdentityAwareProxyClient(request, options, callback)

getIdentityAwareProxyClient(request: protos.google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest, options: CallOptions, callback: Callback<protos.google.cloud.iap.v1.IIdentityAwareProxyClient, protos.google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest
options CallOptions
callback Callback<protos.google.cloud.iap.v1.IIdentityAwareProxyClient, protos.google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIdentityAwareProxyClient(request, callback)

getIdentityAwareProxyClient(request: protos.google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest, callback: Callback<protos.google.cloud.iap.v1.IIdentityAwareProxyClient, protos.google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest
callback Callback<protos.google.cloud.iap.v1.IIdentityAwareProxyClient, protos.google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listBrands(request, options)

listBrands(request?: protos.google.cloud.iap.v1.IListBrandsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.iap.v1.IListBrandsResponse,
        protos.google.cloud.iap.v1.IListBrandsRequest | undefined,
        {} | undefined
    ]>;

Lists the existing brands for the project.

Parameters
NameDescription
request protos.google.cloud.iap.v1.IListBrandsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.iap.v1.IListBrandsResponse, protos.google.cloud.iap.v1.IListBrandsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. GCP Project number/id.
   *  In the following format: projects/{project_number/id}.
   */
  // const parent = 'abc123'

  // Imports the Iap library
  const {IdentityAwareProxyOAuthServiceClient} = require('@google-cloud/iap').v1;

  // Instantiates a client
  const iapClient = new IdentityAwareProxyOAuthServiceClient();

  async function callListBrands() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const response = await iapClient.listBrands(request);
    console.log(response);
  }

  callListBrands();

listBrands(request, options, callback)

listBrands(request: protos.google.cloud.iap.v1.IListBrandsRequest, options: CallOptions, callback: Callback<protos.google.cloud.iap.v1.IListBrandsResponse, protos.google.cloud.iap.v1.IListBrandsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.IListBrandsRequest
options CallOptions
callback Callback<protos.google.cloud.iap.v1.IListBrandsResponse, protos.google.cloud.iap.v1.IListBrandsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listBrands(request, callback)

listBrands(request: protos.google.cloud.iap.v1.IListBrandsRequest, callback: Callback<protos.google.cloud.iap.v1.IListBrandsResponse, protos.google.cloud.iap.v1.IListBrandsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.IListBrandsRequest
callback Callback<protos.google.cloud.iap.v1.IListBrandsResponse, protos.google.cloud.iap.v1.IListBrandsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listIdentityAwareProxyClients(request, options)

listIdentityAwareProxyClients(request?: protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.iap.v1.IIdentityAwareProxyClient[],
        protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest | null,
        protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsResponse
    ]>;

Lists the existing clients for the brand.

Parameters
NameDescription
request protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.iap.v1.IIdentityAwareProxyClient[], protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest | null, protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listIdentityAwareProxyClientsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listIdentityAwareProxyClients(request, options, callback)

listIdentityAwareProxyClients(request: protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest, protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsResponse | null | undefined, protos.google.cloud.iap.v1.IIdentityAwareProxyClient>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest, protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsResponse | null | undefined, protos.google.cloud.iap.v1.IIdentityAwareProxyClient>
Returns
TypeDescription
void

listIdentityAwareProxyClients(request, callback)

listIdentityAwareProxyClients(request: protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest, callback: PaginationCallback<protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest, protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsResponse | null | undefined, protos.google.cloud.iap.v1.IIdentityAwareProxyClient>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest
callback PaginationCallback<protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest, protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsResponse | null | undefined, protos.google.cloud.iap.v1.IIdentityAwareProxyClient>
Returns
TypeDescription
void

listIdentityAwareProxyClientsAsync(request, options)

listIdentityAwareProxyClientsAsync(request?: protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.iap.v1.IIdentityAwareProxyClient>;

Equivalent to listIdentityAwareProxyClients, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.iap.v1.IIdentityAwareProxyClient>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Full brand path.
   *  In the following format: projects/{project_number/id}/brands/{brand}.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of clients to return. The service may return fewer than
   *  this value.
   *  If unspecified, at most 100 clients will be returned.
   *  The maximum value is 1000; values above 1000 will be coerced to 1000.
   */
  // const pageSize = 1234
  /**
   *  A page token, received from a previous `ListIdentityAwareProxyClients`
   *  call. Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to
   *  `ListIdentityAwareProxyClients` must match the call that provided the page
   *  token.
   */
  // const pageToken = 'abc123'

  // Imports the Iap library
  const {IdentityAwareProxyOAuthServiceClient} = require('@google-cloud/iap').v1;

  // Instantiates a client
  const iapClient = new IdentityAwareProxyOAuthServiceClient();

  async function callListIdentityAwareProxyClients() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await iapClient.listIdentityAwareProxyClientsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListIdentityAwareProxyClients();

listIdentityAwareProxyClientsStream(request, options)

listIdentityAwareProxyClientsStream(request?: protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listIdentityAwareProxyClientsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

matchDestGroupFromTunnelDestGroupName(tunnelDestGroupName)

matchDestGroupFromTunnelDestGroupName(tunnelDestGroupName: string): string | number;

Parse the dest_group from TunnelDestGroup resource.

Parameter
NameDescription
tunnelDestGroupName string

A fully-qualified path representing TunnelDestGroup resource.

Returns
TypeDescription
string | number

{string} A string representing the dest_group.

matchLocationFromTunnelDestGroupName(tunnelDestGroupName)

matchLocationFromTunnelDestGroupName(tunnelDestGroupName: string): string | number;

Parse the location from TunnelDestGroup resource.

Parameter
NameDescription
tunnelDestGroupName string

A fully-qualified path representing TunnelDestGroup resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromTunnelLocationName(tunnelLocationName)

matchLocationFromTunnelLocationName(tunnelLocationName: string): string | number;

Parse the location from TunnelLocation resource.

Parameter
NameDescription
tunnelLocationName string

A fully-qualified path representing TunnelLocation resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromTunnelDestGroupName(tunnelDestGroupName)

matchProjectFromTunnelDestGroupName(tunnelDestGroupName: string): string | number;

Parse the project from TunnelDestGroup resource.

Parameter
NameDescription
tunnelDestGroupName string

A fully-qualified path representing TunnelDestGroup resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromTunnelLocationName(tunnelLocationName)

matchProjectFromTunnelLocationName(tunnelLocationName: string): string | number;

Parse the project from TunnelLocation resource.

Parameter
NameDescription
tunnelLocationName string

A fully-qualified path representing TunnelLocation resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.

resetIdentityAwareProxyClientSecret(request, options)

resetIdentityAwareProxyClientSecret(request?: protos.google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest, options?: CallOptions): Promise<[
        protos.google.cloud.iap.v1.IIdentityAwareProxyClient,
        (protos.google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest | undefined),
        {} | undefined
    ]>;

Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the secret was compromised. Requires that the client is owned by IAP.

Parameters
NameDescription
request protos.google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.iap.v1.IIdentityAwareProxyClient, (protos.google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the Identity Aware Proxy client to that will have its
   *  secret reset. In the following format:
   *  projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}.
   */
  // const name = 'abc123'

  // Imports the Iap library
  const {IdentityAwareProxyOAuthServiceClient} = require('@google-cloud/iap').v1;

  // Instantiates a client
  const iapClient = new IdentityAwareProxyOAuthServiceClient();

  async function callResetIdentityAwareProxyClientSecret() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await iapClient.resetIdentityAwareProxyClientSecret(request);
    console.log(response);
  }

  callResetIdentityAwareProxyClientSecret();

resetIdentityAwareProxyClientSecret(request, options, callback)

resetIdentityAwareProxyClientSecret(request: protos.google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest, options: CallOptions, callback: Callback<protos.google.cloud.iap.v1.IIdentityAwareProxyClient, protos.google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest
options CallOptions
callback Callback<protos.google.cloud.iap.v1.IIdentityAwareProxyClient, protos.google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

resetIdentityAwareProxyClientSecret(request, callback)

resetIdentityAwareProxyClientSecret(request: protos.google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest, callback: Callback<protos.google.cloud.iap.v1.IIdentityAwareProxyClient, protos.google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest
callback Callback<protos.google.cloud.iap.v1.IIdentityAwareProxyClient, protos.google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

tunnelDestGroupPath(project, location, destGroup)

tunnelDestGroupPath(project: string, location: string, destGroup: string): string;

Return a fully-qualified tunnelDestGroup resource name string.

Parameters
NameDescription
project string
location string
destGroup string
Returns
TypeDescription
string

{string} Resource name string.

tunnelLocationPath(project, location)

tunnelLocationPath(project: string, location: string): string;

Return a fully-qualified tunnelLocation resource name string.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
string

{string} Resource name string.