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
{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
/*** 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`. This field is only used by Cloud IAM.*/// const options = {}// Imports the Iap libraryconst{IdentityAwareProxyAdminServiceClient}=require('@google-cloud/iap').v1;// Instantiates a clientconstiapClient=newIdentityAwareProxyAdminServiceClient();asyncfunctioncallGetIamPolicy(){// Construct requestconstrequest={resource,};// Run requestconstresponse=awaitiapClient.getIamPolicy(request);console.log(response);}callGetIamPolicy();
{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
/*** 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 libraryconst{IdentityAwareProxyAdminServiceClient}=require('@google-cloud/iap').v1;// Instantiates a clientconstiapClient=newIdentityAwareProxyAdminServiceClient();asyncfunctioncallGetIapSettings(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitiapClient.getIapSettings(request);console.log(response);}callGetIapSettings();
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.
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
{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
/*** 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 = {}// Imports the Iap libraryconst{IdentityAwareProxyAdminServiceClient}=require('@google-cloud/iap').v1;// Instantiates a clientconstiapClient=newIdentityAwareProxyAdminServiceClient();asyncfunctioncallSetIamPolicy(){// Construct requestconstrequest={resource,policy,};// Run requestconstresponse=awaitiapClient.setIamPolicy(request);console.log(response);}callSetIamPolicy();
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
{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
/*** 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 libraryconst{IdentityAwareProxyAdminServiceClient}=require('@google-cloud/iap').v1;// Instantiates a clientconstiapClient=newIdentityAwareProxyAdminServiceClient();asyncfunctioncallTestIamPermissions(){// Construct requestconstrequest={resource,permissions,};// Run requestconstresponse=awaitiapClient.testIamPermissions(request);console.log(response);}callTestIamPermissions();
{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
/*** 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 libraryconst{IdentityAwareProxyAdminServiceClient}=require('@google-cloud/iap').v1;// Instantiates a clientconstiapClient=newIdentityAwareProxyAdminServiceClient();asyncfunctioncallUpdateIapSettings(){// Construct requestconstrequest={iapSettings,};// Run requestconstresponse=awaitiapClient.updateIapSettings(request);console.log(response);}callUpdateIapSettings();
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-30 UTC."],[],[]]