APIs for Identity-Aware Proxy Admin configurations. v1
Package
@google-cloud/iap
Constructors
(constructor)(opts, gaxInstance)
constructor
(
opts
?:
ClientOptions
,
gaxInstance
?:
typeof
gax
|
typeof
gax
.
fallback
);
Construct an instance of IdentityAwareProxyAdminServiceClient.
Parameters Name |
Description |
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 IdentityAwareProxyAdminServiceClient({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
;
identityAwareProxyAdminServiceStub
identityAwareProxyAdminServiceStub
?:
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 Type |
Description |
Promise
<void> |
{Promise} A promise that resolves when the client is closed.
|
createTunnelDestGroup(request, options)
createTunnelDestGroup
(
request
?:
protos
.
google
.
cloud
.
iap
.
v1
.
ICreateTunnelDestGroupRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
iap
.
v1
.
ITunnelDestGroup
,
protos
.
google
.
cloud
.
iap
.
v1
.
ICreateTunnelDestGroupRequest
|
undefined
,
{}
|
undefined
]>;
Creates a new TunnelDestGroup.
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.ICreateTunnelDestGroupRequest
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.ITunnelDestGroup
,
protos. google.cloud.iap.v1.ICreateTunnelDestGroupRequest
| undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing [TunnelDestGroup]. 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. Google Cloud Project ID and location.
* In the following format:
* `projects/{project_number/id}/iap_tunnel/locations/{location}`.
*/
// const parent = 'abc123'
/**
* Required. The TunnelDestGroup to create.
*/
// const tunnelDestGroup = {}
/**
* Required. The ID to use for the TunnelDestGroup, which becomes the final component of
* the resource name.
* This value must be 4-63 characters, and valid characters
* are `[a-z][0-9]-`.
*/
// const tunnelDestGroupId = 'abc123'
// Imports the Iap library
const
{
IdentityAwareProxyAdminServiceClient
}
=
require
(
' @google-cloud/iap
'
).
v1
;
// Instantiates a client
const
iapClient
=
new
IdentityAwareProxyAdminServiceClient
();
async
function
callCreateTunnelDestGroup
()
{
// Construct request
const
request
=
{
parent
,
tunnelDestGroup
,
tunnelDestGroupId
,
};
// Run request
const
response
=
await
iapClient
.
createTunnelDestGroup
(
request
);
console
.
log
(
response
);
}
callCreateTunnelDestGroup
();
createTunnelDestGroup(request, options, callback)
createTunnelDestGroup
(
request
:
protos
.
google
.
cloud
.
iap
.
v1
.
ICreateTunnelDestGroupRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
iap
.
v1
.
ITunnelDestGroup
,
protos
.
google
.
cloud
.
iap
.
v1
.
ICreateTunnelDestGroupRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.ICreateTunnelDestGroupRequest
|
options |
CallOptions
|
callback |
Callback
<protos. google.cloud.iap.v1.ITunnelDestGroup
, protos. google.cloud.iap.v1.ICreateTunnelDestGroupRequest
| null | undefined, {} | null | undefined>
|
Returns
createTunnelDestGroup(request, callback)
createTunnelDestGroup
(
request
:
protos
.
google
.
cloud
.
iap
.
v1
.
ICreateTunnelDestGroupRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
iap
.
v1
.
ITunnelDestGroup
,
protos
.
google
.
cloud
.
iap
.
v1
.
ICreateTunnelDestGroupRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.ICreateTunnelDestGroupRequest
|
callback |
Callback
<protos. google.cloud.iap.v1.ITunnelDestGroup
, protos. google.cloud.iap.v1.ICreateTunnelDestGroupRequest
| null | undefined, {} | null | undefined>
|
Returns
deleteTunnelDestGroup(request, options)
deleteTunnelDestGroup
(
request
?:
protos
.
google
.
cloud
.
iap
.
v1
.
IDeleteTunnelDestGroupRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
protobuf
.
IEmpty
,
protos
.
google
.
cloud
.
iap
.
v1
.
IDeleteTunnelDestGroupRequest
|
undefined
,
{}
|
undefined
]>;
Deletes a TunnelDestGroup.
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IDeleteTunnelDestGroupRequest
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.IDeleteTunnelDestGroupRequest
| 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
/**
* 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 TunnelDestGroup to delete.
* In the following format:
* `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
*/
// const name = 'abc123'
// Imports the Iap library
const
{
IdentityAwareProxyAdminServiceClient
}
=
require
(
' @google-cloud/iap
'
).
v1
;
// Instantiates a client
const
iapClient
=
new
IdentityAwareProxyAdminServiceClient
();
async
function
callDeleteTunnelDestGroup
()
{
// Construct request
const
request
=
{
name
,
};
// Run request
const
response
=
await
iapClient
.
deleteTunnelDestGroup
(
request
);
console
.
log
(
response
);
}
callDeleteTunnelDestGroup
();
deleteTunnelDestGroup(request, options, callback)
deleteTunnelDestGroup
(
request
:
protos
.
google
.
cloud
.
iap
.
v1
.
IDeleteTunnelDestGroupRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
protobuf
.
IEmpty
,
protos
.
google
.
cloud
.
iap
.
v1
.
IDeleteTunnelDestGroupRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IDeleteTunnelDestGroupRequest
|
options |
CallOptions
|
callback |
Callback
<protos. google.protobuf.IEmpty
, protos. google.cloud.iap.v1.IDeleteTunnelDestGroupRequest
| null | undefined, {} | null | undefined>
|
Returns
deleteTunnelDestGroup(request, callback)
deleteTunnelDestGroup
(
request
:
protos
.
google
.
cloud
.
iap
.
v1
.
IDeleteTunnelDestGroupRequest
,
callback
:
Callback<protos
.
google
.
protobuf
.
IEmpty
,
protos
.
google
.
cloud
.
iap
.
v1
.
IDeleteTunnelDestGroupRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IDeleteTunnelDestGroupRequest
|
callback |
Callback
<protos. google.protobuf.IEmpty
, protos. google.cloud.iap.v1.IDeleteTunnelDestGroupRequest
| null | undefined, {} | null | undefined>
|
Returns
getIamPolicy(request, options)
getIamPolicy
(
request
?:
protos
.
google
.
iam
.
v1
.
IGetIamPolicyRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
iam
.
v1
.
IPolicy
,
protos
.
google
.
iam
.
v1
.
IGetIamPolicyRequest
|
undefined
,
{}
|
undefined
]>;
Gets the access control policy for an Identity-Aware Proxy protected resource. More information about managing access via IAP can be found at: https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
Parameters Name |
Description |
request |
protos. google.iam.v1.IGetIamPolicyRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions
for more details.
|
Returns Type |
Description |
Promise
<[
protos. google.iam.v1.IPolicy
,
protos. google.iam.v1.IGetIamPolicyRequest
| undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Policy]. 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: The resource for which the policy is being requested.
* See the operation documentation for the appropriate value for this field.
*/
// const resource = 'abc123'
/**
* OPTIONAL: A `GetPolicyOptions` object for specifying options to
* `GetIamPolicy`.
*/
// const options = {}
// Imports the Iap library
const
{
IdentityAwareProxyAdminServiceClient
}
=
require
(
' @google-cloud/iap
'
).
v1
;
// Instantiates a client
const
iapClient
=
new
IdentityAwareProxyAdminServiceClient
();
async
function
callGetIamPolicy
()
{
// Construct request
const
request
=
{
resource
,
};
// Run request
const
response
=
await
iapClient
.
getIamPolicy
(
request
);
console
.
log
(
response
);
}
callGetIamPolicy
();
getIamPolicy(request, options, callback)
getIamPolicy
(
request
:
protos
.
google
.
iam
.
v1
.
IGetIamPolicyRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
iam
.
v1
.
IPolicy
,
protos
.
google
.
iam
.
v1
.
IGetIamPolicyRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.iam.v1.IGetIamPolicyRequest
|
options |
CallOptions
|
callback |
Callback
<protos. google.iam.v1.IPolicy
, protos. google.iam.v1.IGetIamPolicyRequest
| null | undefined, {} | null | undefined>
|
Returns
getIamPolicy(request, callback)
getIamPolicy
(
request
:
protos
.
google
.
iam
.
v1
.
IGetIamPolicyRequest
,
callback
:
Callback<protos
.
google
.
iam
.
v1
.
IPolicy
,
protos
.
google
.
iam
.
v1
.
IGetIamPolicyRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.iam.v1.IGetIamPolicyRequest
|
callback |
Callback
<protos. google.iam.v1.IPolicy
, protos. google.iam.v1.IGetIamPolicyRequest
| null | undefined, {} | null | undefined>
|
Returns
getIapSettings(request, options)
getIapSettings
(
request
?:
protos
.
google
.
cloud
.
iap
.
v1
.
IGetIapSettingsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
iap
.
v1
.
IIapSettings
,
protos
.
google
.
cloud
.
iap
.
v1
.
IGetIapSettingsRequest
|
undefined
,
{}
|
undefined
]>;
Gets the IAP settings on a particular IAP protected resource.
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IGetIapSettingsRequest
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.IIapSettings
,
protos. google.cloud.iap.v1.IGetIapSettingsRequest
| undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing [IapSettings]. 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. The resource name for which to retrieve the settings.
* Authorization: Requires the `getSettings` permission for the associated
* resource.
*/
// const name = 'abc123'
// Imports the Iap library
const
{
IdentityAwareProxyAdminServiceClient
}
=
require
(
' @google-cloud/iap
'
).
v1
;
// Instantiates a client
const
iapClient
=
new
IdentityAwareProxyAdminServiceClient
();
async
function
callGetIapSettings
()
{
// Construct request
const
request
=
{
name
,
};
// Run request
const
response
=
await
iapClient
.
getIapSettings
(
request
);
console
.
log
(
response
);
}
callGetIapSettings
();
getIapSettings(request, options, callback)
getIapSettings
(
request
:
protos
.
google
.
cloud
.
iap
.
v1
.
IGetIapSettingsRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
iap
.
v1
.
IIapSettings
,
protos
.
google
.
cloud
.
iap
.
v1
.
IGetIapSettingsRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IGetIapSettingsRequest
|
options |
CallOptions
|
callback |
Callback
<protos. google.cloud.iap.v1.IIapSettings
, protos. google.cloud.iap.v1.IGetIapSettingsRequest
| null | undefined, {} | null | undefined>
|
Returns
getIapSettings(request, callback)
getIapSettings
(
request
:
protos
.
google
.
cloud
.
iap
.
v1
.
IGetIapSettingsRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
iap
.
v1
.
IIapSettings
,
protos
.
google
.
cloud
.
iap
.
v1
.
IGetIapSettingsRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IGetIapSettingsRequest
|
callback |
Callback
<protos. google.cloud.iap.v1.IIapSettings
, protos. google.cloud.iap.v1.IGetIapSettingsRequest
| null | undefined, {} | null | undefined>
|
Returns
getProjectId()
getProjectId
()
:
Promise<string>
;
Returns
getProjectId(callback)
getProjectId
(
callback
:
Callback<string
,
undefined
,
undefined
> )
:
void
;
Parameter Name |
Description |
callback |
Callback
<string, undefined, undefined>
|
Returns
getTunnelDestGroup(request, options)
getTunnelDestGroup
(
request
?:
protos
.
google
.
cloud
.
iap
.
v1
.
IGetTunnelDestGroupRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
iap
.
v1
.
ITunnelDestGroup
,
protos
.
google
.
cloud
.
iap
.
v1
.
IGetTunnelDestGroupRequest
|
undefined
,
{}
|
undefined
]>;
Retrieves an existing TunnelDestGroup.
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IGetTunnelDestGroupRequest
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.ITunnelDestGroup
,
protos. google.cloud.iap.v1.IGetTunnelDestGroupRequest
| undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing [TunnelDestGroup]. 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 TunnelDestGroup to be fetched.
* In the following format:
* `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
*/
// const name = 'abc123'
// Imports the Iap library
const
{
IdentityAwareProxyAdminServiceClient
}
=
require
(
' @google-cloud/iap
'
).
v1
;
// Instantiates a client
const
iapClient
=
new
IdentityAwareProxyAdminServiceClient
();
async
function
callGetTunnelDestGroup
()
{
// Construct request
const
request
=
{
name
,
};
// Run request
const
response
=
await
iapClient
.
getTunnelDestGroup
(
request
);
console
.
log
(
response
);
}
callGetTunnelDestGroup
();
getTunnelDestGroup(request, options, callback)
getTunnelDestGroup
(
request
:
protos
.
google
.
cloud
.
iap
.
v1
.
IGetTunnelDestGroupRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
iap
.
v1
.
ITunnelDestGroup
,
protos
.
google
.
cloud
.
iap
.
v1
.
IGetTunnelDestGroupRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IGetTunnelDestGroupRequest
|
options |
CallOptions
|
callback |
Callback
<protos. google.cloud.iap.v1.ITunnelDestGroup
, protos. google.cloud.iap.v1.IGetTunnelDestGroupRequest
| null | undefined, {} | null | undefined>
|
Returns
getTunnelDestGroup(request, callback)
getTunnelDestGroup
(
request
:
protos
.
google
.
cloud
.
iap
.
v1
.
IGetTunnelDestGroupRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
iap
.
v1
.
ITunnelDestGroup
,
protos
.
google
.
cloud
.
iap
.
v1
.
IGetTunnelDestGroupRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IGetTunnelDestGroupRequest
|
callback |
Callback
<protos. google.cloud.iap.v1.ITunnelDestGroup
, protos. google.cloud.iap.v1.IGetTunnelDestGroupRequest
| null | undefined, {} | null | 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.
|
listTunnelDestGroups(request, options)
listTunnelDestGroups
(
request
?:
protos
.
google
.
cloud
.
iap
.
v1
.
IListTunnelDestGroupsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
iap
.
v1
.
ITunnelDestGroup
[],
protos
.
google
.
cloud
.
iap
.
v1
.
IListTunnelDestGroupsRequest
|
null
,
protos
.
google
.
cloud
.
iap
.
v1
.
IListTunnelDestGroupsResponse
]>;
Lists the existing TunnelDestGroups. To group across all locations, use a -
as the location ID. For example: /v1/projects/123/iap_tunnel/locations/-/destGroups
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IListTunnelDestGroupsRequest
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.ITunnelDestGroup
[],
protos. google.cloud.iap.v1.IListTunnelDestGroupsRequest
| null,
protos. google.cloud.iap.v1.IListTunnelDestGroupsResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of [TunnelDestGroup]. 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 listTunnelDestGroupsAsync()
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.
|
listTunnelDestGroups(request, options, callback)
listTunnelDestGroups
(
request
:
protos
.
google
.
cloud
.
iap
.
v1
.
IListTunnelDestGroupsRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
iap
.
v1
.
IListTunnelDestGroupsRequest
,
protos
.
google
.
cloud
.
iap
.
v1
.
IListTunnelDestGroupsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
iap
.
v1
.
ITunnelDestGroup
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IListTunnelDestGroupsRequest
|
options |
CallOptions
|
callback |
PaginationCallback
<protos. google.cloud.iap.v1.IListTunnelDestGroupsRequest
, protos. google.cloud.iap.v1.IListTunnelDestGroupsResponse
| null | undefined, protos. google.cloud.iap.v1.ITunnelDestGroup
>
|
Returns
listTunnelDestGroups(request, callback)
listTunnelDestGroups
(
request
:
protos
.
google
.
cloud
.
iap
.
v1
.
IListTunnelDestGroupsRequest
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
iap
.
v1
.
IListTunnelDestGroupsRequest
,
protos
.
google
.
cloud
.
iap
.
v1
.
IListTunnelDestGroupsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
iap
.
v1
.
ITunnelDestGroup
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IListTunnelDestGroupsRequest
|
callback |
PaginationCallback
<protos. google.cloud.iap.v1.IListTunnelDestGroupsRequest
, protos. google.cloud.iap.v1.IListTunnelDestGroupsResponse
| null | undefined, protos. google.cloud.iap.v1.ITunnelDestGroup
>
|
Returns
listTunnelDestGroupsAsync(request, options)
listTunnelDestGroupsAsync
(
request
?:
protos
.
google
.
cloud
.
iap
.
v1
.
IListTunnelDestGroupsRequest
,
options
?:
CallOptions
)
:
AsyncIterable<protos
.
google
.
cloud
.
iap
.
v1
.
ITunnelDestGroup
> ;
Equivalent to listTunnelDestGroups
, 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.IListTunnelDestGroupsRequest
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.ITunnelDestGroup
> |
{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 [TunnelDestGroup]. 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. Google Cloud Project ID and location.
* In the following format:
* `projects/{project_number/id}/iap_tunnel/locations/{location}`.
* A `-` can be used for the location to group across all locations.
*/
// const parent = 'abc123'
/**
* The maximum number of groups to return. The service might return fewer than
* this value.
* If unspecified, at most 100 groups are returned.
* The maximum value is 1000; values above 1000 are coerced to 1000.
*/
// const pageSize = 1234
/**
* A page token, received from a previous `ListTunnelDestGroups`
* call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
* `ListTunnelDestGroups` must match the call that provided the page
* token.
*/
// const pageToken = 'abc123'
// Imports the Iap library
const
{
IdentityAwareProxyAdminServiceClient
}
=
require
(
' @google-cloud/iap
'
).
v1
;
// Instantiates a client
const
iapClient
=
new
IdentityAwareProxyAdminServiceClient
();
async
function
callListTunnelDestGroups
()
{
// Construct request
const
request
=
{
parent
,
};
// Run request
const
iterable
=
await
iapClient
.
listTunnelDestGroupsAsync
(
request
);
for
await
(
const
response
of
iterable
)
{
console
.
log
(
response
);
}
}
callListTunnelDestGroups
();
listTunnelDestGroupsStream(request, options)
listTunnelDestGroupsStream
(
request
?:
protos
.
google
.
cloud
.
iap
.
v1
.
IListTunnelDestGroupsRequest
,
options
?:
CallOptions
)
:
Transform
;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IListTunnelDestGroupsRequest
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 [TunnelDestGroup] 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 listTunnelDestGroupsAsync()
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 Name |
Description |
tunnelDestGroupName |
string
A fully-qualified path representing TunnelDestGroup resource.
|
Returns Type |
Description |
string | number
|
{string} A string representing the dest_group.
|
matchLocationFromTunnelDestGroupName(tunnelDestGroupName)
matchLocationFromTunnelDestGroupName
(
tunnelDestGroupName
:
string
)
:
string
|
number
;
Parse the location from TunnelDestGroup resource.
Parameter Name |
Description |
tunnelDestGroupName |
string
A fully-qualified path representing TunnelDestGroup resource.
|
Returns Type |
Description |
string | number
|
{string} A string representing the location.
|
matchLocationFromTunnelLocationName(tunnelLocationName)
matchLocationFromTunnelLocationName
(
tunnelLocationName
:
string
)
:
string
|
number
;
Parse the location from TunnelLocation resource.
Parameter Name |
Description |
tunnelLocationName |
string
A fully-qualified path representing TunnelLocation resource.
|
Returns Type |
Description |
string | number
|
{string} A string representing the location.
|
matchProjectFromProjectName(projectName)
matchProjectFromProjectName
(
projectName
:
string
)
:
string
|
number
;
Parse the project from Project resource.
Parameter Name |
Description |
projectName |
string
A fully-qualified path representing Project resource.
|
Returns Type |
Description |
string | number
|
{string} A string representing the project.
|
matchProjectFromTunnelDestGroupName(tunnelDestGroupName)
matchProjectFromTunnelDestGroupName
(
tunnelDestGroupName
:
string
)
:
string
|
number
;
Parse the project from TunnelDestGroup resource.
Parameter Name |
Description |
tunnelDestGroupName |
string
A fully-qualified path representing TunnelDestGroup resource.
|
Returns Type |
Description |
string | number
|
{string} A string representing the project.
|
matchProjectFromTunnelLocationName(tunnelLocationName)
matchProjectFromTunnelLocationName
(
tunnelLocationName
:
string
)
:
string
|
number
;
Parse the project from TunnelLocation resource.
Parameter Name |
Description |
tunnelLocationName |
string
A fully-qualified path representing TunnelLocation resource.
|
Returns Type |
Description |
string | number
|
{string} A string representing the project.
|
projectPath(project)
projectPath
(
project
:
string
)
:
string
;
Return a fully-qualified project resource name string.
Parameter
Returns Type |
Description |
string
|
{string} Resource name string.
|
setIamPolicy(request, options)
setIamPolicy
(
request
?:
protos
.
google
.
iam
.
v1
.
ISetIamPolicyRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
iam
.
v1
.
IPolicy
,
protos
.
google
.
iam
.
v1
.
ISetIamPolicyRequest
|
undefined
,
{}
|
undefined
]>;
Sets the access control policy for an Identity-Aware Proxy protected resource. Replaces any existing policy. More information about managing access via IAP can be found at: https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
Parameters Name |
Description |
request |
protos. google.iam.v1.ISetIamPolicyRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions
for more details.
|
Returns Type |
Description |
Promise
<[
protos. google.iam.v1.IPolicy
,
protos. google.iam.v1.ISetIamPolicyRequest
| undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Policy]. 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: The resource for which the policy is being specified.
* See the operation documentation for the appropriate value for this field.
*/
// const resource = 'abc123'
/**
* REQUIRED: The complete policy to be applied to the `resource`. The size of
* the policy is limited to a few 10s of KB. An empty policy is a
* valid policy but certain Cloud Platform services (such as Projects)
* might reject them.
*/
// const policy = {}
/**
* OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
* the fields in the mask will be modified. If no mask is provided, the
* following default mask is used:
* `paths: "bindings, etag"`
*/
// const updateMask = {}
// Imports the Iap library
const
{
IdentityAwareProxyAdminServiceClient
}
=
require
(
' @google-cloud/iap
'
).
v1
;
// Instantiates a client
const
iapClient
=
new
IdentityAwareProxyAdminServiceClient
();
async
function
callSetIamPolicy
()
{
// Construct request
const
request
=
{
resource
,
policy
,
};
// Run request
const
response
=
await
iapClient
.
setIamPolicy
(
request
);
console
.
log
(
response
);
}
callSetIamPolicy
();
setIamPolicy(request, options, callback)
setIamPolicy
(
request
:
protos
.
google
.
iam
.
v1
.
ISetIamPolicyRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
iam
.
v1
.
IPolicy
,
protos
.
google
.
iam
.
v1
.
ISetIamPolicyRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.iam.v1.ISetIamPolicyRequest
|
options |
CallOptions
|
callback |
Callback
<protos. google.iam.v1.IPolicy
, protos. google.iam.v1.ISetIamPolicyRequest
| null | undefined, {} | null | undefined>
|
Returns
setIamPolicy(request, callback)
setIamPolicy
(
request
:
protos
.
google
.
iam
.
v1
.
ISetIamPolicyRequest
,
callback
:
Callback<protos
.
google
.
iam
.
v1
.
IPolicy
,
protos
.
google
.
iam
.
v1
.
ISetIamPolicyRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.iam.v1.ISetIamPolicyRequest
|
callback |
Callback
<protos. google.iam.v1.IPolicy
, protos. google.iam.v1.ISetIamPolicyRequest
| null | undefined, {} | null | undefined>
|
Returns
testIamPermissions(request, options)
testIamPermissions
(
request
?:
protos
.
google
.
iam
.
v1
.
ITestIamPermissionsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
iam
.
v1
.
ITestIamPermissionsResponse
,
protos
.
google
.
iam
.
v1
.
ITestIamPermissionsRequest
|
undefined
,
{}
|
undefined
]>;
Returns permissions that a caller has on the Identity-Aware Proxy protected resource. More information about managing access via IAP can be found at: https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
Parameters Name |
Description |
request |
protos. google.iam.v1.ITestIamPermissionsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions
for more details.
|
Returns Type |
Description |
Promise
<[
protos. google.iam.v1.ITestIamPermissionsResponse
,
protos. google.iam.v1.ITestIamPermissionsRequest
| undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing [TestIamPermissionsResponse]. 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: The resource for which the policy detail is being requested.
* See the operation documentation for the appropriate value for this field.
*/
// const resource = 'abc123'
/**
* The set of permissions to check for the `resource`. Permissions with
* wildcards (such as '*' or 'storage.*') are not allowed. For more
* information see
* IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).
*/
// const permissions = 'abc123'
// Imports the Iap library
const
{
IdentityAwareProxyAdminServiceClient
}
=
require
(
' @google-cloud/iap
'
).
v1
;
// Instantiates a client
const
iapClient
=
new
IdentityAwareProxyAdminServiceClient
();
async
function
callTestIamPermissions
()
{
// Construct request
const
request
=
{
resource
,
permissions
,
};
// Run request
const
response
=
await
iapClient
.
testIamPermissions
(
request
);
console
.
log
(
response
);
}
callTestIamPermissions
();
testIamPermissions(request, options, callback)
testIamPermissions
(
request
:
protos
.
google
.
iam
.
v1
.
ITestIamPermissionsRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
iam
.
v1
.
ITestIamPermissionsResponse
,
protos
.
google
.
iam
.
v1
.
ITestIamPermissionsRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.iam.v1.ITestIamPermissionsRequest
|
options |
CallOptions
|
callback |
Callback
<protos. google.iam.v1.ITestIamPermissionsResponse
, protos. google.iam.v1.ITestIamPermissionsRequest
| null | undefined, {} | null | undefined>
|
Returns
testIamPermissions(request, callback)
testIamPermissions
(
request
:
protos
.
google
.
iam
.
v1
.
ITestIamPermissionsRequest
,
callback
:
Callback<protos
.
google
.
iam
.
v1
.
ITestIamPermissionsResponse
,
protos
.
google
.
iam
.
v1
.
ITestIamPermissionsRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.iam.v1.ITestIamPermissionsRequest
|
callback |
Callback
<protos. google.iam.v1.ITestIamPermissionsResponse
, protos. google.iam.v1.ITestIamPermissionsRequest
| null | undefined, {} | null | undefined>
|
Returns
tunnelDestGroupPath(project, location, destGroup)
tunnelDestGroupPath
(
project
:
string
,
location
:
string
,
destGroup
:
string
)
:
string
;
Return a fully-qualified tunnelDestGroup resource name string.
Parameters
Returns Type |
Description |
string
|
{string} Resource name string.
|
tunnelLocationPath(project, location)
tunnelLocationPath
(
project
:
string
,
location
:
string
)
:
string
;
Return a fully-qualified tunnelLocation resource name string.
Parameters
Returns Type |
Description |
string
|
{string} Resource name string.
|
updateIapSettings(request, options)
updateIapSettings
(
request
?:
protos
.
google
.
cloud
.
iap
.
v1
.
IUpdateIapSettingsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
iap
.
v1
.
IIapSettings
,
protos
.
google
.
cloud
.
iap
.
v1
.
IUpdateIapSettingsRequest
|
undefined
,
{}
|
undefined
]>;
Updates the IAP settings on a particular IAP protected resource. It replaces all fields unless the update_mask
is set.
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IUpdateIapSettingsRequest
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.IIapSettings
,
protos. google.cloud.iap.v1.IUpdateIapSettingsRequest
| undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing [IapSettings]. 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. The new values for the IAP settings to be updated.
* Authorization: Requires the `updateSettings` permission for the associated
* resource.
*/
// const iapSettings = {}
/**
* The field mask specifying which IAP settings should be updated.
* If omitted, the all of the settings are updated. See
* https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
*/
// const updateMask = {}
// Imports the Iap library
const
{
IdentityAwareProxyAdminServiceClient
}
=
require
(
' @google-cloud/iap
'
).
v1
;
// Instantiates a client
const
iapClient
=
new
IdentityAwareProxyAdminServiceClient
();
async
function
callUpdateIapSettings
()
{
// Construct request
const
request
=
{
iapSettings
,
};
// Run request
const
response
=
await
iapClient
.
updateIapSettings
(
request
);
console
.
log
(
response
);
}
callUpdateIapSettings
();
updateIapSettings(request, options, callback)
updateIapSettings
(
request
:
protos
.
google
.
cloud
.
iap
.
v1
.
IUpdateIapSettingsRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
iap
.
v1
.
IIapSettings
,
protos
.
google
.
cloud
.
iap
.
v1
.
IUpdateIapSettingsRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IUpdateIapSettingsRequest
|
options |
CallOptions
|
callback |
Callback
<protos. google.cloud.iap.v1.IIapSettings
, protos. google.cloud.iap.v1.IUpdateIapSettingsRequest
| null | undefined, {} | null | undefined>
|
Returns
updateIapSettings(request, callback)
updateIapSettings
(
request
:
protos
.
google
.
cloud
.
iap
.
v1
.
IUpdateIapSettingsRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
iap
.
v1
.
IIapSettings
,
protos
.
google
.
cloud
.
iap
.
v1
.
IUpdateIapSettingsRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IUpdateIapSettingsRequest
|
callback |
Callback
<protos. google.cloud.iap.v1.IIapSettings
, protos. google.cloud.iap.v1.IUpdateIapSettingsRequest
| null | undefined, {} | null | undefined>
|
Returns
updateTunnelDestGroup(request, options)
updateTunnelDestGroup
(
request
?:
protos
.
google
.
cloud
.
iap
.
v1
.
IUpdateTunnelDestGroupRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
iap
.
v1
.
ITunnelDestGroup
,
protos
.
google
.
cloud
.
iap
.
v1
.
IUpdateTunnelDestGroupRequest
|
undefined
,
{}
|
undefined
]>;
Updates a TunnelDestGroup.
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IUpdateTunnelDestGroupRequest
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.ITunnelDestGroup
,
protos. google.cloud.iap.v1.IUpdateTunnelDestGroupRequest
| undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing [TunnelDestGroup]. 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. The new values for the TunnelDestGroup.
*/
// const tunnelDestGroup = {}
/**
* A field mask that specifies which IAP settings to update.
* If omitted, then all of the settings are updated. See
* https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
*/
// const updateMask = {}
// Imports the Iap library
const
{
IdentityAwareProxyAdminServiceClient
}
=
require
(
' @google-cloud/iap
'
).
v1
;
// Instantiates a client
const
iapClient
=
new
IdentityAwareProxyAdminServiceClient
();
async
function
callUpdateTunnelDestGroup
()
{
// Construct request
const
request
=
{
tunnelDestGroup
,
};
// Run request
const
response
=
await
iapClient
.
updateTunnelDestGroup
(
request
);
console
.
log
(
response
);
}
callUpdateTunnelDestGroup
();
updateTunnelDestGroup(request, options, callback)
updateTunnelDestGroup
(
request
:
protos
.
google
.
cloud
.
iap
.
v1
.
IUpdateTunnelDestGroupRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
iap
.
v1
.
ITunnelDestGroup
,
protos
.
google
.
cloud
.
iap
.
v1
.
IUpdateTunnelDestGroupRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IUpdateTunnelDestGroupRequest
|
options |
CallOptions
|
callback |
Callback
<protos. google.cloud.iap.v1.ITunnelDestGroup
, protos. google.cloud.iap.v1.IUpdateTunnelDestGroupRequest
| null | undefined, {} | null | undefined>
|
Returns
updateTunnelDestGroup(request, callback)
updateTunnelDestGroup
(
request
:
protos
.
google
.
cloud
.
iap
.
v1
.
IUpdateTunnelDestGroupRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
iap
.
v1
.
ITunnelDestGroup
,
protos
.
google
.
cloud
.
iap
.
v1
.
IUpdateTunnelDestGroupRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name |
Description |
request |
protos. google.cloud.iap.v1.IUpdateTunnelDestGroupRequest
|
callback |
Callback
<protos. google.cloud.iap.v1.ITunnelDestGroup
, protos. google.cloud.iap.v1.IUpdateTunnelDestGroupRequest
| null | undefined, {} | null | undefined>
|
Returns