Class IdentityAwareProxyAdminServiceClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient =
IdentityAwareProxyAdminServiceClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = identityAwareProxyAdminServiceClient.setIamPolicy(request);
}
Note: close() needs to be called on the IdentityAwareProxyAdminServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
SetIamPolicy |
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 |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
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 |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
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 |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIapSettings |
Gets the IAP settings on a particular IAP protected resource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateIapSettings |
Updates the IAP settings on a particular IAP protected resource. It replaces all fields unless the `update_mask` is set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ValidateIapAttributeExpression |
Validates that a given CEL expression conforms to IAP restrictions. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListTunnelDestGroups |
Lists the existing TunnelDestGroups. To group across all locations, use a `-` as the location ID. For example: `/v1/projects/123/iap_tunnel/locations/-/destGroups` |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateTunnelDestGroup |
Creates a new TunnelDestGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetTunnelDestGroup |
Retrieves an existing TunnelDestGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTunnelDestGroup |
Deletes a TunnelDestGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateTunnelDestGroup |
Updates a TunnelDestGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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 IdentityAwareProxyAdminServiceSettings 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
IdentityAwareProxyAdminServiceSettings identityAwareProxyAdminServiceSettings =
IdentityAwareProxyAdminServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient =
IdentityAwareProxyAdminServiceClient.create(identityAwareProxyAdminServiceSettings);
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
IdentityAwareProxyAdminServiceSettings identityAwareProxyAdminServiceSettings =
IdentityAwareProxyAdminServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient =
IdentityAwareProxyAdminServiceClient.create(identityAwareProxyAdminServiceSettings);
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
IdentityAwareProxyAdminServiceSettings identityAwareProxyAdminServiceSettings =
IdentityAwareProxyAdminServiceSettings.newHttpJsonBuilder().build();
IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient =
IdentityAwareProxyAdminServiceClient.create(identityAwareProxyAdminServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs an instance of IdentityAwareProxyAdminServiceClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final IdentityAwareProxyAdminServiceClientcreate()Constructs an instance of IdentityAwareProxyAdminServiceClient with default settings.static final IdentityAwareProxyAdminServiceClientcreate(IdentityAwareProxyAdminServiceSettings settings) Constructs an instance of IdentityAwareProxyAdminServiceClient, using the given settings.static final IdentityAwareProxyAdminServiceClientConstructs an instance of IdentityAwareProxyAdminServiceClient, using the given stub for making calls.final TunnelDestGroupCreates a new TunnelDestGroup.final TunnelDestGroupcreateTunnelDestGroup(TunnelLocationName parent, TunnelDestGroup tunnelDestGroup, String tunnelDestGroupId) Creates a new TunnelDestGroup.final TunnelDestGroupcreateTunnelDestGroup(String parent, TunnelDestGroup tunnelDestGroup, String tunnelDestGroupId) Creates a new TunnelDestGroup.Creates a new TunnelDestGroup.final voidDeletes a TunnelDestGroup.final voidDeletes a TunnelDestGroup.final voiddeleteTunnelDestGroup(String name) Deletes a TunnelDestGroup.final UnaryCallable<DeleteTunnelDestGroupRequest,com.google.protobuf.Empty> Deletes a TunnelDestGroup.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy for an Identity-Aware Proxy protected resource.Gets the access control policy for an Identity-Aware Proxy protected resource.final IapSettingsgetIapSettings(GetIapSettingsRequest request) Gets the IAP settings on a particular IAP protected resource.Gets the IAP settings on a particular IAP protected resource.getStub()final TunnelDestGroupRetrieves an existing TunnelDestGroup.final TunnelDestGroupRetrieves an existing TunnelDestGroup.final TunnelDestGroupgetTunnelDestGroup(String name) Retrieves an existing TunnelDestGroup.Retrieves an existing TunnelDestGroup.booleanbooleanLists the existing TunnelDestGroups.Lists the existing TunnelDestGroups.listTunnelDestGroups(String parent) Lists the existing TunnelDestGroups.Lists the existing TunnelDestGroups.final UnaryCallable<ListTunnelDestGroupsRequest,IdentityAwareProxyAdminServiceClient.ListTunnelDestGroupsPagedResponse> Lists the existing TunnelDestGroups.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy for an Identity-Aware Proxy protected resource.Sets the access control policy for an Identity-Aware Proxy protected resource.voidshutdown()voidReturns permissions that a caller has on the Identity-Aware Proxy protected resource.Returns permissions that a caller has on the Identity-Aware Proxy protected resource.final IapSettingsUpdates the IAP settings on a particular IAP protected resource.Updates the IAP settings on a particular IAP protected resource.final TunnelDestGroupupdateTunnelDestGroup(TunnelDestGroup tunnelDestGroup, com.google.protobuf.FieldMask updateMask) Updates a TunnelDestGroup.final TunnelDestGroupUpdates a TunnelDestGroup.Updates a TunnelDestGroup.Validates that a given CEL expression conforms to IAP restrictions.Validates that a given CEL expression conforms to IAP restrictions.
-
Constructor Details
-
IdentityAwareProxyAdminServiceClient
protected IdentityAwareProxyAdminServiceClient(IdentityAwareProxyAdminServiceSettings settings) throws IOException Constructs an instance of IdentityAwareProxyAdminServiceClient, 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
-
IdentityAwareProxyAdminServiceClient
-
-
Method Details
-
create
Constructs an instance of IdentityAwareProxyAdminServiceClient with default settings.- Throws:
IOException
-
create
public static final IdentityAwareProxyAdminServiceClient create(IdentityAwareProxyAdminServiceSettings settings) throws IOException Constructs an instance of IdentityAwareProxyAdminServiceClient, 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
public static final IdentityAwareProxyAdminServiceClient create(IdentityAwareProxyAdminServiceStub stub) Constructs an instance of IdentityAwareProxyAdminServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(IdentityAwareProxyAdminServiceSettings). -
getSettings
-
getStub
-
setIamPolicy
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_apiSample 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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]").toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Policy response = identityAwareProxyAdminServiceClient.setIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setIamPolicyCallable
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_apiSample 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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]").toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Policy> future = identityAwareProxyAdminServiceClient.setIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
getIamPolicy
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_apiSample 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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]").toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); Policy response = identityAwareProxyAdminServiceClient.getIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getIamPolicyCallable
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_apiSample 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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]").toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); ApiFuture<Policy> future = identityAwareProxyAdminServiceClient.getIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
testIamPermissions
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_apiSample 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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]").toString()) .addAllPermissions(new ArrayList<String>()) .build(); TestIamPermissionsResponse response = identityAwareProxyAdminServiceClient.testIamPermissions(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
testIamPermissionsCallable
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()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_apiSample 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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]").toString()) .addAllPermissions(new ArrayList<String>()) .build(); ApiFuture<TestIamPermissionsResponse> future = identityAwareProxyAdminServiceClient.testIamPermissionsCallable().futureCall(request); // Do something. TestIamPermissionsResponse response = future.get(); } -
getIapSettings
Gets the IAP settings on a particular IAP protected resource.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { GetIapSettingsRequest request = GetIapSettingsRequest.newBuilder().setName("name3373707").build(); IapSettings response = identityAwareProxyAdminServiceClient.getIapSettings(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getIapSettingsCallable
Gets the IAP settings on a particular IAP protected resource.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { GetIapSettingsRequest request = GetIapSettingsRequest.newBuilder().setName("name3373707").build(); ApiFuture<IapSettings> future = identityAwareProxyAdminServiceClient.getIapSettingsCallable().futureCall(request); // Do something. IapSettings response = future.get(); } -
updateIapSettings
Updates the IAP settings on a particular IAP protected resource. It replaces all fields unless the `update_mask` is set.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { UpdateIapSettingsRequest request = UpdateIapSettingsRequest.newBuilder() .setIapSettings(IapSettings.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); IapSettings response = identityAwareProxyAdminServiceClient.updateIapSettings(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateIapSettingsCallable
Updates the IAP settings on a particular IAP protected resource. It replaces all fields unless the `update_mask` is set.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { UpdateIapSettingsRequest request = UpdateIapSettingsRequest.newBuilder() .setIapSettings(IapSettings.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<IapSettings> future = identityAwareProxyAdminServiceClient.updateIapSettingsCallable().futureCall(request); // Do something. IapSettings response = future.get(); } -
validateIapAttributeExpression
public final ValidateIapAttributeExpressionResponse validateIapAttributeExpression(ValidateIapAttributeExpressionRequest request) Validates that a given CEL expression conforms to IAP restrictions.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { ValidateIapAttributeExpressionRequest request = ValidateIapAttributeExpressionRequest.newBuilder() .setName("name3373707") .setExpression("expression-1795452264") .build(); ValidateIapAttributeExpressionResponse response = identityAwareProxyAdminServiceClient.validateIapAttributeExpression(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
validateIapAttributeExpressionCallable
public final UnaryCallable<ValidateIapAttributeExpressionRequest,ValidateIapAttributeExpressionResponse> validateIapAttributeExpressionCallable()Validates that a given CEL expression conforms to IAP restrictions.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { ValidateIapAttributeExpressionRequest request = ValidateIapAttributeExpressionRequest.newBuilder() .setName("name3373707") .setExpression("expression-1795452264") .build(); ApiFuture<ValidateIapAttributeExpressionResponse> future = identityAwareProxyAdminServiceClient .validateIapAttributeExpressionCallable() .futureCall(request); // Do something. ValidateIapAttributeExpressionResponse response = future.get(); } -
listTunnelDestGroups
public final IdentityAwareProxyAdminServiceClient.ListTunnelDestGroupsPagedResponse listTunnelDestGroups(TunnelLocationName parent) Lists the existing TunnelDestGroups. To group across all locations, use a `-` as the location ID. For example: `/v1/projects/123/iap_tunnel/locations/-/destGroups`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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { TunnelLocationName parent = TunnelLocationName.of("[PROJECT]", "[LOCATION]"); for (TunnelDestGroup element : identityAwareProxyAdminServiceClient.listTunnelDestGroups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- 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.- Throws:
ApiException- if the remote call fails
-
listTunnelDestGroups
public final IdentityAwareProxyAdminServiceClient.ListTunnelDestGroupsPagedResponse listTunnelDestGroups(String parent) Lists the existing TunnelDestGroups. To group across all locations, use a `-` as the location ID. For example: `/v1/projects/123/iap_tunnel/locations/-/destGroups`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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { String parent = TunnelLocationName.of("[PROJECT]", "[LOCATION]").toString(); for (TunnelDestGroup element : identityAwareProxyAdminServiceClient.listTunnelDestGroups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- 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.- Throws:
ApiException- if the remote call fails
-
listTunnelDestGroups
public final IdentityAwareProxyAdminServiceClient.ListTunnelDestGroupsPagedResponse listTunnelDestGroups(ListTunnelDestGroupsRequest request) Lists the existing TunnelDestGroups. To group across all locations, use a `-` as the location ID. For example: `/v1/projects/123/iap_tunnel/locations/-/destGroups`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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { ListTunnelDestGroupsRequest request = ListTunnelDestGroupsRequest.newBuilder() .setParent(TunnelLocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (TunnelDestGroup element : identityAwareProxyAdminServiceClient.listTunnelDestGroups(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
-
listTunnelDestGroupsPagedCallable
public final UnaryCallable<ListTunnelDestGroupsRequest,IdentityAwareProxyAdminServiceClient.ListTunnelDestGroupsPagedResponse> listTunnelDestGroupsPagedCallable()Lists the existing TunnelDestGroups. To group across all locations, use a `-` as the location ID. For example: `/v1/projects/123/iap_tunnel/locations/-/destGroups`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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { ListTunnelDestGroupsRequest request = ListTunnelDestGroupsRequest.newBuilder() .setParent(TunnelLocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<TunnelDestGroup> future = identityAwareProxyAdminServiceClient .listTunnelDestGroupsPagedCallable() .futureCall(request); // Do something. for (TunnelDestGroup element : future.get().iterateAll()) { // doThingsWith(element); } } -
listTunnelDestGroupsCallable
public final UnaryCallable<ListTunnelDestGroupsRequest,ListTunnelDestGroupsResponse> listTunnelDestGroupsCallable()Lists the existing TunnelDestGroups. To group across all locations, use a `-` as the location ID. For example: `/v1/projects/123/iap_tunnel/locations/-/destGroups`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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { ListTunnelDestGroupsRequest request = ListTunnelDestGroupsRequest.newBuilder() .setParent(TunnelLocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListTunnelDestGroupsResponse response = identityAwareProxyAdminServiceClient.listTunnelDestGroupsCallable().call(request); for (TunnelDestGroup element : response.getTunnelDestGroupsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
createTunnelDestGroup
public final TunnelDestGroup createTunnelDestGroup(TunnelLocationName parent, TunnelDestGroup tunnelDestGroup, String tunnelDestGroupId) Creates a new TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { TunnelLocationName parent = TunnelLocationName.of("[PROJECT]", "[LOCATION]"); TunnelDestGroup tunnelDestGroup = TunnelDestGroup.newBuilder().build(); String tunnelDestGroupId = "tunnelDestGroupId-1240473232"; TunnelDestGroup response = identityAwareProxyAdminServiceClient.createTunnelDestGroup( parent, tunnelDestGroup, tunnelDestGroupId); }- Parameters:
parent- Required. Google Cloud Project ID and location. In the following format: `projects/{project_number/id}/iap_tunnel/locations/{location}`.tunnelDestGroup- Required. The TunnelDestGroup to create.tunnelDestGroupId- 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]-`.
- Throws:
ApiException- if the remote call fails
-
createTunnelDestGroup
public final TunnelDestGroup createTunnelDestGroup(String parent, TunnelDestGroup tunnelDestGroup, String tunnelDestGroupId) Creates a new TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { String parent = TunnelLocationName.of("[PROJECT]", "[LOCATION]").toString(); TunnelDestGroup tunnelDestGroup = TunnelDestGroup.newBuilder().build(); String tunnelDestGroupId = "tunnelDestGroupId-1240473232"; TunnelDestGroup response = identityAwareProxyAdminServiceClient.createTunnelDestGroup( parent, tunnelDestGroup, tunnelDestGroupId); }- Parameters:
parent- Required. Google Cloud Project ID and location. In the following format: `projects/{project_number/id}/iap_tunnel/locations/{location}`.tunnelDestGroup- Required. The TunnelDestGroup to create.tunnelDestGroupId- 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]-`.
- Throws:
ApiException- if the remote call fails
-
createTunnelDestGroup
Creates a new TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { CreateTunnelDestGroupRequest request = CreateTunnelDestGroupRequest.newBuilder() .setParent(TunnelLocationName.of("[PROJECT]", "[LOCATION]").toString()) .setTunnelDestGroup(TunnelDestGroup.newBuilder().build()) .setTunnelDestGroupId("tunnelDestGroupId-1240473232") .build(); TunnelDestGroup response = identityAwareProxyAdminServiceClient.createTunnelDestGroup(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createTunnelDestGroupCallable
public final UnaryCallable<CreateTunnelDestGroupRequest,TunnelDestGroup> createTunnelDestGroupCallable()Creates a new TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { CreateTunnelDestGroupRequest request = CreateTunnelDestGroupRequest.newBuilder() .setParent(TunnelLocationName.of("[PROJECT]", "[LOCATION]").toString()) .setTunnelDestGroup(TunnelDestGroup.newBuilder().build()) .setTunnelDestGroupId("tunnelDestGroupId-1240473232") .build(); ApiFuture<TunnelDestGroup> future = identityAwareProxyAdminServiceClient.createTunnelDestGroupCallable().futureCall(request); // Do something. TunnelDestGroup response = future.get(); } -
getTunnelDestGroup
Retrieves an existing TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { TunnelDestGroupName name = TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]"); TunnelDestGroup response = identityAwareProxyAdminServiceClient.getTunnelDestGroup(name); }- Parameters:
name- Required. Name of the TunnelDestGroup to be fetched. In the following format: `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.- Throws:
ApiException- if the remote call fails
-
getTunnelDestGroup
Retrieves an existing TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { String name = TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]").toString(); TunnelDestGroup response = identityAwareProxyAdminServiceClient.getTunnelDestGroup(name); }- Parameters:
name- Required. Name of the TunnelDestGroup to be fetched. In the following format: `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.- Throws:
ApiException- if the remote call fails
-
getTunnelDestGroup
Retrieves an existing TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { GetTunnelDestGroupRequest request = GetTunnelDestGroupRequest.newBuilder() .setName(TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]").toString()) .build(); TunnelDestGroup response = identityAwareProxyAdminServiceClient.getTunnelDestGroup(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getTunnelDestGroupCallable
Retrieves an existing TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { GetTunnelDestGroupRequest request = GetTunnelDestGroupRequest.newBuilder() .setName(TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]").toString()) .build(); ApiFuture<TunnelDestGroup> future = identityAwareProxyAdminServiceClient.getTunnelDestGroupCallable().futureCall(request); // Do something. TunnelDestGroup response = future.get(); } -
deleteTunnelDestGroup
Deletes a TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { TunnelDestGroupName name = TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]"); identityAwareProxyAdminServiceClient.deleteTunnelDestGroup(name); }- Parameters:
name- Required. Name of the TunnelDestGroup to delete. In the following format: `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.- Throws:
ApiException- if the remote call fails
-
deleteTunnelDestGroup
Deletes a TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { String name = TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]").toString(); identityAwareProxyAdminServiceClient.deleteTunnelDestGroup(name); }- Parameters:
name- Required. Name of the TunnelDestGroup to delete. In the following format: `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.- Throws:
ApiException- if the remote call fails
-
deleteTunnelDestGroup
Deletes a TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { DeleteTunnelDestGroupRequest request = DeleteTunnelDestGroupRequest.newBuilder() .setName(TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]").toString()) .build(); identityAwareProxyAdminServiceClient.deleteTunnelDestGroup(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteTunnelDestGroupCallable
public final UnaryCallable<DeleteTunnelDestGroupRequest,com.google.protobuf.Empty> deleteTunnelDestGroupCallable()Deletes a TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { DeleteTunnelDestGroupRequest request = DeleteTunnelDestGroupRequest.newBuilder() .setName(TunnelDestGroupName.of("[PROJECT]", "[LOCATION]", "[DEST_GROUP]").toString()) .build(); ApiFuture<Empty> future = identityAwareProxyAdminServiceClient.deleteTunnelDestGroupCallable().futureCall(request); // Do something. future.get(); } -
updateTunnelDestGroup
public final TunnelDestGroup updateTunnelDestGroup(TunnelDestGroup tunnelDestGroup, com.google.protobuf.FieldMask updateMask) Updates a TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { TunnelDestGroup tunnelDestGroup = TunnelDestGroup.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); TunnelDestGroup response = identityAwareProxyAdminServiceClient.updateTunnelDestGroup(tunnelDestGroup, updateMask); }- Parameters:
tunnelDestGroup- Required. The new values for the TunnelDestGroup.updateMask- 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- Throws:
ApiException- if the remote call fails
-
updateTunnelDestGroup
Updates a TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { UpdateTunnelDestGroupRequest request = UpdateTunnelDestGroupRequest.newBuilder() .setTunnelDestGroup(TunnelDestGroup.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); TunnelDestGroup response = identityAwareProxyAdminServiceClient.updateTunnelDestGroup(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateTunnelDestGroupCallable
public final UnaryCallable<UpdateTunnelDestGroupRequest,TunnelDestGroup> updateTunnelDestGroupCallable()Updates a TunnelDestGroup.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 (IdentityAwareProxyAdminServiceClient identityAwareProxyAdminServiceClient = IdentityAwareProxyAdminServiceClient.create()) { UpdateTunnelDestGroupRequest request = UpdateTunnelDestGroupRequest.newBuilder() .setTunnelDestGroup(TunnelDestGroup.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<TunnelDestGroup> future = identityAwareProxyAdminServiceClient.updateTunnelDestGroupCallable().futureCall(request); // Do something. TunnelDestGroup response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-