# Class PolicyBindingsClient (1.90.0)

1.90.0 (latest) 1.88.0 1.86.0 1.85.0 1.83.0 1.81.0 1.80.0 1.79.0 1.78.0 1.76.0 1.74.0 1.73.0 1.72.0 1.71.0 1.70.0 1.68.0 1.66.0 1.65.0 1.62.0 1.61.0 1.60.0 1.58.0 1.57.0 1.56.0 1.55.0 1.54.0 1.53.0 1.52.0 1.51.0 1.50.0 1.49.0 1.47.0 1.46.0 1.45.0 1.44.0 1.43.0 1.42.0 1.41.0 1.40.0 1.39.0 1.38.0 1.37.0 1.35.0 1.34.0 1.33.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 1.22.0 1.21.0 1.20.0 1.19.0 1.18.0 1.17.0 1.16.0 1.15.0 1.14.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.0 1.7.0

> [!WARNING]
> **Beta**
>
>
> This library 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](https://docs.cloud.google.com/products#product-launch-stages).

|---|---|
| [GitHub Repository](https://github.com/googleapis/google-cloud-java/tree/main/java-iam-policy/google-iam-policy/src/main/java/com/google/iam/v3beta/PolicyBindingsClient.java) | [Product Reference](https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/n/a) |

Service Description: An interface for managing Identity and Access Management (IAM) policy
bindings.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       PolicyBindingName name =
           PolicyBindingName.ofProjectLocationPolicyBindingName(
               "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]");
       PolicyBinding response = policyBindingsClient.getPolicyBinding(name);
     }
     
Note: close() needs to be called on the PolicyBindingsClient 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 |
|---|---|---|
| CreatePolicyBinding | Creates a policy binding and returns a long-running operation. Callers will need the IAM permissions on both the policy and target. After the binding is created, the policy is applied to the target. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createPolicyBindingAsync(CreatePolicyBindingRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - createPolicyBindingAsync(FolderLocationName parent, PolicyBinding policyBinding, String policyBindingId) - createPolicyBindingAsync(LocationName parent, PolicyBinding policyBinding, String policyBindingId) - createPolicyBindingAsync(OrganizationLocationName parent, PolicyBinding policyBinding, String policyBindingId) - createPolicyBindingAsync(String parent, PolicyBinding policyBinding, String policyBindingId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createPolicyBindingOperationCallable() - createPolicyBindingCallable() |
| GetPolicyBinding | Gets a policy binding. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getPolicyBinding(GetPolicyBindingRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getPolicyBinding(PolicyBindingName name) - getPolicyBinding(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. - getPolicyBindingCallable() |
| UpdatePolicyBinding | Updates a policy binding and returns a long-running operation. Callers will need the IAM permissions on the policy and target in the binding to update. Target and policy are immutable and cannot be updated. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updatePolicyBindingAsync(UpdatePolicyBindingRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - updatePolicyBindingAsync(PolicyBinding policyBinding, FieldMask updateMask) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - updatePolicyBindingOperationCallable() - updatePolicyBindingCallable() |
| DeletePolicyBinding | Deletes a policy binding and returns a long-running operation. Callers will need the IAM permissions on both the policy and target. After the binding is deleted, the policy no longer applies to the target. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deletePolicyBindingAsync(DeletePolicyBindingRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - deletePolicyBindingAsync(PolicyBindingName name) - deletePolicyBindingAsync(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. - deletePolicyBindingOperationCallable() - deletePolicyBindingCallable() |
| ListPolicyBindings | Lists policy bindings. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listPolicyBindings(ListPolicyBindingsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listPolicyBindings(FolderLocationName parent) - listPolicyBindings(LocationName parent) - listPolicyBindings(OrganizationLocationName parent) - listPolicyBindings(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. - listPolicyBindingsPagedCallable() - listPolicyBindingsCallable() |
| SearchTargetPolicyBindings | Search policy bindings by target. Returns all policy binding objects bound directly to target. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - searchTargetPolicyBindings(SearchTargetPolicyBindingsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - searchTargetPolicyBindings(FolderLocationName parent, String target) - searchTargetPolicyBindings(LocationName parent, String target) - searchTargetPolicyBindings(OrganizationLocationName parent, String target) - searchTargetPolicyBindings(String parent, String target) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - searchTargetPolicyBindingsPagedCallable() - searchTargetPolicyBindingsCallable() |
[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 PolicyBindingsSettings 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
     PolicyBindingsSettings policyBindingsSettings =
         PolicyBindingsSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings);
     
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
     PolicyBindingsSettings policyBindingsSettings =
         PolicyBindingsSettings.newBuilder().setEndpoint(myEndpoint).build();
     PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings);
     
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
     PolicyBindingsSettings policyBindingsSettings =
         PolicyBindingsSettings.newHttpJsonBuilder().build();
     PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create(policyBindingsSettings);
     
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) \> PolicyBindingsClient

## Static Methods

### create()

    public static final PolicyBindingsClient create()

Constructs an instance of PolicyBindingsClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient` |   |

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

### create(PolicyBindingsSettings settings)

    public static final PolicyBindingsClient create(PolicyBindingsSettings settings)

Constructs an instance of PolicyBindingsClient, 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-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient` |   |

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

### create(PolicyBindingsStub stub)

    public static final PolicyBindingsClient create(PolicyBindingsStub stub)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.stub.PolicyBindingsStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient` |   |

## Constructors

### PolicyBindingsClient(PolicyBindingsSettings settings)

    protected PolicyBindingsClient(PolicyBindingsSettings settings)

Constructs an instance of PolicyBindingsClient, 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-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsSettings` |

### PolicyBindingsClient(PolicyBindingsStub stub)

    protected PolicyBindingsClient(PolicyBindingsStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.stub.PolicyBindingsStub` |

## Methods

### 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()

### createPolicyBindingAsync(CreatePolicyBindingRequest request)

    public final OperationFuture<PolicyBinding,OperationMetadata> createPolicyBindingAsync(CreatePolicyBindingRequest request)

Creates a policy binding and returns a long-running operation. Callers will need the IAM
permissions on both the policy and target. After the binding is created, the policy is applied
to the target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       CreatePolicyBindingRequest request =
           CreatePolicyBindingRequest.newBuilder()
               .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
               .setPolicyBindingId("policyBindingId1375821166")
               .setPolicyBinding(PolicyBinding.newBuilder().build())
               .setValidateOnly(true)
               .build();
       PolicyBinding response = policyBindingsClient.createPolicyBindingAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.CreatePolicyBindingRequest` 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-iam-policy/latest/com.google.iam.v3beta.PolicyBinding,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OperationMetadata>` |   |

### createPolicyBindingAsync(FolderLocationName parent, PolicyBinding policyBinding, String policyBindingId)

    public final OperationFuture<PolicyBinding,OperationMetadata> createPolicyBindingAsync(FolderLocationName parent, PolicyBinding policyBinding, String policyBindingId)

Creates a policy binding and returns a long-running operation. Callers will need the IAM
permissions on both the policy and target. After the binding is created, the policy is applied
to the target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
       PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
       String policyBindingId = "policyBindingId1375821166";
       PolicyBinding response =
           policyBindingsClient
               .createPolicyBindingAsync(parent, policyBinding, policyBindingId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.FolderLocationName` Required. The parent resource where this policy binding will be created. The binding parent is the closest Resource Manager resource (project, folder or organization) to the binding target. Format: - `projects/{project_id}/locations/{location}` - `projects/{project_number}/locations/{location}` - `folders/{folder_id}/locations/{location}` - `organizations/{organization_id}/locations/{location}` <br /> |
| `policyBinding` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBinding` Required. The policy binding to create. |
| `policyBindingId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The ID to use for the policy binding, which will become the final component of the policy binding's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /a-z{2,62}/. |

| **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-iam-policy/latest/com.google.iam.v3beta.PolicyBinding,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OperationMetadata>` |   |

### createPolicyBindingAsync(LocationName parent, PolicyBinding policyBinding, String policyBindingId)

    public final OperationFuture<PolicyBinding,OperationMetadata> createPolicyBindingAsync(LocationName parent, PolicyBinding policyBinding, String policyBindingId)

Creates a policy binding and returns a long-running operation. Callers will need the IAM
permissions on both the policy and target. After the binding is created, the policy is applied
to the target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
       String policyBindingId = "policyBindingId1375821166";
       PolicyBinding response =
           policyBindingsClient
               .createPolicyBindingAsync(parent, policyBinding, policyBindingId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.LocationName` Required. The parent resource where this policy binding will be created. The binding parent is the closest Resource Manager resource (project, folder or organization) to the binding target. Format: - `projects/{project_id}/locations/{location}` - `projects/{project_number}/locations/{location}` - `folders/{folder_id}/locations/{location}` - `organizations/{organization_id}/locations/{location}` <br /> |
| `policyBinding` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBinding` Required. The policy binding to create. |
| `policyBindingId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The ID to use for the policy binding, which will become the final component of the policy binding's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /a-z{2,62}/. |

| **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-iam-policy/latest/com.google.iam.v3beta.PolicyBinding,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OperationMetadata>` |   |

### createPolicyBindingAsync(OrganizationLocationName parent, PolicyBinding policyBinding, String policyBindingId)

    public final OperationFuture<PolicyBinding,OperationMetadata> createPolicyBindingAsync(OrganizationLocationName parent, PolicyBinding policyBinding, String policyBindingId)

Creates a policy binding and returns a long-running operation. Callers will need the IAM
permissions on both the policy and target. After the binding is created, the policy is applied
to the target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
       PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
       String policyBindingId = "policyBindingId1375821166";
       PolicyBinding response =
           policyBindingsClient
               .createPolicyBindingAsync(parent, policyBinding, policyBindingId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OrganizationLocationName` Required. The parent resource where this policy binding will be created. The binding parent is the closest Resource Manager resource (project, folder or organization) to the binding target. Format: - `projects/{project_id}/locations/{location}` - `projects/{project_number}/locations/{location}` - `folders/{folder_id}/locations/{location}` - `organizations/{organization_id}/locations/{location}` <br /> |
| `policyBinding` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBinding` Required. The policy binding to create. |
| `policyBindingId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The ID to use for the policy binding, which will become the final component of the policy binding's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /a-z{2,62}/. |

| **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-iam-policy/latest/com.google.iam.v3beta.PolicyBinding,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OperationMetadata>` |   |

### createPolicyBindingAsync(String parent, PolicyBinding policyBinding, String policyBindingId)

    public final OperationFuture<PolicyBinding,OperationMetadata> createPolicyBindingAsync(String parent, PolicyBinding policyBinding, String policyBindingId)

Creates a policy binding and returns a long-running operation. Callers will need the IAM
permissions on both the policy and target. After the binding is created, the policy is applied
to the target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
       PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
       String policyBindingId = "policyBindingId1375821166";
       PolicyBinding response =
           policyBindingsClient
               .createPolicyBindingAsync(parent, policyBinding, policyBindingId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent resource where this policy binding will be created. The binding parent is the closest Resource Manager resource (project, folder or organization) to the binding target. Format: - `projects/{project_id}/locations/{location}` - `projects/{project_number}/locations/{location}` - `folders/{folder_id}/locations/{location}` - `organizations/{organization_id}/locations/{location}` <br /> |
| `policyBinding` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBinding` Required. The policy binding to create. |
| `policyBindingId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The ID to use for the policy binding, which will become the final component of the policy binding's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /a-z{2,62}/. |

| **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-iam-policy/latest/com.google.iam.v3beta.PolicyBinding,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OperationMetadata>` |   |

### createPolicyBindingCallable()

    public final UnaryCallable<CreatePolicyBindingRequest,Operation> createPolicyBindingCallable()

Creates a policy binding and returns a long-running operation. Callers will need the IAM
permissions on both the policy and target. After the binding is created, the policy is applied
to the target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       CreatePolicyBindingRequest request =
           CreatePolicyBindingRequest.newBuilder()
               .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
               .setPolicyBindingId("policyBindingId1375821166")
               .setPolicyBinding(PolicyBinding.newBuilder().build())
               .setValidateOnly(true)
               .build();
       ApiFuture<Operation> future =
           policyBindingsClient.createPolicyBindingCallable().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-iam-policy/latest/com.google.iam.v3beta.CreatePolicyBindingRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### createPolicyBindingOperationCallable()

    public final OperationCallable<CreatePolicyBindingRequest,PolicyBinding,OperationMetadata> createPolicyBindingOperationCallable()

Creates a policy binding and returns a long-running operation. Callers will need the IAM
permissions on both the policy and target. After the binding is created, the policy is applied
to the target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       CreatePolicyBindingRequest request =
           CreatePolicyBindingRequest.newBuilder()
               .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
               .setPolicyBindingId("policyBindingId1375821166")
               .setPolicyBinding(PolicyBinding.newBuilder().build())
               .setValidateOnly(true)
               .build();
       OperationFuture<PolicyBinding, OperationMetadata> future =
           policyBindingsClient.createPolicyBindingOperationCallable().futureCall(request);
       // Do something.
       PolicyBinding 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-iam-policy/latest/com.google.iam.v3beta.CreatePolicyBindingRequest,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBinding,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OperationMetadata>` |   |

### deletePolicyBindingAsync(DeletePolicyBindingRequest request)

    public final OperationFuture<Empty,OperationMetadata> deletePolicyBindingAsync(DeletePolicyBindingRequest request)

Deletes a policy binding and returns a long-running operation. Callers will need the IAM
permissions on both the policy and target. After the binding is deleted, the policy no longer
applies to the target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       DeletePolicyBindingRequest request =
           DeletePolicyBindingRequest.newBuilder()
               .setName(
                   PolicyBindingName.ofProjectLocationPolicyBindingName(
                           "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
                       .toString())
               .setEtag("etag3123477")
               .setValidateOnly(true)
               .build();
       policyBindingsClient.deletePolicyBindingAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.DeletePolicyBindingRequest` 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://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OperationMetadata>` |   |

### deletePolicyBindingAsync(PolicyBindingName name)

    public final OperationFuture<Empty,OperationMetadata> deletePolicyBindingAsync(PolicyBindingName name)

Deletes a policy binding and returns a long-running operation. Callers will need the IAM
permissions on both the policy and target. After the binding is deleted, the policy no longer
applies to the target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       PolicyBindingName name =
           PolicyBindingName.ofProjectLocationPolicyBindingName(
               "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]");
       policyBindingsClient.deletePolicyBindingAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingName` Required. The name of the policy binding to delete. Format: - `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` <br /> |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OperationMetadata>` |   |

### deletePolicyBindingAsync(String name)

    public final OperationFuture<Empty,OperationMetadata> deletePolicyBindingAsync(String name)

Deletes a policy binding and returns a long-running operation. Callers will need the IAM
permissions on both the policy and target. After the binding is deleted, the policy no longer
applies to the target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       String name =
           PolicyBindingName.ofOrganizationLocationPolicyBindingName(
                   "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]")
               .toString();
       policyBindingsClient.deletePolicyBindingAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the policy binding to delete. Format: - `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` <br /> |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OperationMetadata>` |   |

### deletePolicyBindingCallable()

    public final UnaryCallable<DeletePolicyBindingRequest,Operation> deletePolicyBindingCallable()

Deletes a policy binding and returns a long-running operation. Callers will need the IAM
permissions on both the policy and target. After the binding is deleted, the policy no longer
applies to the target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       DeletePolicyBindingRequest request =
           DeletePolicyBindingRequest.newBuilder()
               .setName(
                   PolicyBindingName.ofProjectLocationPolicyBindingName(
                           "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
                       .toString())
               .setEtag("etag3123477")
               .setValidateOnly(true)
               .build();
       ApiFuture<Operation> future =
           policyBindingsClient.deletePolicyBindingCallable().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-iam-policy/latest/com.google.iam.v3beta.DeletePolicyBindingRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### deletePolicyBindingOperationCallable()

    public final OperationCallable<DeletePolicyBindingRequest,Empty,OperationMetadata> deletePolicyBindingOperationCallable()

Deletes a policy binding and returns a long-running operation. Callers will need the IAM
permissions on both the policy and target. After the binding is deleted, the policy no longer
applies to the target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       DeletePolicyBindingRequest request =
           DeletePolicyBindingRequest.newBuilder()
               .setName(
                   PolicyBindingName.ofProjectLocationPolicyBindingName(
                           "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
                       .toString())
               .setEtag("etag3123477")
               .setValidateOnly(true)
               .build();
       OperationFuture<Empty, OperationMetadata> future =
           policyBindingsClient.deletePolicyBindingOperationCallable().futureCall(request);
       // Do something.
       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-iam-policy/latest/com.google.iam.v3beta.DeletePolicyBindingRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OperationMetadata>` |   |

### 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` |   |

### 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` |   |

### getPolicyBinding(GetPolicyBindingRequest request)

    public final PolicyBinding getPolicyBinding(GetPolicyBindingRequest request)

Gets a policy binding.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       GetPolicyBindingRequest request =
           GetPolicyBindingRequest.newBuilder()
               .setName(
                   PolicyBindingName.ofProjectLocationPolicyBindingName(
                           "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
                       .toString())
               .build();
       PolicyBinding response = policyBindingsClient.getPolicyBinding(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.GetPolicyBindingRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBinding` |   |

### getPolicyBinding(PolicyBindingName name)

    public final PolicyBinding getPolicyBinding(PolicyBindingName name)

Gets a policy binding.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       PolicyBindingName name =
           PolicyBindingName.ofProjectLocationPolicyBindingName(
               "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]");
       PolicyBinding response = policyBindingsClient.getPolicyBinding(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingName` Required. The name of the policy binding to retrieve. Format: - `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` <br /> |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBinding` |   |

### getPolicyBinding(String name)

    public final PolicyBinding getPolicyBinding(String name)

Gets a policy binding.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       String name =
           PolicyBindingName.ofOrganizationLocationPolicyBindingName(
                   "[ORGANIZATION]", "[LOCATION]", "[POLICY_BINDING]")
               .toString();
       PolicyBinding response = policyBindingsClient.getPolicyBinding(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the policy binding to retrieve. Format: - `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` <br /> |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBinding` |   |

### getPolicyBindingCallable()

    public final UnaryCallable<GetPolicyBindingRequest,PolicyBinding> getPolicyBindingCallable()

Gets a policy binding.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       GetPolicyBindingRequest request =
           GetPolicyBindingRequest.newBuilder()
               .setName(
                   PolicyBindingName.ofProjectLocationPolicyBindingName(
                           "[PROJECT]", "[LOCATION]", "[POLICY_BINDING]")
                       .toString())
               .build();
       ApiFuture<PolicyBinding> future =
           policyBindingsClient.getPolicyBindingCallable().futureCall(request);
       // Do something.
       PolicyBinding 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-iam-policy/latest/com.google.iam.v3beta.GetPolicyBindingRequest,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBinding>` |   |

### getSettings()

    public final PolicyBindingsSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsSettings` |   |

### getStub()

    public PolicyBindingsStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.stub.PolicyBindingsStub` |   |

### 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` |   |

### listPolicyBindings(FolderLocationName parent)

    public final PolicyBindingsClient.ListPolicyBindingsPagedResponse listPolicyBindings(FolderLocationName parent)

Lists policy bindings.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
       for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.FolderLocationName` Required. The parent resource, which owns the collection of policy bindings. Format: - `projects/{project_id}/locations/{location}` - `projects/{project_number}/locations/{location}` - `folders/{folder_id}/locations/{location}` - `organizations/{organization_id}/locations/{location}` <br /> |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient.ListPolicyBindingsPagedResponse` |   |

### listPolicyBindings(ListPolicyBindingsRequest request)

    public final PolicyBindingsClient.ListPolicyBindingsPagedResponse listPolicyBindings(ListPolicyBindingsRequest request)

Lists policy bindings.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       ListPolicyBindingsRequest request =
           ListPolicyBindingsRequest.newBuilder()
               .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       for (PolicyBinding element : policyBindingsClient.listPolicyBindings(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.ListPolicyBindingsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient.ListPolicyBindingsPagedResponse` |   |

### listPolicyBindings(LocationName parent)

    public final PolicyBindingsClient.ListPolicyBindingsPagedResponse listPolicyBindings(LocationName parent)

Lists policy bindings.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.LocationName` Required. The parent resource, which owns the collection of policy bindings. Format: - `projects/{project_id}/locations/{location}` - `projects/{project_number}/locations/{location}` - `folders/{folder_id}/locations/{location}` - `organizations/{organization_id}/locations/{location}` <br /> |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient.ListPolicyBindingsPagedResponse` |   |

### listPolicyBindings(OrganizationLocationName parent)

    public final PolicyBindingsClient.ListPolicyBindingsPagedResponse listPolicyBindings(OrganizationLocationName parent)

Lists policy bindings.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
       for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OrganizationLocationName` Required. The parent resource, which owns the collection of policy bindings. Format: - `projects/{project_id}/locations/{location}` - `projects/{project_number}/locations/{location}` - `folders/{folder_id}/locations/{location}` - `organizations/{organization_id}/locations/{location}` <br /> |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient.ListPolicyBindingsPagedResponse` |   |

### listPolicyBindings(String parent)

    public final PolicyBindingsClient.ListPolicyBindingsPagedResponse listPolicyBindings(String parent)

Lists policy bindings.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
       for (PolicyBinding element : policyBindingsClient.listPolicyBindings(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent resource, which owns the collection of policy bindings. Format: - `projects/{project_id}/locations/{location}` - `projects/{project_number}/locations/{location}` - `folders/{folder_id}/locations/{location}` - `organizations/{organization_id}/locations/{location}` <br /> |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient.ListPolicyBindingsPagedResponse` |   |

### listPolicyBindingsCallable()

    public final UnaryCallable<ListPolicyBindingsRequest,ListPolicyBindingsResponse> listPolicyBindingsCallable()

Lists policy bindings.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       ListPolicyBindingsRequest request =
           ListPolicyBindingsRequest.newBuilder()
               .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       while (true) {
         ListPolicyBindingsResponse response =
             policyBindingsClient.listPolicyBindingsCallable().call(request);
         for (PolicyBinding element : response.getPolicyBindingsList()) {
           // 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-iam-policy/latest/com.google.iam.v3beta.ListPolicyBindingsRequest,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.ListPolicyBindingsResponse>` |   |

### listPolicyBindingsPagedCallable()

    public final UnaryCallable<ListPolicyBindingsRequest,PolicyBindingsClient.ListPolicyBindingsPagedResponse> listPolicyBindingsPagedCallable()

Lists policy bindings.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       ListPolicyBindingsRequest request =
           ListPolicyBindingsRequest.newBuilder()
               .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       ApiFuture<PolicyBinding> future =
           policyBindingsClient.listPolicyBindingsPagedCallable().futureCall(request);
       // Do something.
       for (PolicyBinding 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-iam-policy/latest/com.google.iam.v3beta.ListPolicyBindingsRequest,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient.ListPolicyBindingsPagedResponse>` |   |

### searchTargetPolicyBindings(FolderLocationName parent, String target)

    public final PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings(FolderLocationName parent, String target)

Search policy bindings by target. Returns all policy binding objects bound directly to target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
       String target = "target-880905839";
       for (PolicyBinding element :
           policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.FolderLocationName` Required. The parent resource where this search will be performed. This should be the nearest Resource Manager resource (project, folder, or organization) to the target. Format: - `projects/{project_id}/locations/{location}` - `projects/{project_number}/locations/{location}` - `folders/{folder_id}/locations/{location}` - `organizations/{organization_id}/locations/{location}` <br /> |
| `target` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The target resource, which is bound to the policy in the binding. Format: - `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - `//cloudresourcemanager.googleapis.com/projects/{project_number}` - `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` <br /> |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse` |   |

### searchTargetPolicyBindings(LocationName parent, String target)

    public final PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings(LocationName parent, String target)

Search policy bindings by target. Returns all policy binding objects bound directly to target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       String target = "target-880905839";
       for (PolicyBinding element :
           policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.LocationName` Required. The parent resource where this search will be performed. This should be the nearest Resource Manager resource (project, folder, or organization) to the target. Format: - `projects/{project_id}/locations/{location}` - `projects/{project_number}/locations/{location}` - `folders/{folder_id}/locations/{location}` - `organizations/{organization_id}/locations/{location}` <br /> |
| `target` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The target resource, which is bound to the policy in the binding. Format: - `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - `//cloudresourcemanager.googleapis.com/projects/{project_number}` - `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` <br /> |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse` |   |

### searchTargetPolicyBindings(OrganizationLocationName parent, String target)

    public final PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings(OrganizationLocationName parent, String target)

Search policy bindings by target. Returns all policy binding objects bound directly to target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
       String target = "target-880905839";
       for (PolicyBinding element :
           policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OrganizationLocationName` Required. The parent resource where this search will be performed. This should be the nearest Resource Manager resource (project, folder, or organization) to the target. Format: - `projects/{project_id}/locations/{location}` - `projects/{project_number}/locations/{location}` - `folders/{folder_id}/locations/{location}` - `organizations/{organization_id}/locations/{location}` <br /> |
| `target` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The target resource, which is bound to the policy in the binding. Format: - `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - `//cloudresourcemanager.googleapis.com/projects/{project_number}` - `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` <br /> |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse` |   |

### searchTargetPolicyBindings(SearchTargetPolicyBindingsRequest request)

    public final PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings(SearchTargetPolicyBindingsRequest request)

Search policy bindings by target. Returns all policy binding objects bound directly to target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       SearchTargetPolicyBindingsRequest request =
           SearchTargetPolicyBindingsRequest.newBuilder()
               .setTarget("target-880905839")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
               .setFilter("filter-1274492040")
               .build();
       for (PolicyBinding element :
           policyBindingsClient.searchTargetPolicyBindings(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.SearchTargetPolicyBindingsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse` |   |

### searchTargetPolicyBindings(String parent, String target)

    public final PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse searchTargetPolicyBindings(String parent, String target)

Search policy bindings by target. Returns all policy binding objects bound directly to target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
       String target = "target-880905839";
       for (PolicyBinding element :
           policyBindingsClient.searchTargetPolicyBindings(parent, target).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent resource where this search will be performed. This should be the nearest Resource Manager resource (project, folder, or organization) to the target. Format: - `projects/{project_id}/locations/{location}` - `projects/{project_number}/locations/{location}` - `folders/{folder_id}/locations/{location}` - `organizations/{organization_id}/locations/{location}` <br /> |
| `target` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The target resource, which is bound to the policy in the binding. Format: - `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - `//cloudresourcemanager.googleapis.com/projects/{project_number}` - `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` <br /> |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse` |   |

### searchTargetPolicyBindingsCallable()

    public final UnaryCallable<SearchTargetPolicyBindingsRequest,SearchTargetPolicyBindingsResponse> searchTargetPolicyBindingsCallable()

Search policy bindings by target. Returns all policy binding objects bound directly to target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       SearchTargetPolicyBindingsRequest request =
           SearchTargetPolicyBindingsRequest.newBuilder()
               .setTarget("target-880905839")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
               .setFilter("filter-1274492040")
               .build();
       while (true) {
         SearchTargetPolicyBindingsResponse response =
             policyBindingsClient.searchTargetPolicyBindingsCallable().call(request);
         for (PolicyBinding element : response.getPolicyBindingsList()) {
           // 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-iam-policy/latest/com.google.iam.v3beta.SearchTargetPolicyBindingsRequest,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.SearchTargetPolicyBindingsResponse>` |   |

### searchTargetPolicyBindingsPagedCallable()

    public final UnaryCallable<SearchTargetPolicyBindingsRequest,PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse> searchTargetPolicyBindingsPagedCallable()

Search policy bindings by target. Returns all policy binding objects bound directly to target.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       SearchTargetPolicyBindingsRequest request =
           SearchTargetPolicyBindingsRequest.newBuilder()
               .setTarget("target-880905839")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
               .setFilter("filter-1274492040")
               .build();
       ApiFuture<PolicyBinding> future =
           policyBindingsClient.searchTargetPolicyBindingsPagedCallable().futureCall(request);
       // Do something.
       for (PolicyBinding 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-iam-policy/latest/com.google.iam.v3beta.SearchTargetPolicyBindingsRequest,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBindingsClient.SearchTargetPolicyBindingsPagedResponse>` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()

### updatePolicyBindingAsync(PolicyBinding policyBinding, FieldMask updateMask)

    public final OperationFuture<PolicyBinding,OperationMetadata> updatePolicyBindingAsync(PolicyBinding policyBinding, FieldMask updateMask)

Updates a policy binding and returns a long-running operation. Callers will need the IAM
permissions on the policy and target in the binding to update. Target and policy are immutable
and cannot be updated.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       PolicyBinding policyBinding = PolicyBinding.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       PolicyBinding response =
           policyBindingsClient.updatePolicyBindingAsync(policyBinding, updateMask).get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `policyBinding` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBinding` Required. The policy binding to update. The policy binding's `name` field is used to identify the policy binding to update. |
| `updateMask` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask.html` Optional. The list of fields to update |

| **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-iam-policy/latest/com.google.iam.v3beta.PolicyBinding,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OperationMetadata>` |   |

### updatePolicyBindingAsync(UpdatePolicyBindingRequest request)

    public final OperationFuture<PolicyBinding,OperationMetadata> updatePolicyBindingAsync(UpdatePolicyBindingRequest request)

Updates a policy binding and returns a long-running operation. Callers will need the IAM
permissions on the policy and target in the binding to update. Target and policy are immutable
and cannot be updated.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       UpdatePolicyBindingRequest request =
           UpdatePolicyBindingRequest.newBuilder()
               .setPolicyBinding(PolicyBinding.newBuilder().build())
               .setValidateOnly(true)
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       PolicyBinding response = policyBindingsClient.updatePolicyBindingAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.UpdatePolicyBindingRequest` 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-iam-policy/latest/com.google.iam.v3beta.PolicyBinding,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OperationMetadata>` |   |

### updatePolicyBindingCallable()

    public final UnaryCallable<UpdatePolicyBindingRequest,Operation> updatePolicyBindingCallable()

Updates a policy binding and returns a long-running operation. Callers will need the IAM
permissions on the policy and target in the binding to update. Target and policy are immutable
and cannot be updated.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       UpdatePolicyBindingRequest request =
           UpdatePolicyBindingRequest.newBuilder()
               .setPolicyBinding(PolicyBinding.newBuilder().build())
               .setValidateOnly(true)
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           policyBindingsClient.updatePolicyBindingCallable().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-iam-policy/latest/com.google.iam.v3beta.UpdatePolicyBindingRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### updatePolicyBindingOperationCallable()

    public final OperationCallable<UpdatePolicyBindingRequest,PolicyBinding,OperationMetadata> updatePolicyBindingOperationCallable()

Updates a policy binding and returns a long-running operation. Callers will need the IAM
permissions on the policy and target in the binding to update. Target and policy are immutable
and cannot be updated.

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 (PolicyBindingsClient policyBindingsClient = PolicyBindingsClient.create()) {
       UpdatePolicyBindingRequest request =
           UpdatePolicyBindingRequest.newBuilder()
               .setPolicyBinding(PolicyBinding.newBuilder().build())
               .setValidateOnly(true)
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       OperationFuture<PolicyBinding, OperationMetadata> future =
           policyBindingsClient.updatePolicyBindingOperationCallable().futureCall(request);
       // Do something.
       PolicyBinding 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-iam-policy/latest/com.google.iam.v3beta.UpdatePolicyBindingRequest,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.PolicyBinding,https://docs.cloud.google.com/java/docs/reference/google-iam-policy/latest/com.google.iam.v3beta.OperationMetadata>` |   |