# Class HsmManagementClient (2.96.0)

2.96.0 (latest) 2.94.0 2.91.0 2.90.0 2.88.0 2.86.0 2.85.0 2.84.0 2.83.0 2.81.0 2.79.0 2.78.0 2.77.0 2.76.0 2.75.0 2.73.0 2.71.0 2.70.0 2.67.0 2.66.0 2.65.0 2.63.0 2.62.0 2.61.0 2.60.0 2.59.0 2.58.0 2.57.0 2.56.0 2.55.0 2.54.0 2.52.0 2.51.0 2.50.0 2.49.0 2.48.0 2.47.0 2.46.0 2.45.0 2.44.0 2.43.0 2.42.0 2.40.0 2.39.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.27.0 2.26.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.8 2.5.3 2.4.4 2.3.1

|---|---|
| [GitHub Repository](https://github.com/googleapis/google-cloud-java/tree/main/java-kms/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/HsmManagementClient.java) | [Product Reference](https://cloud.google.com/kms) |

Service Description: Google Cloud HSM Management Service

Provides interfaces for managing HSM instances.

Implements a REST model with the following objects:

- SingleTenantHsmInstance
- SingleTenantHsmInstanceProposal

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       SingleTenantHsmInstanceName name =
           SingleTenantHsmInstanceName.of("[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]");
       SingleTenantHsmInstance response = hsmManagementClient.getSingleTenantHsmInstance(name);
     }
     
