@Generated(value="by gapic-generator-java") public class IdentityMappingStoreServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build();
String identityMappingStoreId = "identityMappingStoreId677904780";
IdentityMappingStore response =
identityMappingStoreServiceClient.createIdentityMappingStore(
parent, identityMappingStore, identityMappingStoreId);
}
Note: close() needs to be called on the IdentityMappingStoreServiceClient 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 |
|---|---|---|
CreateIdentityMappingStore |
Creates a new Identity Mapping Store. |
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.
|
GetIdentityMappingStore |
Gets the Identity Mapping Store. |
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.
|
DeleteIdentityMappingStore |
Deletes the Identity Mapping Store. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ImportIdentityMappings |
Imports a list of Identity Mapping Entries to an Identity Mapping Store. |
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.
|
PurgeIdentityMappings |
Purges specified or all Identity Mapping Entries from an Identity Mapping Store. |
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.
|
ListIdentityMappings |
Lists Identity Mappings in an Identity Mapping Store. |
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.
|
ListIdentityMappingStores |
Lists all Identity Mapping Stores. |
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 IdentityMappingStoreServiceSettings 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
IdentityMappingStoreServiceSettings identityMappingStoreServiceSettings =
IdentityMappingStoreServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create(identityMappingStoreServiceSettings);
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
IdentityMappingStoreServiceSettings identityMappingStoreServiceSettings =
IdentityMappingStoreServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create(identityMappingStoreServiceSettings);
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
IdentityMappingStoreServiceSettings identityMappingStoreServiceSettings =
IdentityMappingStoreServiceSettings.newHttpJsonBuilder().build();
IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create(identityMappingStoreServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
IdentityMappingStoreServiceClient.ListIdentityMappingsFixedSizeCollection |
static class |
IdentityMappingStoreServiceClient.ListIdentityMappingsPage |
static class |
IdentityMappingStoreServiceClient.ListIdentityMappingsPagedResponse |
static class |
IdentityMappingStoreServiceClient.ListIdentityMappingStoresFixedSizeCollection |
static class |
IdentityMappingStoreServiceClient.ListIdentityMappingStoresPage |
static class |
IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
IdentityMappingStoreServiceClient(IdentityMappingStoreServiceSettings settings)
Constructs an instance of IdentityMappingStoreServiceClient, using the given settings.
|
protected |
IdentityMappingStoreServiceClient(IdentityMappingStoreServiceStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static IdentityMappingStoreServiceClient |
create()
Constructs an instance of IdentityMappingStoreServiceClient with default settings.
|
static IdentityMappingStoreServiceClient |
create(IdentityMappingStoreServiceSettings settings)
Constructs an instance of IdentityMappingStoreServiceClient, using the given settings.
|
static IdentityMappingStoreServiceClient |
create(IdentityMappingStoreServiceStub stub)
Constructs an instance of IdentityMappingStoreServiceClient, using the given stub for making
calls.
|
IdentityMappingStore |
createIdentityMappingStore(CreateIdentityMappingStoreRequest request)
Creates a new Identity Mapping Store.
|
IdentityMappingStore |
createIdentityMappingStore(LocationName parent,
IdentityMappingStore identityMappingStore,
String identityMappingStoreId)
Creates a new Identity Mapping Store.
|
IdentityMappingStore |
createIdentityMappingStore(String parent,
IdentityMappingStore identityMappingStore,
String identityMappingStoreId)
Creates a new Identity Mapping Store.
|
com.google.api.gax.rpc.UnaryCallable<CreateIdentityMappingStoreRequest,IdentityMappingStore> |
createIdentityMappingStoreCallable()
Creates a new Identity Mapping Store.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIdentityMappingStoreMetadata> |
deleteIdentityMappingStoreAsync(DeleteIdentityMappingStoreRequest request)
Deletes the Identity Mapping Store.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIdentityMappingStoreMetadata> |
deleteIdentityMappingStoreAsync(IdentityMappingStoreName name)
Deletes the Identity Mapping Store.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIdentityMappingStoreMetadata> |
deleteIdentityMappingStoreAsync(String name)
Deletes the Identity Mapping Store.
|
com.google.api.gax.rpc.UnaryCallable<DeleteIdentityMappingStoreRequest,com.google.longrunning.Operation> |
deleteIdentityMappingStoreCallable()
Deletes the Identity Mapping Store.
|
com.google.api.gax.rpc.OperationCallable<DeleteIdentityMappingStoreRequest,com.google.protobuf.Empty,DeleteIdentityMappingStoreMetadata> |
deleteIdentityMappingStoreOperationCallable()
Deletes the Identity Mapping Store.
|
com.google.api.gax.httpjson.longrunning.OperationsClient |
getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
IdentityMappingStore |
getIdentityMappingStore(GetIdentityMappingStoreRequest request)
Gets the Identity Mapping Store.
|
IdentityMappingStore |
getIdentityMappingStore(IdentityMappingStoreName name)
Gets the Identity Mapping Store.
|
IdentityMappingStore |
getIdentityMappingStore(String name)
Gets the Identity Mapping Store.
|
com.google.api.gax.rpc.UnaryCallable<GetIdentityMappingStoreRequest,IdentityMappingStore> |
getIdentityMappingStoreCallable()
Gets the Identity Mapping Store.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
IdentityMappingStoreServiceSettings |
getSettings() |
IdentityMappingStoreServiceStub |
getStub() |
com.google.api.gax.longrunning.OperationFuture<ImportIdentityMappingsResponse,IdentityMappingEntryOperationMetadata> |
importIdentityMappingsAsync(ImportIdentityMappingsRequest request)
Imports a list of Identity Mapping Entries to an Identity Mapping Store.
|
com.google.api.gax.rpc.UnaryCallable<ImportIdentityMappingsRequest,com.google.longrunning.Operation> |
importIdentityMappingsCallable()
Imports a list of Identity Mapping Entries to an Identity Mapping Store.
|
com.google.api.gax.rpc.OperationCallable<ImportIdentityMappingsRequest,ImportIdentityMappingsResponse,IdentityMappingEntryOperationMetadata> |
importIdentityMappingsOperationCallable()
Imports a list of Identity Mapping Entries to an Identity Mapping Store.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
IdentityMappingStoreServiceClient.ListIdentityMappingsPagedResponse |
listIdentityMappings(ListIdentityMappingsRequest request)
Lists Identity Mappings in an Identity Mapping Store.
|
com.google.api.gax.rpc.UnaryCallable<ListIdentityMappingsRequest,ListIdentityMappingsResponse> |
listIdentityMappingsCallable()
Lists Identity Mappings in an Identity Mapping Store.
|
com.google.api.gax.rpc.UnaryCallable<ListIdentityMappingsRequest,IdentityMappingStoreServiceClient.ListIdentityMappingsPagedResponse> |
listIdentityMappingsPagedCallable()
Lists Identity Mappings in an Identity Mapping Store.
|
IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse |
listIdentityMappingStores(ListIdentityMappingStoresRequest request)
Lists all Identity Mapping Stores.
|
IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse |
listIdentityMappingStores(LocationName parent)
Lists all Identity Mapping Stores.
|
IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse |
listIdentityMappingStores(String parent)
Lists all Identity Mapping Stores.
|
com.google.api.gax.rpc.UnaryCallable<ListIdentityMappingStoresRequest,ListIdentityMappingStoresResponse> |
listIdentityMappingStoresCallable()
Lists all Identity Mapping Stores.
|
com.google.api.gax.rpc.UnaryCallable<ListIdentityMappingStoresRequest,IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse> |
listIdentityMappingStoresPagedCallable()
Lists all Identity Mapping Stores.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,IdentityMappingEntryOperationMetadata> |
purgeIdentityMappingsAsync(PurgeIdentityMappingsRequest request)
Purges specified or all Identity Mapping Entries from an Identity Mapping Store.
|
com.google.api.gax.rpc.UnaryCallable<PurgeIdentityMappingsRequest,com.google.longrunning.Operation> |
purgeIdentityMappingsCallable()
Purges specified or all Identity Mapping Entries from an Identity Mapping Store.
|
com.google.api.gax.rpc.OperationCallable<PurgeIdentityMappingsRequest,com.google.protobuf.Empty,IdentityMappingEntryOperationMetadata> |
purgeIdentityMappingsOperationCallable()
Purges specified or all Identity Mapping Entries from an Identity Mapping Store.
|
void |
shutdown() |
void |
shutdownNow() |
protected IdentityMappingStoreServiceClient(IdentityMappingStoreServiceSettings settings) throws IOException
IOExceptionprotected IdentityMappingStoreServiceClient(IdentityMappingStoreServiceStub stub)
public static final IdentityMappingStoreServiceClient create() throws IOException
IOExceptionpublic static final IdentityMappingStoreServiceClient create(IdentityMappingStoreServiceSettings settings) throws IOException
IOExceptionpublic static final IdentityMappingStoreServiceClient create(IdentityMappingStoreServiceStub stub)
public final IdentityMappingStoreServiceSettings getSettings()
public IdentityMappingStoreServiceStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
public final IdentityMappingStore createIdentityMappingStore(LocationName parent, IdentityMappingStore identityMappingStore, String identityMappingStoreId)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build();
String identityMappingStoreId = "identityMappingStoreId677904780";
IdentityMappingStore response =
identityMappingStoreServiceClient.createIdentityMappingStore(
parent, identityMappingStore, identityMappingStoreId);
}
parent - Required. The parent collection resource name, such as
`projects/{project}/locations/{location}`.identityMappingStore - Required. The Identity Mapping Store to create.identityMappingStoreId - Required. The ID of the Identity Mapping Store to create.
The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 63 characters.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final IdentityMappingStore createIdentityMappingStore(String parent, IdentityMappingStore identityMappingStore, String identityMappingStoreId)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build();
String identityMappingStoreId = "identityMappingStoreId677904780";
IdentityMappingStore response =
identityMappingStoreServiceClient.createIdentityMappingStore(
parent, identityMappingStore, identityMappingStoreId);
}
parent - Required. The parent collection resource name, such as
`projects/{project}/locations/{location}`.identityMappingStore - Required. The Identity Mapping Store to create.identityMappingStoreId - Required. The ID of the Identity Mapping Store to create.
The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 63 characters.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final IdentityMappingStore createIdentityMappingStore(CreateIdentityMappingStoreRequest request)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
CreateIdentityMappingStoreRequest request =
CreateIdentityMappingStoreRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setIdentityMappingStoreId("identityMappingStoreId677904780")
.setIdentityMappingStore(IdentityMappingStore.newBuilder().build())
.build();
IdentityMappingStore response =
identityMappingStoreServiceClient.createIdentityMappingStore(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateIdentityMappingStoreRequest,IdentityMappingStore> createIdentityMappingStoreCallable()
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
CreateIdentityMappingStoreRequest request =
CreateIdentityMappingStoreRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setIdentityMappingStoreId("identityMappingStoreId677904780")
.setIdentityMappingStore(IdentityMappingStore.newBuilder().build())
.build();
ApiFuture<IdentityMappingStore> future =
identityMappingStoreServiceClient
.createIdentityMappingStoreCallable()
.futureCall(request);
// Do something.
IdentityMappingStore response = future.get();
}
public final IdentityMappingStore getIdentityMappingStore(IdentityMappingStoreName name)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
IdentityMappingStoreName name =
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]");
IdentityMappingStore response =
identityMappingStoreServiceClient.getIdentityMappingStore(name);
}
name - Required. The name of the Identity Mapping Store to get. Format:
`projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final IdentityMappingStore getIdentityMappingStore(String name)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
String name =
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString();
IdentityMappingStore response =
identityMappingStoreServiceClient.getIdentityMappingStore(name);
}
name - Required. The name of the Identity Mapping Store to get. Format:
`projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final IdentityMappingStore getIdentityMappingStore(GetIdentityMappingStoreRequest request)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
GetIdentityMappingStoreRequest request =
GetIdentityMappingStoreRequest.newBuilder()
.setName(
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString())
.build();
IdentityMappingStore response =
identityMappingStoreServiceClient.getIdentityMappingStore(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetIdentityMappingStoreRequest,IdentityMappingStore> getIdentityMappingStoreCallable()
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
GetIdentityMappingStoreRequest request =
GetIdentityMappingStoreRequest.newBuilder()
.setName(
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString())
.build();
ApiFuture<IdentityMappingStore> future =
identityMappingStoreServiceClient.getIdentityMappingStoreCallable().futureCall(request);
// Do something.
IdentityMappingStore response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIdentityMappingStoreMetadata> deleteIdentityMappingStoreAsync(IdentityMappingStoreName name)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
IdentityMappingStoreName name =
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]");
identityMappingStoreServiceClient.deleteIdentityMappingStoreAsync(name).get();
}
name - Required. The name of the Identity Mapping Store to delete. Format:
`projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIdentityMappingStoreMetadata> deleteIdentityMappingStoreAsync(String name)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
String name =
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString();
identityMappingStoreServiceClient.deleteIdentityMappingStoreAsync(name).get();
}
name - Required. The name of the Identity Mapping Store to delete. Format:
`projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIdentityMappingStoreMetadata> deleteIdentityMappingStoreAsync(DeleteIdentityMappingStoreRequest request)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
DeleteIdentityMappingStoreRequest request =
DeleteIdentityMappingStoreRequest.newBuilder()
.setName(
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString())
.build();
identityMappingStoreServiceClient.deleteIdentityMappingStoreAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteIdentityMappingStoreRequest,com.google.protobuf.Empty,DeleteIdentityMappingStoreMetadata> deleteIdentityMappingStoreOperationCallable()
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
DeleteIdentityMappingStoreRequest request =
DeleteIdentityMappingStoreRequest.newBuilder()
.setName(
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString())
.build();
OperationFuture<Empty, DeleteIdentityMappingStoreMetadata> future =
identityMappingStoreServiceClient
.deleteIdentityMappingStoreOperationCallable()
.futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteIdentityMappingStoreRequest,com.google.longrunning.Operation> deleteIdentityMappingStoreCallable()
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
DeleteIdentityMappingStoreRequest request =
DeleteIdentityMappingStoreRequest.newBuilder()
.setName(
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString())
.build();
ApiFuture<Operation> future =
identityMappingStoreServiceClient
.deleteIdentityMappingStoreCallable()
.futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<ImportIdentityMappingsResponse,IdentityMappingEntryOperationMetadata> importIdentityMappingsAsync(ImportIdentityMappingsRequest request)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
ImportIdentityMappingsRequest request =
ImportIdentityMappingsRequest.newBuilder()
.setIdentityMappingStore(
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString())
.build();
ImportIdentityMappingsResponse response =
identityMappingStoreServiceClient.importIdentityMappingsAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<ImportIdentityMappingsRequest,ImportIdentityMappingsResponse,IdentityMappingEntryOperationMetadata> importIdentityMappingsOperationCallable()
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
ImportIdentityMappingsRequest request =
ImportIdentityMappingsRequest.newBuilder()
.setIdentityMappingStore(
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString())
.build();
OperationFuture<ImportIdentityMappingsResponse, IdentityMappingEntryOperationMetadata>
future =
identityMappingStoreServiceClient
.importIdentityMappingsOperationCallable()
.futureCall(request);
// Do something.
ImportIdentityMappingsResponse response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<ImportIdentityMappingsRequest,com.google.longrunning.Operation> importIdentityMappingsCallable()
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
ImportIdentityMappingsRequest request =
ImportIdentityMappingsRequest.newBuilder()
.setIdentityMappingStore(
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString())
.build();
ApiFuture<Operation> future =
identityMappingStoreServiceClient.importIdentityMappingsCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,IdentityMappingEntryOperationMetadata> purgeIdentityMappingsAsync(PurgeIdentityMappingsRequest request)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
PurgeIdentityMappingsRequest request =
PurgeIdentityMappingsRequest.newBuilder()
.setIdentityMappingStore(
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString())
.setFilter("filter-1274492040")
.setForce(true)
.build();
identityMappingStoreServiceClient.purgeIdentityMappingsAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<PurgeIdentityMappingsRequest,com.google.protobuf.Empty,IdentityMappingEntryOperationMetadata> purgeIdentityMappingsOperationCallable()
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
PurgeIdentityMappingsRequest request =
PurgeIdentityMappingsRequest.newBuilder()
.setIdentityMappingStore(
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString())
.setFilter("filter-1274492040")
.setForce(true)
.build();
OperationFuture<Empty, IdentityMappingEntryOperationMetadata> future =
identityMappingStoreServiceClient
.purgeIdentityMappingsOperationCallable()
.futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<PurgeIdentityMappingsRequest,com.google.longrunning.Operation> purgeIdentityMappingsCallable()
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
PurgeIdentityMappingsRequest request =
PurgeIdentityMappingsRequest.newBuilder()
.setIdentityMappingStore(
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString())
.setFilter("filter-1274492040")
.setForce(true)
.build();
ApiFuture<Operation> future =
identityMappingStoreServiceClient.purgeIdentityMappingsCallable().futureCall(request);
// Do something.
future.get();
}
public final IdentityMappingStoreServiceClient.ListIdentityMappingsPagedResponse listIdentityMappings(ListIdentityMappingsRequest request)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
ListIdentityMappingsRequest request =
ListIdentityMappingsRequest.newBuilder()
.setIdentityMappingStore(
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (IdentityMappingEntry element :
identityMappingStoreServiceClient.listIdentityMappings(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListIdentityMappingsRequest,IdentityMappingStoreServiceClient.ListIdentityMappingsPagedResponse> listIdentityMappingsPagedCallable()
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
ListIdentityMappingsRequest request =
ListIdentityMappingsRequest.newBuilder()
.setIdentityMappingStore(
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<IdentityMappingEntry> future =
identityMappingStoreServiceClient.listIdentityMappingsPagedCallable().futureCall(request);
// Do something.
for (IdentityMappingEntry element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListIdentityMappingsRequest,ListIdentityMappingsResponse> listIdentityMappingsCallable()
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
ListIdentityMappingsRequest request =
ListIdentityMappingsRequest.newBuilder()
.setIdentityMappingStore(
IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListIdentityMappingsResponse response =
identityMappingStoreServiceClient.listIdentityMappingsCallable().call(request);
for (IdentityMappingEntry element : response.getIdentityMappingEntriesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse listIdentityMappingStores(LocationName parent)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (IdentityMappingStore element :
identityMappingStoreServiceClient.listIdentityMappingStores(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent of the Identity Mapping Stores to list. Format:
`projects/{project}/locations/{location}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse listIdentityMappingStores(String parent)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (IdentityMappingStore element :
identityMappingStoreServiceClient.listIdentityMappingStores(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent of the Identity Mapping Stores to list. Format:
`projects/{project}/locations/{location}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse listIdentityMappingStores(ListIdentityMappingStoresRequest request)
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
ListIdentityMappingStoresRequest request =
ListIdentityMappingStoresRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (IdentityMappingStore element :
identityMappingStoreServiceClient.listIdentityMappingStores(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListIdentityMappingStoresRequest,IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse> listIdentityMappingStoresPagedCallable()
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
ListIdentityMappingStoresRequest request =
ListIdentityMappingStoresRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<IdentityMappingStore> future =
identityMappingStoreServiceClient
.listIdentityMappingStoresPagedCallable()
.futureCall(request);
// Do something.
for (IdentityMappingStore element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListIdentityMappingStoresRequest,ListIdentityMappingStoresResponse> listIdentityMappingStoresCallable()
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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
IdentityMappingStoreServiceClient.create()) {
ListIdentityMappingStoresRequest request =
ListIdentityMappingStoresRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListIdentityMappingStoresResponse response =
identityMappingStoreServiceClient.listIdentityMappingStoresCallable().call(request);
for (IdentityMappingStore element : response.getIdentityMappingStoresList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2026 Google LLC. All rights reserved.