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)
constructor(opts?: ClientOptions);
Construct an instance of IdentityAwareProxyOAuthServiceClient.
Parameter
Name | Description |
opts |
ClientOptions
|
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
descriptors
descriptors: Descriptors;
identityAwareProxyOAuthServiceStub
identityAwareProxyOAuthServiceStub?: Promise<{
[name: string]: Function;
}>;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
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()
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns
Type | Description |
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 G Suite 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
Name | Description |
request |
protos.google.cloud.iap.v1.ICreateBrandRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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 [Brand]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* 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
Name | Description |
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
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
Name | Description |
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
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
Name | Description |
request |
protos.google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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 [IdentityAwareProxyClient]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* 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
Name | Description |
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
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
Name | Description |
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
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
Name | Description |
request |
protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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 [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* 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
Name | Description |
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
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
Name | Description |
request |
protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest | null | undefined, {} | null | undefined>
|
Returns
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
Name | Description |
request |
protos.google.cloud.iap.v1.IGetBrandRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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 [Brand]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* 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
Name | Description |
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
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
Name | Description |
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
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
Name | Description |
request |
protos.google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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 [IdentityAwareProxyClient]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* 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
Name | Description |
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
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
Name | Description |
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
getProjectId()
getProjectId(): Promise<string>;
Returns
Type | Description |
Promise<string> | |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns
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
Type | Description |
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
Name | Description |
request |
protos.google.cloud.iap.v1.IListBrandsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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 [ListBrandsResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* 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
Name | Description |
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
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
Name | Description |
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
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
Name | Description |
request |
protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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 [IdentityAwareProxyClient]. 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
Name | Description |
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
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
Name | Description |
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
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
Name | Description |
request |
protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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 [IdentityAwareProxyClient]. 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
/**
* 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
Name | Description |
request |
protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Transform | {Stream} An object stream which emits an object representing [IdentityAwareProxyClient] 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.
|
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
Name | Description |
request |
protos.google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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 [IdentityAwareProxyClient]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* 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
Name | Description |
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
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
Name | Description |
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