Note: close() needs to be called on the HsmManagementClient 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 |
|---|---|---|
| ListSingleTenantHsmInstances | Lists SingleTenantHsmInstances. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listSingleTenantHsmInstances(ListSingleTenantHsmInstancesRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listSingleTenantHsmInstances(LocationName parent) - listSingleTenantHsmInstances(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listSingleTenantHsmInstancesPagedCallable() - listSingleTenantHsmInstancesCallable() |
| GetSingleTenantHsmInstance | Returns metadata for a given SingleTenantHsmInstance. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getSingleTenantHsmInstance(GetSingleTenantHsmInstanceRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getSingleTenantHsmInstance(SingleTenantHsmInstanceName name) - getSingleTenantHsmInstance(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getSingleTenantHsmInstanceCallable() |
| CreateSingleTenantHsmInstance | Creates a new SingleTenantHsmInstance in a given Project and Location. User must create a RegisterTwoFactorAuthKeys proposal with this single-tenant HSM instance to finish setup of the instance. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createSingleTenantHsmInstanceAsync(CreateSingleTenantHsmInstanceRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - createSingleTenantHsmInstanceAsync(LocationName parent, SingleTenantHsmInstance singleTenantHsmInstance, String singleTenantHsmInstanceId) - createSingleTenantHsmInstanceAsync(String parent, SingleTenantHsmInstance singleTenantHsmInstance, String singleTenantHsmInstanceId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createSingleTenantHsmInstanceOperationCallable() - createSingleTenantHsmInstanceCallable() |
| CreateSingleTenantHsmInstanceProposal | Creates a new SingleTenantHsmInstanceProposal for a given SingleTenantHsmInstance. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createSingleTenantHsmInstanceProposalAsync(CreateSingleTenantHsmInstanceProposalRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - createSingleTenantHsmInstanceProposalAsync(SingleTenantHsmInstanceName parent, SingleTenantHsmInstanceProposal singleTenantHsmInstanceProposal, String singleTenantHsmInstanceProposalId) - createSingleTenantHsmInstanceProposalAsync(String parent, SingleTenantHsmInstanceProposal singleTenantHsmInstanceProposal, String singleTenantHsmInstanceProposalId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createSingleTenantHsmInstanceProposalOperationCallable() - createSingleTenantHsmInstanceProposalCallable() |
| ApproveSingleTenantHsmInstanceProposal | Approves a SingleTenantHsmInstanceProposal for a given SingleTenantHsmInstance. The proposal must be in the PENDING state. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - approveSingleTenantHsmInstanceProposal(ApproveSingleTenantHsmInstanceProposalRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - approveSingleTenantHsmInstanceProposal(SingleTenantHsmInstanceProposalName name, ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply quorumReply) - approveSingleTenantHsmInstanceProposal(String name, ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply quorumReply) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - approveSingleTenantHsmInstanceProposalCallable() |
| ExecuteSingleTenantHsmInstanceProposal | Executes a SingleTenantHsmInstanceProposal for a given SingleTenantHsmInstance. The proposal must be in the APPROVED state. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - executeSingleTenantHsmInstanceProposalAsync(ExecuteSingleTenantHsmInstanceProposalRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - executeSingleTenantHsmInstanceProposalAsync(SingleTenantHsmInstanceProposalName name) - executeSingleTenantHsmInstanceProposalAsync(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - executeSingleTenantHsmInstanceProposalOperationCallable() - executeSingleTenantHsmInstanceProposalCallable() |
| GetSingleTenantHsmInstanceProposal | Returns metadata for a given SingleTenantHsmInstanceProposal. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getSingleTenantHsmInstanceProposal(GetSingleTenantHsmInstanceProposalRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getSingleTenantHsmInstanceProposal(SingleTenantHsmInstanceProposalName name) - getSingleTenantHsmInstanceProposal(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getSingleTenantHsmInstanceProposalCallable() |
| ListSingleTenantHsmInstanceProposals | Lists SingleTenantHsmInstanceProposals. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listSingleTenantHsmInstanceProposals(ListSingleTenantHsmInstanceProposalsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listSingleTenantHsmInstanceProposals(SingleTenantHsmInstanceName parent) - listSingleTenantHsmInstanceProposals(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listSingleTenantHsmInstanceProposalsPagedCallable() - listSingleTenantHsmInstanceProposalsCallable() |
| DeleteSingleTenantHsmInstanceProposal | Deletes a SingleTenantHsmInstanceProposal. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteSingleTenantHsmInstanceProposal(DeleteSingleTenantHsmInstanceProposalRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - deleteSingleTenantHsmInstanceProposal(SingleTenantHsmInstanceProposalName name) - deleteSingleTenantHsmInstanceProposal(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - deleteSingleTenantHsmInstanceProposalCallable() |
| ListLocations | Lists information about the supported locations for this service. This method lists locations based on the resource scope provided inthe \[ListLocationsRequest.name\] field: \* \*\*Global locations\*\*: If `name` is empty, the method lists thepublic locations available to all projects. \* \*\*Project-specificlocations\*\*: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listLocations(ListLocationsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listLocationsPagedCallable() - listLocationsCallable() |
| GetLocation | Gets information about a location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getLocation(GetLocationRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getLocationCallable() |
| SetIamPolicy | Sets the access control policy on the specified resource. Replacesany existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - setIamPolicy(SetIamPolicyRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - setIamPolicyCallable() |
| GetIamPolicy | Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getIamPolicy(GetIamPolicyRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getIamPolicyCallable() |
| TestIamPermissions | Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - testIamPermissions(TestIamPermissionsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - testIamPermissionsCallable() |
[Methods]

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 HsmManagementSettings 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
     HsmManagementSettings hsmManagementSettings =
         HsmManagementSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     HsmManagementClient hsmManagementClient = HsmManagementClient.create(hsmManagementSettings);
     
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
     HsmManagementSettings hsmManagementSettings =
         HsmManagementSettings.newBuilder().setEndpoint(myEndpoint).build();
     HsmManagementClient hsmManagementClient = HsmManagementClient.create(hsmManagementSettings);
     
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
     HsmManagementSettings hsmManagementSettings =
         HsmManagementSettings.newHttpJsonBuilder().build();
     HsmManagementClient hsmManagementClient = HsmManagementClient.create(hsmManagementSettings);
     
Please refer to the GitHub repository's samples for more quickstart code snippets.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> HsmManagementClient

## Static Methods

### create()

    public static final HsmManagementClient create()

Constructs an instance of HsmManagementClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(HsmManagementSettings settings)

    public static final HsmManagementClient create(HsmManagementSettings settings)

Constructs an instance of HsmManagementClient, using the given settings. The channels are
created based on the settings passed in, or defaults for any settings that are not set.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(HsmManagementStub stub)

    public static final HsmManagementClient create(HsmManagementStub stub)

Constructs an instance of HsmManagementClient, using the given stub for making calls. This is
for advanced usage - prefer using create(HsmManagementSettings).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.stub.HsmManagementStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementClient` |   |

## Constructors

### HsmManagementClient(HsmManagementSettings settings)

    protected HsmManagementClient(HsmManagementSettings settings)

Constructs an instance of HsmManagementClient, 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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementSettings` |

### HsmManagementClient(HsmManagementStub stub)

    protected HsmManagementClient(HsmManagementStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.stub.HsmManagementStub` |

## Methods

### approveSingleTenantHsmInstanceProposal(ApproveSingleTenantHsmInstanceProposalRequest request)

    public final ApproveSingleTenantHsmInstanceProposalResponse approveSingleTenantHsmInstanceProposal(ApproveSingleTenantHsmInstanceProposalRequest request)

Approves a
SingleTenantHsmInstanceProposal for a
given SingleTenantHsmInstance. The proposal must
be in the PENDING state.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       ApproveSingleTenantHsmInstanceProposalRequest request =
           ApproveSingleTenantHsmInstanceProposalRequest.newBuilder()
               .setName(
                   SingleTenantHsmInstanceProposalName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]")
                       .toString())
               .build();
       ApproveSingleTenantHsmInstanceProposalResponse response =
           hsmManagementClient.approveSingleTenantHsmInstanceProposal(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalResponse` |   |

### approveSingleTenantHsmInstanceProposal(SingleTenantHsmInstanceProposalName name, ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply quorumReply)

    public final ApproveSingleTenantHsmInstanceProposalResponse approveSingleTenantHsmInstanceProposal(SingleTenantHsmInstanceProposalName name, ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply quorumReply)

Approves a
SingleTenantHsmInstanceProposal for a
given SingleTenantHsmInstance. The proposal must
be in the PENDING state.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       SingleTenantHsmInstanceProposalName name =
           SingleTenantHsmInstanceProposalName.of(
               "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]");
       ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply quorumReply =
           ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply.newBuilder().build();
       ApproveSingleTenantHsmInstanceProposalResponse response =
           hsmManagementClient.approveSingleTenantHsmInstanceProposal(name, quorumReply);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceProposalName` Required. The name of the SingleTenantHsmInstanceProposal to approve. |
| `quorumReply` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply` Required. The reply to QuorumParameters for approving the proposal. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalResponse` |   |

### approveSingleTenantHsmInstanceProposal(String name, ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply quorumReply)

    public final ApproveSingleTenantHsmInstanceProposalResponse approveSingleTenantHsmInstanceProposal(String name, ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply quorumReply)

Approves a
SingleTenantHsmInstanceProposal for a
given SingleTenantHsmInstance. The proposal must
be in the PENDING state.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       String name =
           SingleTenantHsmInstanceProposalName.of(
                   "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]")
               .toString();
       ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply quorumReply =
           ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply.newBuilder().build();
       ApproveSingleTenantHsmInstanceProposalResponse response =
           hsmManagementClient.approveSingleTenantHsmInstanceProposal(name, quorumReply);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the SingleTenantHsmInstanceProposal to approve. |
| `quorumReply` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply` Required. The reply to QuorumParameters for approving the proposal. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalResponse` |   |

### approveSingleTenantHsmInstanceProposalCallable()

    public final UnaryCallable<ApproveSingleTenantHsmInstanceProposalRequest,ApproveSingleTenantHsmInstanceProposalResponse> approveSingleTenantHsmInstanceProposalCallable()

Approves a
SingleTenantHsmInstanceProposal for a
given SingleTenantHsmInstance. The proposal must
be in the PENDING state.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       ApproveSingleTenantHsmInstanceProposalRequest request =
           ApproveSingleTenantHsmInstanceProposalRequest.newBuilder()
               .setName(
                   SingleTenantHsmInstanceProposalName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]")
                       .toString())
               .build();
       ApiFuture<ApproveSingleTenantHsmInstanceProposalResponse> future =
           hsmManagementClient.approveSingleTenantHsmInstanceProposalCallable().futureCall(request);
       // Do something.
       ApproveSingleTenantHsmInstanceProposalResponse response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalResponse>` |   |

### awaitTermination(long duration, TimeUnit unit)

    public boolean awaitTermination(long duration, TimeUnit unit)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `duration` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `unit` | `https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html` |   |

### close()

    public final void close()

### createSingleTenantHsmInstanceAsync(CreateSingleTenantHsmInstanceRequest request)

    public final OperationFuture<SingleTenantHsmInstance,CreateSingleTenantHsmInstanceMetadata> createSingleTenantHsmInstanceAsync(CreateSingleTenantHsmInstanceRequest request)

Creates a new SingleTenantHsmInstance in a given
Project and Location. User must create a RegisterTwoFactorAuthKeys proposal with this
single-tenant HSM instance to finish setup of the instance.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       CreateSingleTenantHsmInstanceRequest request =
           CreateSingleTenantHsmInstanceRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setSingleTenantHsmInstanceId("singleTenantHsmInstanceId770829568")
               .setSingleTenantHsmInstance(SingleTenantHsmInstance.newBuilder().build())
               .build();
       SingleTenantHsmInstance response =
           hsmManagementClient.createSingleTenantHsmInstanceAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.CreateSingleTenantHsmInstanceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstance,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.CreateSingleTenantHsmInstanceMetadata>` |   |

### createSingleTenantHsmInstanceAsync(LocationName parent, SingleTenantHsmInstance singleTenantHsmInstance, String singleTenantHsmInstanceId)

    public final OperationFuture<SingleTenantHsmInstance,CreateSingleTenantHsmInstanceMetadata> createSingleTenantHsmInstanceAsync(LocationName parent, SingleTenantHsmInstance singleTenantHsmInstance, String singleTenantHsmInstanceId)

Creates a new SingleTenantHsmInstance in a given
Project and Location. User must create a RegisterTwoFactorAuthKeys proposal with this
single-tenant HSM instance to finish setup of the instance.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       SingleTenantHsmInstance singleTenantHsmInstance =
           SingleTenantHsmInstance.newBuilder().build();
       String singleTenantHsmInstanceId = "singleTenantHsmInstanceId770829568";
       SingleTenantHsmInstance response =
           hsmManagementClient
               .createSingleTenantHsmInstanceAsync(
                   parent, singleTenantHsmInstance, singleTenantHsmInstanceId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.LocationName` Required. The resource name of the location associated with the SingleTenantHsmInstance, in the format `projects/*/locations/*`. |
| `singleTenantHsmInstance` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstance` Required. An SingleTenantHsmInstance with initial field values. |
| `singleTenantHsmInstanceId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Optional. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstance,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.CreateSingleTenantHsmInstanceMetadata>` |   |

### createSingleTenantHsmInstanceAsync(String parent, SingleTenantHsmInstance singleTenantHsmInstance, String singleTenantHsmInstanceId)

    public final OperationFuture<SingleTenantHsmInstance,CreateSingleTenantHsmInstanceMetadata> createSingleTenantHsmInstanceAsync(String parent, SingleTenantHsmInstance singleTenantHsmInstance, String singleTenantHsmInstanceId)

Creates a new SingleTenantHsmInstance in a given
Project and Location. User must create a RegisterTwoFactorAuthKeys proposal with this
single-tenant HSM instance to finish setup of the instance.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       SingleTenantHsmInstance singleTenantHsmInstance =
           SingleTenantHsmInstance.newBuilder().build();
       String singleTenantHsmInstanceId = "singleTenantHsmInstanceId770829568";
       SingleTenantHsmInstance response =
           hsmManagementClient
               .createSingleTenantHsmInstanceAsync(
                   parent, singleTenantHsmInstance, singleTenantHsmInstanceId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the location associated with the SingleTenantHsmInstance, in the format `projects/*/locations/*`. |
| `singleTenantHsmInstance` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstance` Required. An SingleTenantHsmInstance with initial field values. |
| `singleTenantHsmInstanceId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Optional. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstance,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.CreateSingleTenantHsmInstanceMetadata>` |   |

### createSingleTenantHsmInstanceCallable()

    public final UnaryCallable<CreateSingleTenantHsmInstanceRequest,Operation> createSingleTenantHsmInstanceCallable()

Creates a new SingleTenantHsmInstance in a given
Project and Location. User must create a RegisterTwoFactorAuthKeys proposal with this
single-tenant HSM instance to finish setup of the instance.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       CreateSingleTenantHsmInstanceRequest request =
           CreateSingleTenantHsmInstanceRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setSingleTenantHsmInstanceId("singleTenantHsmInstanceId770829568")
               .setSingleTenantHsmInstance(SingleTenantHsmInstance.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           hsmManagementClient.createSingleTenantHsmInstanceCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.CreateSingleTenantHsmInstanceRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### createSingleTenantHsmInstanceOperationCallable()

    public final OperationCallable<CreateSingleTenantHsmInstanceRequest,SingleTenantHsmInstance,CreateSingleTenantHsmInstanceMetadata> createSingleTenantHsmInstanceOperationCallable()

Creates a new SingleTenantHsmInstance in a given
Project and Location. User must create a RegisterTwoFactorAuthKeys proposal with this
single-tenant HSM instance to finish setup of the instance.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       CreateSingleTenantHsmInstanceRequest request =
           CreateSingleTenantHsmInstanceRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setSingleTenantHsmInstanceId("singleTenantHsmInstanceId770829568")
               .setSingleTenantHsmInstance(SingleTenantHsmInstance.newBuilder().build())
               .build();
       OperationFuture<SingleTenantHsmInstance, CreateSingleTenantHsmInstanceMetadata> future =
           hsmManagementClient.createSingleTenantHsmInstanceOperationCallable().futureCall(request);
       // Do something.
       SingleTenantHsmInstance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.CreateSingleTenantHsmInstanceRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstance,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.CreateSingleTenantHsmInstanceMetadata>` |   |

### createSingleTenantHsmInstanceProposalAsync(CreateSingleTenantHsmInstanceProposalRequest request)

    public final OperationFuture<SingleTenantHsmInstanceProposal,CreateSingleTenantHsmInstanceProposalMetadata> createSingleTenantHsmInstanceProposalAsync(CreateSingleTenantHsmInstanceProposalRequest request)

Creates a new
SingleTenantHsmInstanceProposal for a
given SingleTenantHsmInstance.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       CreateSingleTenantHsmInstanceProposalRequest request =
           CreateSingleTenantHsmInstanceProposalRequest.newBuilder()
               .setParent(
                   SingleTenantHsmInstanceName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]")
                       .toString())
               .setSingleTenantHsmInstanceProposalId("singleTenantHsmInstanceProposalId-994202990")
               .setSingleTenantHsmInstanceProposal(
                   SingleTenantHsmInstanceProposal.newBuilder().build())
               .build();
       SingleTenantHsmInstanceProposal response =
           hsmManagementClient.createSingleTenantHsmInstanceProposalAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceProposal,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalMetadata>` |   |

### createSingleTenantHsmInstanceProposalAsync(SingleTenantHsmInstanceName parent, SingleTenantHsmInstanceProposal singleTenantHsmInstanceProposal, String singleTenantHsmInstanceProposalId)

    public final OperationFuture<SingleTenantHsmInstanceProposal,CreateSingleTenantHsmInstanceProposalMetadata> createSingleTenantHsmInstanceProposalAsync(SingleTenantHsmInstanceName parent, SingleTenantHsmInstanceProposal singleTenantHsmInstanceProposal, String singleTenantHsmInstanceProposalId)

Creates a new
SingleTenantHsmInstanceProposal for a
given SingleTenantHsmInstance.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       SingleTenantHsmInstanceName parent =
           SingleTenantHsmInstanceName.of("[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]");
       SingleTenantHsmInstanceProposal singleTenantHsmInstanceProposal =
           SingleTenantHsmInstanceProposal.newBuilder().build();
       String singleTenantHsmInstanceProposalId = "singleTenantHsmInstanceProposalId-994202990";
       SingleTenantHsmInstanceProposal response =
           hsmManagementClient
               .createSingleTenantHsmInstanceProposalAsync(
                   parent, singleTenantHsmInstanceProposal, singleTenantHsmInstanceProposalId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceName` Required. The name of the SingleTenantHsmInstance associated with the SingleTenantHsmInstanceProposals. |
| `singleTenantHsmInstanceProposal` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceProposal` Required. The SingleTenantHsmInstanceProposal to create. |
| `singleTenantHsmInstanceProposalId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Optional. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceProposal,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalMetadata>` |   |

### createSingleTenantHsmInstanceProposalAsync(String parent, SingleTenantHsmInstanceProposal singleTenantHsmInstanceProposal, String singleTenantHsmInstanceProposalId)

    public final OperationFuture<SingleTenantHsmInstanceProposal,CreateSingleTenantHsmInstanceProposalMetadata> createSingleTenantHsmInstanceProposalAsync(String parent, SingleTenantHsmInstanceProposal singleTenantHsmInstanceProposal, String singleTenantHsmInstanceProposalId)

Creates a new
SingleTenantHsmInstanceProposal for a
given SingleTenantHsmInstance.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       String parent =
           SingleTenantHsmInstanceName.of("[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]")
               .toString();
       SingleTenantHsmInstanceProposal singleTenantHsmInstanceProposal =
           SingleTenantHsmInstanceProposal.newBuilder().build();
       String singleTenantHsmInstanceProposalId = "singleTenantHsmInstanceProposalId-994202990";
       SingleTenantHsmInstanceProposal response =
           hsmManagementClient
               .createSingleTenantHsmInstanceProposalAsync(
                   parent, singleTenantHsmInstanceProposal, singleTenantHsmInstanceProposalId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the SingleTenantHsmInstance associated with the SingleTenantHsmInstanceProposals. |
| `singleTenantHsmInstanceProposal` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceProposal` Required. The SingleTenantHsmInstanceProposal to create. |
| `singleTenantHsmInstanceProposalId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Optional. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceProposal,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalMetadata>` |   |

### createSingleTenantHsmInstanceProposalCallable()

    public final UnaryCallable<CreateSingleTenantHsmInstanceProposalRequest,Operation> createSingleTenantHsmInstanceProposalCallable()

Creates a new
SingleTenantHsmInstanceProposal for a
given SingleTenantHsmInstance.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       CreateSingleTenantHsmInstanceProposalRequest request =
           CreateSingleTenantHsmInstanceProposalRequest.newBuilder()
               .setParent(
                   SingleTenantHsmInstanceName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]")
                       .toString())
               .setSingleTenantHsmInstanceProposalId("singleTenantHsmInstanceProposalId-994202990")
               .setSingleTenantHsmInstanceProposal(
                   SingleTenantHsmInstanceProposal.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           hsmManagementClient.createSingleTenantHsmInstanceProposalCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### createSingleTenantHsmInstanceProposalOperationCallable()

    public final OperationCallable<CreateSingleTenantHsmInstanceProposalRequest,SingleTenantHsmInstanceProposal,CreateSingleTenantHsmInstanceProposalMetadata> createSingleTenantHsmInstanceProposalOperationCallable()

Creates a new
SingleTenantHsmInstanceProposal for a
given SingleTenantHsmInstance.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       CreateSingleTenantHsmInstanceProposalRequest request =
           CreateSingleTenantHsmInstanceProposalRequest.newBuilder()
               .setParent(
                   SingleTenantHsmInstanceName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]")
                       .toString())
               .setSingleTenantHsmInstanceProposalId("singleTenantHsmInstanceProposalId-994202990")
               .setSingleTenantHsmInstanceProposal(
                   SingleTenantHsmInstanceProposal.newBuilder().build())
               .build();
       OperationFuture< singletenanthsminstanceproposal,="" createsingletenanthsminstanceproposalmetadata="">
           future =
               hsmManagementClient
                   .createSingleTenantHsmInstanceProposalOperationCallable()
                   .futureCall(request);
       // Do something.
       SingleTenantHsmInstanceProposal response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceProposal,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalMetadata>` |   |

### deleteSingleTenantHsmInstanceProposal(DeleteSingleTenantHsmInstanceProposalRequest request)

    public final void deleteSingleTenantHsmInstanceProposal(DeleteSingleTenantHsmInstanceProposalRequest request)

Deletes a
SingleTenantHsmInstanceProposal.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       DeleteSingleTenantHsmInstanceProposalRequest request =
           DeleteSingleTenantHsmInstanceProposalRequest.newBuilder()
               .setName(
                   SingleTenantHsmInstanceProposalName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]")
                       .toString())
               .build();
       hsmManagementClient.deleteSingleTenantHsmInstanceProposal(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.DeleteSingleTenantHsmInstanceProposalRequest` The request object containing all of the parameters for the API call. |

### deleteSingleTenantHsmInstanceProposal(SingleTenantHsmInstanceProposalName name)

    public final void deleteSingleTenantHsmInstanceProposal(SingleTenantHsmInstanceProposalName name)

Deletes a
SingleTenantHsmInstanceProposal.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       SingleTenantHsmInstanceProposalName name =
           SingleTenantHsmInstanceProposalName.of(
               "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]");
       hsmManagementClient.deleteSingleTenantHsmInstanceProposal(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceProposalName` Required. The name of the SingleTenantHsmInstanceProposal to delete. |

### deleteSingleTenantHsmInstanceProposal(String name)

    public final void deleteSingleTenantHsmInstanceProposal(String name)

Deletes a
SingleTenantHsmInstanceProposal.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       String name =
           SingleTenantHsmInstanceProposalName.of(
                   "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]")
               .toString();
       hsmManagementClient.deleteSingleTenantHsmInstanceProposal(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the SingleTenantHsmInstanceProposal to delete. |

### deleteSingleTenantHsmInstanceProposalCallable()

    public final UnaryCallable<DeleteSingleTenantHsmInstanceProposalRequest,Empty> deleteSingleTenantHsmInstanceProposalCallable()

Deletes a
SingleTenantHsmInstanceProposal.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       DeleteSingleTenantHsmInstanceProposalRequest request =
           DeleteSingleTenantHsmInstanceProposalRequest.newBuilder()
               .setName(
                   SingleTenantHsmInstanceProposalName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]")
                       .toString())
               .build();
       ApiFuture<Empty> future =
           hsmManagementClient.deleteSingleTenantHsmInstanceProposalCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.DeleteSingleTenantHsmInstanceProposalRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### executeSingleTenantHsmInstanceProposalAsync(ExecuteSingleTenantHsmInstanceProposalRequest request)

    public final OperationFuture<ExecuteSingleTenantHsmInstanceProposalResponse,ExecuteSingleTenantHsmInstanceProposalMetadata> executeSingleTenantHsmInstanceProposalAsync(ExecuteSingleTenantHsmInstanceProposalRequest request)

Executes a
SingleTenantHsmInstanceProposal for a
given SingleTenantHsmInstance. The proposal must
be in the APPROVED state.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       ExecuteSingleTenantHsmInstanceProposalRequest request =
           ExecuteSingleTenantHsmInstanceProposalRequest.newBuilder()
               .setName(
                   SingleTenantHsmInstanceProposalName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]")
                       .toString())
               .build();
       ExecuteSingleTenantHsmInstanceProposalResponse response =
           hsmManagementClient.executeSingleTenantHsmInstanceProposalAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalResponse,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalMetadata>` |   |

### executeSingleTenantHsmInstanceProposalAsync(SingleTenantHsmInstanceProposalName name)

    public final OperationFuture<ExecuteSingleTenantHsmInstanceProposalResponse,ExecuteSingleTenantHsmInstanceProposalMetadata> executeSingleTenantHsmInstanceProposalAsync(SingleTenantHsmInstanceProposalName name)

Executes a
SingleTenantHsmInstanceProposal for a
given SingleTenantHsmInstance. The proposal must
be in the APPROVED state.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       SingleTenantHsmInstanceProposalName name =
           SingleTenantHsmInstanceProposalName.of(
               "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]");
       ExecuteSingleTenantHsmInstanceProposalResponse response =
           hsmManagementClient.executeSingleTenantHsmInstanceProposalAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceProposalName` Required. The name of the SingleTenantHsmInstanceProposal to execute. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalResponse,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalMetadata>` |   |

### executeSingleTenantHsmInstanceProposalAsync(String name)

    public final OperationFuture<ExecuteSingleTenantHsmInstanceProposalResponse,ExecuteSingleTenantHsmInstanceProposalMetadata> executeSingleTenantHsmInstanceProposalAsync(String name)

Executes a
SingleTenantHsmInstanceProposal for a
given SingleTenantHsmInstance. The proposal must
be in the APPROVED state.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       String name =
           SingleTenantHsmInstanceProposalName.of(
                   "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]")
               .toString();
       ExecuteSingleTenantHsmInstanceProposalResponse response =
           hsmManagementClient.executeSingleTenantHsmInstanceProposalAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the SingleTenantHsmInstanceProposal to execute. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalResponse,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalMetadata>` |   |

### executeSingleTenantHsmInstanceProposalCallable()

    public final UnaryCallable<ExecuteSingleTenantHsmInstanceProposalRequest,Operation> executeSingleTenantHsmInstanceProposalCallable()

Executes a
SingleTenantHsmInstanceProposal for a
given SingleTenantHsmInstance. The proposal must
be in the APPROVED state.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       ExecuteSingleTenantHsmInstanceProposalRequest request =
           ExecuteSingleTenantHsmInstanceProposalRequest.newBuilder()
               .setName(
                   SingleTenantHsmInstanceProposalName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]")
                       .toString())
               .build();
       ApiFuture<Operation> future =
           hsmManagementClient.executeSingleTenantHsmInstanceProposalCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### executeSingleTenantHsmInstanceProposalOperationCallable()

    public final OperationCallable<ExecuteSingleTenantHsmInstanceProposalRequest,ExecuteSingleTenantHsmInstanceProposalResponse,ExecuteSingleTenantHsmInstanceProposalMetadata> executeSingleTenantHsmInstanceProposalOperationCallable()

Executes a
SingleTenantHsmInstanceProposal for a
given SingleTenantHsmInstance. The proposal must
be in the APPROVED state.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       ExecuteSingleTenantHsmInstanceProposalRequest request =
           ExecuteSingleTenantHsmInstanceProposalRequest.newBuilder()
               .setName(
                   SingleTenantHsmInstanceProposalName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]")
                       .toString())
               .build();
       OperationFuture< executesingletenanthsminstanceproposalresponse,="" executesingletenanthsminstanceproposalmetadata="">
           future =
               hsmManagementClient
                   .executeSingleTenantHsmInstanceProposalOperationCallable()
                   .futureCall(request);
       // Do something.
       ExecuteSingleTenantHsmInstanceProposalResponse response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalResponse,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalMetadata>` |   |

### getHttpJsonOperationsClient()

    public final OperationsClient getHttpJsonOperationsClient()

> [!WARNING]
> **Beta**
>
> This feature is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1) of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.

Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.httpjson.longrunning.OperationsClient.html` |   |

### getIamPolicy(GetIamPolicyRequest request)

    public final Policy getIamPolicy(GetIamPolicyRequest request)

Gets the access control policy for a resource. Returns an empty policyif the resource exists
and does not have a policy 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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       GetIamPolicyRequest request =
           GetIamPolicyRequest.newBuilder()
               .setResource(
                   CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
                       .toString())
               .setOptions(GetPolicyOptions.newBuilder().build())
               .build();
       Policy response = hsmManagementClient.getIamPolicy(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.iam.v1.GetIamPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.iam.v1.Policy` |   |

### getIamPolicyCallable()

    public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()

Gets the access control policy for a resource. Returns an empty policyif the resource exists
and does not have a policy 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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       GetIamPolicyRequest request =
           GetIamPolicyRequest.newBuilder()
               .setResource(
                   CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
                       .toString())
               .setOptions(GetPolicyOptions.newBuilder().build())
               .build();
       ApiFuture<Policy> future = hsmManagementClient.getIamPolicyCallable().futureCall(request);
       // Do something.
       Policy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>` |   |

### getLocation(GetLocationRequest request)

    public final Location getLocation(GetLocationRequest request)

Gets information about a location.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
       Location response = hsmManagementClient.getLocation(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.cloud.location.GetLocationRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.cloud.location.Location` |   |

### getLocationCallable()

    public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a location.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
       ApiFuture<Location> future = hsmManagementClient.getLocationCallable().futureCall(request);
       // Do something.
       Location response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>` |   |

### getOperationsClient()

    public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.OperationsClient.html` |   |

### getSettings()

    public final HsmManagementSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementSettings` |   |

### getSingleTenantHsmInstance(GetSingleTenantHsmInstanceRequest request)

    public final SingleTenantHsmInstance getSingleTenantHsmInstance(GetSingleTenantHsmInstanceRequest request)

Returns metadata for a given
SingleTenantHsmInstance.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       GetSingleTenantHsmInstanceRequest request =
           GetSingleTenantHsmInstanceRequest.newBuilder()
               .setName(
                   SingleTenantHsmInstanceName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]")
                       .toString())
               .build();
       SingleTenantHsmInstance response = hsmManagementClient.getSingleTenantHsmInstance(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.GetSingleTenantHsmInstanceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstance` |   |

### getSingleTenantHsmInstance(SingleTenantHsmInstanceName name)

    public final SingleTenantHsmInstance getSingleTenantHsmInstance(SingleTenantHsmInstanceName name)

Returns metadata for a given
SingleTenantHsmInstance.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       SingleTenantHsmInstanceName name =
           SingleTenantHsmInstanceName.of("[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]");
       SingleTenantHsmInstance response = hsmManagementClient.getSingleTenantHsmInstance(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceName` Required. The name of the SingleTenantHsmInstance to get. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstance` |   |

### getSingleTenantHsmInstance(String name)

    public final SingleTenantHsmInstance getSingleTenantHsmInstance(String name)

Returns metadata for a given
SingleTenantHsmInstance.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       String name =
           SingleTenantHsmInstanceName.of("[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]")
               .toString();
       SingleTenantHsmInstance response = hsmManagementClient.getSingleTenantHsmInstance(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the SingleTenantHsmInstance to get. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstance` |   |

### getSingleTenantHsmInstanceCallable()

    public final UnaryCallable<GetSingleTenantHsmInstanceRequest,SingleTenantHsmInstance> getSingleTenantHsmInstanceCallable()

Returns metadata for a given
SingleTenantHsmInstance.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       GetSingleTenantHsmInstanceRequest request =
           GetSingleTenantHsmInstanceRequest.newBuilder()
               .setName(
                   SingleTenantHsmInstanceName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]")
                       .toString())
               .build();
       ApiFuture<SingleTenantHsmInstance> future =
           hsmManagementClient.getSingleTenantHsmInstanceCallable().futureCall(request);
       // Do something.
       SingleTenantHsmInstance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.GetSingleTenantHsmInstanceRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstance>` |   |

### getSingleTenantHsmInstanceProposal(GetSingleTenantHsmInstanceProposalRequest request)

    public final SingleTenantHsmInstanceProposal getSingleTenantHsmInstanceProposal(GetSingleTenantHsmInstanceProposalRequest request)

Returns metadata for a given
SingleTenantHsmInstanceProposal.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       GetSingleTenantHsmInstanceProposalRequest request =
           GetSingleTenantHsmInstanceProposalRequest.newBuilder()
               .setName(
                   SingleTenantHsmInstanceProposalName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]")
                       .toString())
               .build();
       SingleTenantHsmInstanceProposal response =
           hsmManagementClient.getSingleTenantHsmInstanceProposal(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.GetSingleTenantHsmInstanceProposalRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceProposal` |   |

### getSingleTenantHsmInstanceProposal(SingleTenantHsmInstanceProposalName name)

    public final SingleTenantHsmInstanceProposal getSingleTenantHsmInstanceProposal(SingleTenantHsmInstanceProposalName name)

Returns metadata for a given
SingleTenantHsmInstanceProposal.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       SingleTenantHsmInstanceProposalName name =
           SingleTenantHsmInstanceProposalName.of(
               "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]");
       SingleTenantHsmInstanceProposal response =
           hsmManagementClient.getSingleTenantHsmInstanceProposal(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceProposalName` Required. The name of the SingleTenantHsmInstanceProposal to get. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceProposal` |   |

### getSingleTenantHsmInstanceProposal(String name)

    public final SingleTenantHsmInstanceProposal getSingleTenantHsmInstanceProposal(String name)

Returns metadata for a given
SingleTenantHsmInstanceProposal.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       String name =
           SingleTenantHsmInstanceProposalName.of(
                   "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]")
               .toString();
       SingleTenantHsmInstanceProposal response =
           hsmManagementClient.getSingleTenantHsmInstanceProposal(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the SingleTenantHsmInstanceProposal to get. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceProposal` |   |

### getSingleTenantHsmInstanceProposalCallable()

    public final UnaryCallable<GetSingleTenantHsmInstanceProposalRequest,SingleTenantHsmInstanceProposal> getSingleTenantHsmInstanceProposalCallable()

Returns metadata for a given
SingleTenantHsmInstanceProposal.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       GetSingleTenantHsmInstanceProposalRequest request =
           GetSingleTenantHsmInstanceProposalRequest.newBuilder()
               .setName(
                   SingleTenantHsmInstanceProposalName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]")
                       .toString())
               .build();
       ApiFuture<SingleTenantHsmInstanceProposal> future =
           hsmManagementClient.getSingleTenantHsmInstanceProposalCallable().futureCall(request);
       // Do something.
       SingleTenantHsmInstanceProposal response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.GetSingleTenantHsmInstanceProposalRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceProposal>` |   |

### getStub()

    public HsmManagementStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.stub.HsmManagementStub` |   |

### isShutdown()

    public boolean isShutdown()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### isTerminated()

    public boolean isTerminated()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### listLocations(ListLocationsRequest request)

    public final HsmManagementClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

This method lists locations based on the resource scope provided inthe
\[ListLocationsRequest.name\] field:

\* \*\*Global locations\*\*: If `name` is empty, the method lists thepublic
locations available to all projects. \* \*\*Project-specificlocations\*\*: If
`name` follows the format`projects/{project}`, the method lists locations visible to
thatspecific project. This includes public, private, or otherproject-specific locations enabled
for the project.

For gRPC and client library implementations, the resource name ispassed as the `name` field.
For direct service calls, the resourcename isincorporated into the request path based on the
specific serviceimplementation and version.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (Location element : hsmManagementClient.listLocations(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.cloud.location.ListLocationsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementClient.ListLocationsPagedResponse` |   |

### listLocationsCallable()

    public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

This method lists locations based on the resource scope provided inthe
\[ListLocationsRequest.name\] field:

\* \*\*Global locations\*\*: If `name` is empty, the method lists thepublic
locations available to all projects. \* \*\*Project-specificlocations\*\*: If
`name` follows the format`projects/{project}`, the method lists locations visible to
thatspecific project. This includes public, private, or otherproject-specific locations enabled
for the project.

For gRPC and client library implementations, the resource name ispassed as the `name` field.
For direct service calls, the resourcename isincorporated into the request path based on the
specific serviceimplementation and version.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListLocationsResponse response = hsmManagementClient.listLocationsCallable().call(request);
         for (Location element : response.getLocationsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>` |   |

### listLocationsPagedCallable()

    public final UnaryCallable<ListLocationsRequest,HsmManagementClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

This method lists locations based on the resource scope provided inthe
\[ListLocationsRequest.name\] field:

\* \*\*Global locations\*\*: If `name` is empty, the method lists thepublic
locations available to all projects. \* \*\*Project-specificlocations\*\*: If
`name` follows the format`projects/{project}`, the method lists locations visible to
thatspecific project. This includes public, private, or otherproject-specific locations enabled
for the project.

For gRPC and client library implementations, the resource name ispassed as the `name` field.
For direct service calls, the resourcename isincorporated into the request path based on the
specific serviceimplementation and version.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<Location> future =
           hsmManagementClient.listLocationsPagedCallable().futureCall(request);
       // Do something.
       for (Location element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.ListLocationsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementClient.ListLocationsPagedResponse>` |   |

### listSingleTenantHsmInstanceProposals(ListSingleTenantHsmInstanceProposalsRequest request)

    public final HsmManagementClient.ListSingleTenantHsmInstanceProposalsPagedResponse listSingleTenantHsmInstanceProposals(ListSingleTenantHsmInstanceProposalsRequest request)

Lists SingleTenantHsmInstanceProposals.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       ListSingleTenantHsmInstanceProposalsRequest request =
           ListSingleTenantHsmInstanceProposalsRequest.newBuilder()
               .setParent(
                   SingleTenantHsmInstanceName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]")
                       .toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .setShowDeleted(true)
               .build();
       for (SingleTenantHsmInstanceProposal element :
           hsmManagementClient.listSingleTenantHsmInstanceProposals(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementClient.ListSingleTenantHsmInstanceProposalsPagedResponse` |   |

### listSingleTenantHsmInstanceProposals(SingleTenantHsmInstanceName parent)

    public final HsmManagementClient.ListSingleTenantHsmInstanceProposalsPagedResponse listSingleTenantHsmInstanceProposals(SingleTenantHsmInstanceName parent)

Lists SingleTenantHsmInstanceProposals.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       SingleTenantHsmInstanceName parent =
           SingleTenantHsmInstanceName.of("[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]");
       for (SingleTenantHsmInstanceProposal element :
           hsmManagementClient.listSingleTenantHsmInstanceProposals(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.SingleTenantHsmInstanceName` Required. The resource name of the single tenant HSM instance associated with the SingleTenantHsmInstanceProposals to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementClient.ListSingleTenantHsmInstanceProposalsPagedResponse` |   |

### listSingleTenantHsmInstanceProposals(String parent)

    public final HsmManagementClient.ListSingleTenantHsmInstanceProposalsPagedResponse listSingleTenantHsmInstanceProposals(String parent)

Lists SingleTenantHsmInstanceProposals.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       String parent =
           SingleTenantHsmInstanceName.of("[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]")
               .toString();
       for (SingleTenantHsmInstanceProposal element :
           hsmManagementClient.listSingleTenantHsmInstanceProposals(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the single tenant HSM instance associated with the SingleTenantHsmInstanceProposals to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementClient.ListSingleTenantHsmInstanceProposalsPagedResponse` |   |

### listSingleTenantHsmInstanceProposalsCallable()

    public final UnaryCallable<ListSingleTenantHsmInstanceProposalsRequest,ListSingleTenantHsmInstanceProposalsResponse> listSingleTenantHsmInstanceProposalsCallable()

Lists SingleTenantHsmInstanceProposals.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       ListSingleTenantHsmInstanceProposalsRequest request =
           ListSingleTenantHsmInstanceProposalsRequest.newBuilder()
               .setParent(
                   SingleTenantHsmInstanceName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]")
                       .toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .setShowDeleted(true)
               .build();
       while (true) {
         ListSingleTenantHsmInstanceProposalsResponse response =
             hsmManagementClient.listSingleTenantHsmInstanceProposalsCallable().call(request);
         for (SingleTenantHsmInstanceProposal element :
             response.getSingleTenantHsmInstanceProposalsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse>` |   |

### listSingleTenantHsmInstanceProposalsPagedCallable()

    public final UnaryCallable<ListSingleTenantHsmInstanceProposalsRequest,HsmManagementClient.ListSingleTenantHsmInstanceProposalsPagedResponse> listSingleTenantHsmInstanceProposalsPagedCallable()

Lists SingleTenantHsmInstanceProposals.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       ListSingleTenantHsmInstanceProposalsRequest request =
           ListSingleTenantHsmInstanceProposalsRequest.newBuilder()
               .setParent(
                   SingleTenantHsmInstanceName.of(
                           "[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]")
                       .toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .setShowDeleted(true)
               .build();
       ApiFuture<SingleTenantHsmInstanceProposal> future =
           hsmManagementClient
               .listSingleTenantHsmInstanceProposalsPagedCallable()
               .futureCall(request);
       // Do something.
       for (SingleTenantHsmInstanceProposal element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementClient.ListSingleTenantHsmInstanceProposalsPagedResponse>` |   |

### listSingleTenantHsmInstances(ListSingleTenantHsmInstancesRequest request)

    public final HsmManagementClient.ListSingleTenantHsmInstancesPagedResponse listSingleTenantHsmInstances(ListSingleTenantHsmInstancesRequest request)

Lists SingleTenantHsmInstances.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       ListSingleTenantHsmInstancesRequest request =
           ListSingleTenantHsmInstancesRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .setShowDeleted(true)
               .build();
       for (SingleTenantHsmInstance element :
           hsmManagementClient.listSingleTenantHsmInstances(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementClient.ListSingleTenantHsmInstancesPagedResponse` |   |

### listSingleTenantHsmInstances(LocationName parent)

    public final HsmManagementClient.ListSingleTenantHsmInstancesPagedResponse listSingleTenantHsmInstances(LocationName parent)

Lists SingleTenantHsmInstances.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       for (SingleTenantHsmInstance element :
           hsmManagementClient.listSingleTenantHsmInstances(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.LocationName` Required. The resource name of the location associated with the SingleTenantHsmInstances to list, in the format `projects/*/locations/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementClient.ListSingleTenantHsmInstancesPagedResponse` |   |

### listSingleTenantHsmInstances(String parent)

    public final HsmManagementClient.ListSingleTenantHsmInstancesPagedResponse listSingleTenantHsmInstances(String parent)

Lists SingleTenantHsmInstances.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       for (SingleTenantHsmInstance element :
           hsmManagementClient.listSingleTenantHsmInstances(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the location associated with the SingleTenantHsmInstances to list, in the format `projects/*/locations/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementClient.ListSingleTenantHsmInstancesPagedResponse` |   |

### listSingleTenantHsmInstancesCallable()

    public final UnaryCallable<ListSingleTenantHsmInstancesRequest,ListSingleTenantHsmInstancesResponse> listSingleTenantHsmInstancesCallable()

Lists SingleTenantHsmInstances.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       ListSingleTenantHsmInstancesRequest request =
           ListSingleTenantHsmInstancesRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .setShowDeleted(true)
               .build();
       while (true) {
         ListSingleTenantHsmInstancesResponse response =
             hsmManagementClient.listSingleTenantHsmInstancesCallable().call(request);
         for (SingleTenantHsmInstance element : response.getSingleTenantHsmInstancesList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse>` |   |

### listSingleTenantHsmInstancesPagedCallable()

    public final UnaryCallable<ListSingleTenantHsmInstancesRequest,HsmManagementClient.ListSingleTenantHsmInstancesPagedResponse> listSingleTenantHsmInstancesPagedCallable()

Lists SingleTenantHsmInstances.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       ListSingleTenantHsmInstancesRequest request =
           ListSingleTenantHsmInstancesRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .setShowDeleted(true)
               .build();
       ApiFuture<SingleTenantHsmInstance> future =
           hsmManagementClient.listSingleTenantHsmInstancesPagedCallable().futureCall(request);
       // Do something.
       for (SingleTenantHsmInstance element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-kms/latest/com.google.cloud.kms.v1.HsmManagementClient.ListSingleTenantHsmInstancesPagedResponse>` |   |

### setIamPolicy(SetIamPolicyRequest request)

    public final Policy setIamPolicy(SetIamPolicyRequest request)

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       SetIamPolicyRequest request =
           SetIamPolicyRequest.newBuilder()
               .setResource(
                   CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
                       .toString())
               .setPolicy(Policy.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       Policy response = hsmManagementClient.setIamPolicy(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.iam.v1.SetIamPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.iam.v1.Policy` |   |

### setIamPolicyCallable()

    public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       SetIamPolicyRequest request =
           SetIamPolicyRequest.newBuilder()
               .setResource(
                   CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
                       .toString())
               .setPolicy(Policy.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       ApiFuture<Policy> future = hsmManagementClient.setIamPolicyCallable().futureCall(request);
       // Do something.
       Policy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()

### testIamPermissions(TestIamPermissionsRequest request)

    public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)

Returns permissions that a caller has on the specified resource. If theresource does not exist,
this will return an empty set ofpermissions, not a `NOT_FOUND` error.

Note: This operation is designed to be used for buildingpermission-aware UIs and
command-line tools, not for authorizationchecking. This operation may "fail open" without
warning.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       TestIamPermissionsRequest request =
           TestIamPermissionsRequest.newBuilder()
               .setResource(
                   CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
                       .toString())
               .addAllPermissions(new ArrayList<String>())
               .build();
       TestIamPermissionsResponse response = hsmManagementClient.testIamPermissions(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.iam.v1.TestIamPermissionsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.iam.v1.TestIamPermissionsResponse` |   |

### testIamPermissionsCallable()

    public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()

Returns permissions that a caller has on the specified resource. If theresource does not exist,
this will return an empty set ofpermissions, not a `NOT_FOUND` error.

Note: This operation is designed to be used for buildingpermission-aware UIs and
command-line tools, not for authorizationchecking. This operation may "fail open" without
warning.

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 (HsmManagementClient hsmManagementClient = HsmManagementClient.create()) {
       TestIamPermissionsRequest request =
           TestIamPermissionsRequest.newBuilder()
               .setResource(
                   CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
                       .toString())
               .addAllPermissions(new ArrayList<String>())
               .build();
       ApiFuture<TestIamPermissionsResponse> future =
           hsmManagementClient.testIamPermissionsCallable().futureCall(request);
       // Do something.
       TestIamPermissionsResponse response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>` |   |