Class IdentityAwareProxyOAuthServiceClient

java.lang.Object
com.google.cloud.iap.v1.IdentityAwareProxyOAuthServiceClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class IdentityAwareProxyOAuthServiceClient extends Object implements BackgroundResource
Service Description: API to programmatically create, list and retrieve Identity Aware Proxy (IAP) OAuth brands; and create, retrieve, delete and reset-secret of IAP OAuth clients.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
     IdentityAwareProxyOAuthServiceClient.create()) {
   ListBrandsRequest request =
       ListBrandsRequest.newBuilder().setParent("parent-995424086").build();
   ListBrandsResponse response = identityAwareProxyOAuthServiceClient.listBrands(request);
 }
 

Note: close() needs to be called on the IdentityAwareProxyOAuthServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

ListBrands

Lists the existing brands for the project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBrands(ListBrandsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBrandsCallable()

CreateBrand

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createBrand(CreateBrandRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createBrandCallable()

GetBrand

Retrieves the OAuth brand of the project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBrand(GetBrandRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBrandCallable()

CreateIdentityAwareProxyClient

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createIdentityAwareProxyClient(CreateIdentityAwareProxyClientRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createIdentityAwareProxyClientCallable()

ListIdentityAwareProxyClients

Lists the existing clients for the brand.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listIdentityAwareProxyClients(ListIdentityAwareProxyClientsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listIdentityAwareProxyClientsPagedCallable()

  • listIdentityAwareProxyClientsCallable()

GetIdentityAwareProxyClient

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIdentityAwareProxyClient(GetIdentityAwareProxyClientRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIdentityAwareProxyClientCallable()

ResetIdentityAwareProxyClientSecret

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • resetIdentityAwareProxyClientSecret(ResetIdentityAwareProxyClientSecretRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • resetIdentityAwareProxyClientSecretCallable()

DeleteIdentityAwareProxyClient

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteIdentityAwareProxyClient(DeleteIdentityAwareProxyClientRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteIdentityAwareProxyClientCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of IdentityAwareProxyOAuthServiceSettings to create(). For example:

To customize credentials:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 IdentityAwareProxyOAuthServiceSettings identityAwareProxyOAuthServiceSettings =
     IdentityAwareProxyOAuthServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
     IdentityAwareProxyOAuthServiceClient.create(identityAwareProxyOAuthServiceSettings);
 

To customize the endpoint:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 IdentityAwareProxyOAuthServiceSettings identityAwareProxyOAuthServiceSettings =
     IdentityAwareProxyOAuthServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
     IdentityAwareProxyOAuthServiceClient.create(identityAwareProxyOAuthServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 IdentityAwareProxyOAuthServiceSettings identityAwareProxyOAuthServiceSettings =
     IdentityAwareProxyOAuthServiceSettings.newHttpJsonBuilder().build();
 IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
     IdentityAwareProxyOAuthServiceClient.create(identityAwareProxyOAuthServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

  • Constructor Details

    • IdentityAwareProxyOAuthServiceClient

      protected IdentityAwareProxyOAuthServiceClient(IdentityAwareProxyOAuthServiceSettings settings) throws IOException
      Constructs an instance of IdentityAwareProxyOAuthServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
      Throws:
      IOException
    • IdentityAwareProxyOAuthServiceClient

      protected IdentityAwareProxyOAuthServiceClient(IdentityAwareProxyOAuthServiceStub stub)
  • Method Details

    • create

      public static final IdentityAwareProxyOAuthServiceClient create() throws IOException
      Constructs an instance of IdentityAwareProxyOAuthServiceClient with default settings.
      Throws:
      IOException
    • create

      Constructs an instance of IdentityAwareProxyOAuthServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
      Throws:
      IOException
    • create

      Constructs an instance of IdentityAwareProxyOAuthServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(IdentityAwareProxyOAuthServiceSettings).
    • getSettings

      public final IdentityAwareProxyOAuthServiceSettings getSettings()
    • getStub

    • listBrands

      public final ListBrandsResponse listBrands(ListBrandsRequest request)
      Lists the existing brands for the project.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         ListBrandsRequest request =
             ListBrandsRequest.newBuilder().setParent("parent-995424086").build();
         ListBrandsResponse response = identityAwareProxyOAuthServiceClient.listBrands(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listBrandsCallable

      public final UnaryCallable<ListBrandsRequest,ListBrandsResponse> listBrandsCallable()
      Lists the existing brands for the project.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         ListBrandsRequest request =
             ListBrandsRequest.newBuilder().setParent("parent-995424086").build();
         ApiFuture<ListBrandsResponse> future =
             identityAwareProxyOAuthServiceClient.listBrandsCallable().futureCall(request);
         // Do something.
         ListBrandsResponse response = future.get();
       }
       
    • createBrand

      public final Brand createBrand(CreateBrandRequest request)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         CreateBrandRequest request =
             CreateBrandRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setBrand(Brand.newBuilder().build())
                 .build();
         Brand response = identityAwareProxyOAuthServiceClient.createBrand(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createBrandCallable

      public final UnaryCallable<CreateBrandRequest,Brand> createBrandCallable()
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         CreateBrandRequest request =
             CreateBrandRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setBrand(Brand.newBuilder().build())
                 .build();
         ApiFuture<Brand> future =
             identityAwareProxyOAuthServiceClient.createBrandCallable().futureCall(request);
         // Do something.
         Brand response = future.get();
       }
       
    • getBrand

      public final Brand getBrand(GetBrandRequest request)
      Retrieves the OAuth brand of the project.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         GetBrandRequest request = GetBrandRequest.newBuilder().setName("name3373707").build();
         Brand response = identityAwareProxyOAuthServiceClient.getBrand(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getBrandCallable

      public final UnaryCallable<GetBrandRequest,Brand> getBrandCallable()
      Retrieves the OAuth brand of the project.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         GetBrandRequest request = GetBrandRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Brand> future =
             identityAwareProxyOAuthServiceClient.getBrandCallable().futureCall(request);
         // Do something.
         Brand response = future.get();
       }
       
    • createIdentityAwareProxyClient

      public final IdentityAwareProxyClient createIdentityAwareProxyClient(CreateIdentityAwareProxyClientRequest request)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         CreateIdentityAwareProxyClientRequest request =
             CreateIdentityAwareProxyClientRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setIdentityAwareProxyClient(IdentityAwareProxyClient.newBuilder().build())
                 .build();
         IdentityAwareProxyClient response =
             identityAwareProxyOAuthServiceClient.createIdentityAwareProxyClient(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createIdentityAwareProxyClientCallable

      public final UnaryCallable<CreateIdentityAwareProxyClientRequest,IdentityAwareProxyClient> createIdentityAwareProxyClientCallable()
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         CreateIdentityAwareProxyClientRequest request =
             CreateIdentityAwareProxyClientRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setIdentityAwareProxyClient(IdentityAwareProxyClient.newBuilder().build())
                 .build();
         ApiFuture<IdentityAwareProxyClient> future =
             identityAwareProxyOAuthServiceClient
                 .createIdentityAwareProxyClientCallable()
                 .futureCall(request);
         // Do something.
         IdentityAwareProxyClient response = future.get();
       }
       
    • listIdentityAwareProxyClients

      Lists the existing clients for the brand.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         ListIdentityAwareProxyClientsRequest request =
             ListIdentityAwareProxyClientsRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (IdentityAwareProxyClient element :
             identityAwareProxyOAuthServiceClient
                 .listIdentityAwareProxyClients(request)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listIdentityAwareProxyClientsPagedCallable

      Lists the existing clients for the brand.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         ListIdentityAwareProxyClientsRequest request =
             ListIdentityAwareProxyClientsRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<IdentityAwareProxyClient> future =
             identityAwareProxyOAuthServiceClient
                 .listIdentityAwareProxyClientsPagedCallable()
                 .futureCall(request);
         // Do something.
         for (IdentityAwareProxyClient element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listIdentityAwareProxyClientsCallable

      public final UnaryCallable<ListIdentityAwareProxyClientsRequest,ListIdentityAwareProxyClientsResponse> listIdentityAwareProxyClientsCallable()
      Lists the existing clients for the brand.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         ListIdentityAwareProxyClientsRequest request =
             ListIdentityAwareProxyClientsRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListIdentityAwareProxyClientsResponse response =
               identityAwareProxyOAuthServiceClient
                   .listIdentityAwareProxyClientsCallable()
                   .call(request);
           for (IdentityAwareProxyClient element : response.getIdentityAwareProxyClientsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getIdentityAwareProxyClient

      public final IdentityAwareProxyClient getIdentityAwareProxyClient(GetIdentityAwareProxyClientRequest request)
      Retrieves an Identity Aware Proxy (IAP) OAuth client. Requires that the client is owned by IAP.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         GetIdentityAwareProxyClientRequest request =
             GetIdentityAwareProxyClientRequest.newBuilder().setName("name3373707").build();
         IdentityAwareProxyClient response =
             identityAwareProxyOAuthServiceClient.getIdentityAwareProxyClient(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getIdentityAwareProxyClientCallable

      public final UnaryCallable<GetIdentityAwareProxyClientRequest,IdentityAwareProxyClient> getIdentityAwareProxyClientCallable()
      Retrieves an Identity Aware Proxy (IAP) OAuth client. Requires that the client is owned by IAP.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         GetIdentityAwareProxyClientRequest request =
             GetIdentityAwareProxyClientRequest.newBuilder().setName("name3373707").build();
         ApiFuture<IdentityAwareProxyClient> future =
             identityAwareProxyOAuthServiceClient
                 .getIdentityAwareProxyClientCallable()
                 .futureCall(request);
         // Do something.
         IdentityAwareProxyClient response = future.get();
       }
       
    • resetIdentityAwareProxyClientSecret

      public final IdentityAwareProxyClient resetIdentityAwareProxyClientSecret(ResetIdentityAwareProxyClientSecretRequest request)
      Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the secret was compromised. Requires that the client is owned by IAP.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         ResetIdentityAwareProxyClientSecretRequest request =
             ResetIdentityAwareProxyClientSecretRequest.newBuilder().setName("name3373707").build();
         IdentityAwareProxyClient response =
             identityAwareProxyOAuthServiceClient.resetIdentityAwareProxyClientSecret(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • resetIdentityAwareProxyClientSecretCallable

      public final UnaryCallable<ResetIdentityAwareProxyClientSecretRequest,IdentityAwareProxyClient> resetIdentityAwareProxyClientSecretCallable()
      Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the secret was compromised. Requires that the client is owned by IAP.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         ResetIdentityAwareProxyClientSecretRequest request =
             ResetIdentityAwareProxyClientSecretRequest.newBuilder().setName("name3373707").build();
         ApiFuture<IdentityAwareProxyClient> future =
             identityAwareProxyOAuthServiceClient
                 .resetIdentityAwareProxyClientSecretCallable()
                 .futureCall(request);
         // Do something.
         IdentityAwareProxyClient response = future.get();
       }
       
    • deleteIdentityAwareProxyClient

      public final void deleteIdentityAwareProxyClient(DeleteIdentityAwareProxyClientRequest request)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         DeleteIdentityAwareProxyClientRequest request =
             DeleteIdentityAwareProxyClientRequest.newBuilder().setName("name3373707").build();
         identityAwareProxyOAuthServiceClient.deleteIdentityAwareProxyClient(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteIdentityAwareProxyClientCallable

      public final UnaryCallable<DeleteIdentityAwareProxyClientRequest,com.google.protobuf.Empty> deleteIdentityAwareProxyClientCallable()
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (IdentityAwareProxyOAuthServiceClient identityAwareProxyOAuthServiceClient =
           IdentityAwareProxyOAuthServiceClient.create()) {
         DeleteIdentityAwareProxyClientRequest request =
             DeleteIdentityAwareProxyClientRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Empty> future =
             identityAwareProxyOAuthServiceClient
                 .deleteIdentityAwareProxyClientCallable()
                 .futureCall(request);
         // Do something.
         future.get();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException