1.15.1 (latest) 1.15.0 1.14.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.0 1.8.0 1.7.0 1.6.0 1.5.3 1.4.2 1.3.1 1.2.2 1.1.13 1.0.1 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.1

> [!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).

> [!NOTE]
> **Note:** To get more information about this package, such as access to older versions, view [this package on pkg.go.dev](https://pkg.go.dev/cloud.google.com/go/iam/apiv3).

<br />

Package iam is an auto-generated package for the
Identity and Access Management (IAM) API.

Manages identity and access control for Google Cloud resources, including
the creation of service accounts, which you can use to authenticate to
Google and make API calls. Enabling this API also enables the IAM Service
Account Credentials API (iamcredentials.googleapis.com (at
<http://iamcredentials.googleapis.com>)). However, disabling this API
doesn't disable the IAM Service Account Credentials API.

```go
NOTE: This package is in beta. It is not stable, and may be subject to changes.
```

<br />

## General documentation

For information that is relevant for all client libraries please reference
<https://pkg.go.dev/cloud.google.com/go#pkg-overview>. Some information on this
page includes:

- [Authentication and Authorization](https://pkg.go.dev/cloud.google.com/go#hdr-Authentication_and_Authorization)
- [Timeouts and Cancellation](https://pkg.go.dev/cloud.google.com/go#hdr-Timeouts_and_Cancellation)
- [Testing against Client Libraries](https://pkg.go.dev/cloud.google.com/go#hdr-Testing)
- [Debugging Client Libraries](https://pkg.go.dev/cloud.google.com/go#hdr-Debugging)
- [Inspecting errors](https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors)

## Example usage

To get started with this package, create a client.

```go
// go get cloud.google.com/go/iam/apiv3@latest
ctx := context.Background()
// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := iam.NewAccessPoliciesClient(ctx)
if err != nil {
    // TODO: Handle error.
}
defer c.Close()
```

<br />

The client will use your default application credentials. Clients should be reused instead of created as needed.
The methods of Client are safe for concurrent use by multiple goroutines.
The returned client must be Closed when it is done being used.

## Using the Client

The following is an example of making an API call with the newly created client, mentioned above.

```go
req := &iampb.CreateAccessPolicyRequest{
    // TODO: Fill request struct fields.
    // See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#CreateAccessPolicyRequest.
}
op, err := c.CreateAccessPolicy(ctx, req)
if err != nil {
    // TODO: Handle error.
}

resp, err := op.Wait(ctx)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp
```

<br />

## Use of Context

The ctx passed to NewAccessPoliciesClient is used for authentication requests and
for creating the underlying connection, but is not used for subsequent calls.
Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

## Functions

### func DefaultAuthScopes

    func DefaultAuthScopes() []https://pkg.go.dev/builtin#string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

## AccessPoliciesCallOptions

    type AccessPoliciesCallOptions struct {
    	CreateAccessPolicy         []gax.CallOption
    	GetAccessPolicy            []gax.CallOption
    	UpdateAccessPolicy         []gax.CallOption
    	DeleteAccessPolicy         []gax.CallOption
    	ListAccessPolicies         []gax.CallOption
    	SearchAccessPolicyBindings []gax.CallOption
    	GetOperation               []gax.CallOption
    }

AccessPoliciesCallOptions contains the retry settings for each method of AccessPoliciesClient.

## AccessPoliciesClient

    type AccessPoliciesClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesCallOptions

    	// LROClient is used internally to handle long-running operations.
    	// It is exposed so that its CallOptions can be modified if required.
    	// Users should not Close this client.
    	LROClient *lroauto.OperationsClient
    	// contains filtered or unexported fields
    }

AccessPoliciesClient is a client for interacting with Identity and Access Management (IAM) API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Manages Identity and Access Management (IAM) access policies.

### func NewAccessPoliciesClient

    func NewAccessPoliciesClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/google.golang.org/api/option.https://pkg.go.dev/google.golang.org/api/option#ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesClient, https://pkg.go.dev/builtin#error)

NewAccessPoliciesClient creates a new access policies client based on gRPC.
The returned client must be Closed when it is done being used to clean up its underlying connections.

Manages Identity and Access Management (IAM) access policies.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewAccessPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewAccessPoliciesRESTClient

    func NewAccessPoliciesRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/google.golang.org/api/option.https://pkg.go.dev/google.golang.org/api/option#ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesClient, https://pkg.go.dev/builtin#error)

NewAccessPoliciesRESTClient creates a new access policies rest client.

Manages Identity and Access Management (IAM) access policies.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3.html#cloud_google_com_go_iam_apiv3_AccessPoliciesClient_NewAccessPoliciesRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*AccessPoliciesClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*AccessPoliciesClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesClient) Connection() *https://pkg.go.dev/google.golang.org/grpc.https://pkg.go.dev/google.golang.org/grpc#ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always
return the same resource.

### func (\*AccessPoliciesClient) CreateAccessPolicy

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesClient) CreateAccessPolicy(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_CreateAccessPolicyRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_CreateAccessPolicyOperation, https://pkg.go.dev/builtin#error)

CreateAccessPolicy creates an access policy, and returns a long running operation.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewAccessPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.CreateAccessPolicyRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#CreateAccessPolicyRequest.
    	}
    	op, err := c.CreateAccessPolicy(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

    	resp, err := op.Wait(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*AccessPoliciesClient) CreateAccessPolicyOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesClient) CreateAccessPolicyOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_CreateAccessPolicyOperation

CreateAccessPolicyOperation returns a new CreateAccessPolicyOperation from a given name.
The name must be that of a previously created CreateAccessPolicyOperation, possibly from a different process.

### func (\*AccessPoliciesClient) DeleteAccessPolicy

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesClient) DeleteAccessPolicy(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_DeleteAccessPolicyRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_DeleteAccessPolicyOperation, https://pkg.go.dev/builtin#error)

DeleteAccessPolicy deletes an access policy.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewAccessPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.DeleteAccessPolicyRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#DeleteAccessPolicyRequest.
    	}
    	op, err := c.DeleteAccessPolicy(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

    	err = op.Wait(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*AccessPoliciesClient) DeleteAccessPolicyOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesClient) DeleteAccessPolicyOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_DeleteAccessPolicyOperation

DeleteAccessPolicyOperation returns a new DeleteAccessPolicyOperation from a given name.
The name must be that of a previously created DeleteAccessPolicyOperation, possibly from a different process.

### func (\*AccessPoliciesClient) GetAccessPolicy

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesClient) GetAccessPolicy(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_GetAccessPolicyRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_AccessPolicy, https://pkg.go.dev/builtin#error)

GetAccessPolicy gets an access policy.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewAccessPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.GetAccessPolicyRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#GetAccessPolicyRequest.
    	}
    	resp, err := c.GetAccessPolicy(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*AccessPoliciesClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

GetOperation is a utility method from google.longrunning.Operations.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"

    	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewAccessPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_GetOperationRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
    	}
    	resp, err := c.GetOperation(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*AccessPoliciesClient) ListAccessPolicies

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesClient) ListAccessPolicies(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_ListAccessPoliciesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPolicyIterator

ListAccessPolicies lists access policies.

#### Examples

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    	"google.golang.org/api/iterator"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewAccessPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.ListAccessPoliciesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#ListAccessPoliciesRequest.
    	}
    	it := c.ListAccessPolicies(ctx, req)
    	for {
    		resp, err := it.Next()
    		if err == iterator.Done {
    			break
    		}
    		if err != nil {
    			// TODO: Handle error.
    		}
    		// TODO: Use resp.
    		_ = resp

    		// If you need to access the underlying RPC response,
    		// you can do so by casting the `Response` as below.
    		// Otherwise, remove this line. Only populated after
    		// first call to Next(). Not safe for concurrent access.
    		_ = it.Response.(*iampb.ListAccessPoliciesResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewAccessPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.ListAccessPoliciesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#ListAccessPoliciesRequest.
    	}
    	for resp, err := range c.ListAccessPolicies(ctx, req).All() {
    		if err != nil {
    			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
    		}
    		// TODO: Use resp.
    		_ = resp
    	}
    }

### func (\*AccessPoliciesClient) SearchAccessPolicyBindings

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesClient) SearchAccessPolicyBindings(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_SearchAccessPolicyBindingsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingIterator

SearchAccessPolicyBindings returns all policy bindings that bind a specific policy if a user has
searchPolicyBindings permission on that policy.

#### Examples

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    	"google.golang.org/api/iterator"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewAccessPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.SearchAccessPolicyBindingsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#SearchAccessPolicyBindingsRequest.
    	}
    	it := c.SearchAccessPolicyBindings(ctx, req)
    	for {
    		resp, err := it.Next()
    		if err == iterator.Done {
    			break
    		}
    		if err != nil {
    			// TODO: Handle error.
    		}
    		// TODO: Use resp.
    		_ = resp

    		// If you need to access the underlying RPC response,
    		// you can do so by casting the `Response` as below.
    		// Otherwise, remove this line. Only populated after
    		// first call to Next(). Not safe for concurrent access.
    		_ = it.Response.(*iampb.SearchAccessPolicyBindingsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewAccessPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.SearchAccessPolicyBindingsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#SearchAccessPolicyBindingsRequest.
    	}
    	for resp, err := range c.SearchAccessPolicyBindings(ctx, req).All() {
    		if err != nil {
    			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
    		}
    		// TODO: Use resp.
    		_ = resp
    	}
    }

### func (\*AccessPoliciesClient) UpdateAccessPolicy

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesClient) UpdateAccessPolicy(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_UpdateAccessPolicyRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdateAccessPolicyOperation, https://pkg.go.dev/builtin#error)

UpdateAccessPolicy updates an access policy.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewAccessPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.UpdateAccessPolicyRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#UpdateAccessPolicyRequest.
    	}
    	op, err := c.UpdateAccessPolicy(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

    	resp, err := op.Wait(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*AccessPoliciesClient) UpdateAccessPolicyOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPoliciesClient) UpdateAccessPolicyOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdateAccessPolicyOperation

UpdateAccessPolicyOperation returns a new UpdateAccessPolicyOperation from a given name.
The name must be that of a previously created UpdateAccessPolicyOperation, possibly from a different process.

## AccessPolicyIterator

    type AccessPolicyIterator struct {

    	// Response is the raw response for the current page.
    	// It must be cast to the RPC response type.
    	// Calling Next() or InternalFetch() updates this value.
    	Response interface{}

    	// InternalFetch is for use by the Google Cloud Libraries only.
    	// It is not part of the stable interface of this package.
    	//
    	// InternalFetch returns results from a single call to the underlying RPC.
    	// The number of results is no greater than pageSize.
    	// If there are no more results, nextPageToken is empty and err is nil.
    	InternalFetch func(pageSize https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*iampb.AccessPolicy, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

AccessPolicyIterator manages a stream of \*iampb.AccessPolicy.

### func (\*AccessPolicyIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPolicyIterator) All() iter.Seq2[*iampb.AccessPolicy, error]

All returns an iterator. If an error is returned by the iterator, the
iterator will stop after that iteration.

### func (\*AccessPolicyIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPolicyIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_AccessPolicy, https://pkg.go.dev/builtin#error)

Next returns the next result. Its second return value is iterator.Done if there are no more
results. Once Next returns Done, all subsequent calls will return Done.

### func (\*AccessPolicyIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_AccessPolicyIterator) PageInfo() *https://pkg.go.dev/google.golang.org/api/iterator.https://pkg.go.dev/google.golang.org/api/iterator#PageInfo

PageInfo supports pagination. See the \[google.golang.org/api/iterator\] package for details.

## CreateAccessPolicyOperation

    type CreateAccessPolicyOperation struct {
    	// contains filtered or unexported fields
    }

CreateAccessPolicyOperation manages a long-running operation from CreateAccessPolicy.

### func (\*CreateAccessPolicyOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_CreateAccessPolicyOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*CreateAccessPolicyOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_CreateAccessPolicyOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_OperationMetadata, https://pkg.go.dev/builtin#error)

Metadata returns metadata associated with the long-running operation.
Metadata itself does not contact the server, but Poll does.
To get the latest metadata, call this method after a successful call to Poll.
If the metadata is not available, the returned metadata and error are both nil.

### func (\*CreateAccessPolicyOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_CreateAccessPolicyOperation) Name() https://pkg.go.dev/builtin#string

Name returns the name of the long-running operation.
The name is assigned by the server and is unique within the service from which the operation is created.

### func (\*CreateAccessPolicyOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_CreateAccessPolicyOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_AccessPolicy, https://pkg.go.dev/builtin#error)

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
the operation has completed with failure, the error is returned and op.Done will return true.
If Poll succeeds and the operation has completed successfully,
op.Done will return true, and the response of the operation is returned.
If Poll succeeds and the operation has not completed, the returned response and error are both nil.

### func (\*CreateAccessPolicyOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_CreateAccessPolicyOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_AccessPolicy, https://pkg.go.dev/builtin#error)

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

## CreatePolicyBindingOperation

    type CreatePolicyBindingOperation struct {
    	// contains filtered or unexported fields
    }

CreatePolicyBindingOperation manages a long-running operation from CreatePolicyBinding.

### func (\*CreatePolicyBindingOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_CreatePolicyBindingOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*CreatePolicyBindingOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_CreatePolicyBindingOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_OperationMetadata, https://pkg.go.dev/builtin#error)

Metadata returns metadata associated with the long-running operation.
Metadata itself does not contact the server, but Poll does.
To get the latest metadata, call this method after a successful call to Poll.
If the metadata is not available, the returned metadata and error are both nil.

### func (\*CreatePolicyBindingOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_CreatePolicyBindingOperation) Name() https://pkg.go.dev/builtin#string

Name returns the name of the long-running operation.
The name is assigned by the server and is unique within the service from which the operation is created.

### func (\*CreatePolicyBindingOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_CreatePolicyBindingOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_PolicyBinding, https://pkg.go.dev/builtin#error)

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
the operation has completed with failure, the error is returned and op.Done will return true.
If Poll succeeds and the operation has completed successfully,
op.Done will return true, and the response of the operation is returned.
If Poll succeeds and the operation has not completed, the returned response and error are both nil.

### func (\*CreatePolicyBindingOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_CreatePolicyBindingOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_PolicyBinding, https://pkg.go.dev/builtin#error)

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

## CreatePrincipalAccessBoundaryPolicyOperation

    type CreatePrincipalAccessBoundaryPolicyOperation struct {
    	// contains filtered or unexported fields
    }

CreatePrincipalAccessBoundaryPolicyOperation manages a long-running operation from CreatePrincipalAccessBoundaryPolicy.

### func (\*CreatePrincipalAccessBoundaryPolicyOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_CreatePrincipalAccessBoundaryPolicyOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*CreatePrincipalAccessBoundaryPolicyOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_CreatePrincipalAccessBoundaryPolicyOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_OperationMetadata, https://pkg.go.dev/builtin#error)

Metadata returns metadata associated with the long-running operation.
Metadata itself does not contact the server, but Poll does.
To get the latest metadata, call this method after a successful call to Poll.
If the metadata is not available, the returned metadata and error are both nil.

### func (\*CreatePrincipalAccessBoundaryPolicyOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_CreatePrincipalAccessBoundaryPolicyOperation) Name() https://pkg.go.dev/builtin#string

Name returns the name of the long-running operation.
The name is assigned by the server and is unique within the service from which the operation is created.

### func (\*CreatePrincipalAccessBoundaryPolicyOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_CreatePrincipalAccessBoundaryPolicyOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_PrincipalAccessBoundaryPolicy, https://pkg.go.dev/builtin#error)

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
the operation has completed with failure, the error is returned and op.Done will return true.
If Poll succeeds and the operation has completed successfully,
op.Done will return true, and the response of the operation is returned.
If Poll succeeds and the operation has not completed, the returned response and error are both nil.

### func (\*CreatePrincipalAccessBoundaryPolicyOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_CreatePrincipalAccessBoundaryPolicyOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_PrincipalAccessBoundaryPolicy, https://pkg.go.dev/builtin#error)

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

## DeleteAccessPolicyOperation

    type DeleteAccessPolicyOperation struct {
    	// contains filtered or unexported fields
    }

DeleteAccessPolicyOperation manages a long-running operation from DeleteAccessPolicy.

### func (\*DeleteAccessPolicyOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_DeleteAccessPolicyOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*DeleteAccessPolicyOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_DeleteAccessPolicyOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_OperationMetadata, https://pkg.go.dev/builtin#error)

Metadata returns metadata associated with the long-running operation.
Metadata itself does not contact the server, but Poll does.
To get the latest metadata, call this method after a successful call to Poll.
If the metadata is not available, the returned metadata and error are both nil.

### func (\*DeleteAccessPolicyOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_DeleteAccessPolicyOperation) Name() https://pkg.go.dev/builtin#string

Name returns the name of the long-running operation.
The name is assigned by the server and is unique within the service from which the operation is created.

### func (\*DeleteAccessPolicyOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_DeleteAccessPolicyOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
the operation has completed with failure, the error is returned and op.Done will return true.
If Poll succeeds and the operation has completed successfully,
op.Done will return true, and the response of the operation is returned.
If Poll succeeds and the operation has not completed, the returned response and error are both nil.

### func (\*DeleteAccessPolicyOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_DeleteAccessPolicyOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

## DeletePolicyBindingOperation

    type DeletePolicyBindingOperation struct {
    	// contains filtered or unexported fields
    }

DeletePolicyBindingOperation manages a long-running operation from DeletePolicyBinding.

### func (\*DeletePolicyBindingOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_DeletePolicyBindingOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*DeletePolicyBindingOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_DeletePolicyBindingOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_OperationMetadata, https://pkg.go.dev/builtin#error)

Metadata returns metadata associated with the long-running operation.
Metadata itself does not contact the server, but Poll does.
To get the latest metadata, call this method after a successful call to Poll.
If the metadata is not available, the returned metadata and error are both nil.

### func (\*DeletePolicyBindingOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_DeletePolicyBindingOperation) Name() https://pkg.go.dev/builtin#string

Name returns the name of the long-running operation.
The name is assigned by the server and is unique within the service from which the operation is created.

### func (\*DeletePolicyBindingOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_DeletePolicyBindingOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
the operation has completed with failure, the error is returned and op.Done will return true.
If Poll succeeds and the operation has completed successfully,
op.Done will return true, and the response of the operation is returned.
If Poll succeeds and the operation has not completed, the returned response and error are both nil.

### func (\*DeletePolicyBindingOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_DeletePolicyBindingOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

## DeletePrincipalAccessBoundaryPolicyOperation

    type DeletePrincipalAccessBoundaryPolicyOperation struct {
    	// contains filtered or unexported fields
    }

DeletePrincipalAccessBoundaryPolicyOperation manages a long-running operation from DeletePrincipalAccessBoundaryPolicy.

### func (\*DeletePrincipalAccessBoundaryPolicyOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_DeletePrincipalAccessBoundaryPolicyOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*DeletePrincipalAccessBoundaryPolicyOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_DeletePrincipalAccessBoundaryPolicyOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_OperationMetadata, https://pkg.go.dev/builtin#error)

Metadata returns metadata associated with the long-running operation.
Metadata itself does not contact the server, but Poll does.
To get the latest metadata, call this method after a successful call to Poll.
If the metadata is not available, the returned metadata and error are both nil.

### func (\*DeletePrincipalAccessBoundaryPolicyOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_DeletePrincipalAccessBoundaryPolicyOperation) Name() https://pkg.go.dev/builtin#string

Name returns the name of the long-running operation.
The name is assigned by the server and is unique within the service from which the operation is created.

### func (\*DeletePrincipalAccessBoundaryPolicyOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_DeletePrincipalAccessBoundaryPolicyOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
the operation has completed with failure, the error is returned and op.Done will return true.
If Poll succeeds and the operation has completed successfully,
op.Done will return true, and the response of the operation is returned.
If Poll succeeds and the operation has not completed, the returned response and error are both nil.

### func (\*DeletePrincipalAccessBoundaryPolicyOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_DeletePrincipalAccessBoundaryPolicyOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

## PolicyBindingIterator

    type PolicyBindingIterator struct {

    	// Response is the raw response for the current page.
    	// It must be cast to the RPC response type.
    	// Calling Next() or InternalFetch() updates this value.
    	Response interface{}

    	// InternalFetch is for use by the Google Cloud Libraries only.
    	// It is not part of the stable interface of this package.
    	//
    	// InternalFetch returns results from a single call to the underlying RPC.
    	// The number of results is no greater than pageSize.
    	// If there are no more results, nextPageToken is empty and err is nil.
    	InternalFetch func(pageSize https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*iampb.PolicyBinding, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

PolicyBindingIterator manages a stream of \*iampb.PolicyBinding.

### func (\*PolicyBindingIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingIterator) All() iter.Seq2[*iampb.PolicyBinding, error]

All returns an iterator. If an error is returned by the iterator, the
iterator will stop after that iteration.

### func (\*PolicyBindingIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_PolicyBinding, https://pkg.go.dev/builtin#error)

Next returns the next result. Its second return value is iterator.Done if there are no more
results. Once Next returns Done, all subsequent calls will return Done.

### func (\*PolicyBindingIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingIterator) PageInfo() *https://pkg.go.dev/google.golang.org/api/iterator.https://pkg.go.dev/google.golang.org/api/iterator#PageInfo

PageInfo supports pagination. See the \[google.golang.org/api/iterator\] package for details.

## PolicyBindingsCallOptions

    type PolicyBindingsCallOptions struct {
    	CreatePolicyBinding        []gax.CallOption
    	GetPolicyBinding           []gax.CallOption
    	UpdatePolicyBinding        []gax.CallOption
    	DeletePolicyBinding        []gax.CallOption
    	ListPolicyBindings         []gax.CallOption
    	SearchTargetPolicyBindings []gax.CallOption
    	GetOperation               []gax.CallOption
    }

PolicyBindingsCallOptions contains the retry settings for each method of PolicyBindingsClient.

## PolicyBindingsClient

    type PolicyBindingsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsCallOptions

    	// LROClient is used internally to handle long-running operations.
    	// It is exposed so that its CallOptions can be modified if required.
    	// Users should not Close this client.
    	LROClient *lroauto.OperationsClient
    	// contains filtered or unexported fields
    }

PolicyBindingsClient is a client for interacting with Identity and Access Management (IAM) API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

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

### func NewPolicyBindingsClient

    func NewPolicyBindingsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/google.golang.org/api/option.https://pkg.go.dev/google.golang.org/api/option#ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient, https://pkg.go.dev/builtin#error)

NewPolicyBindingsClient creates a new policy bindings client based on gRPC.
The returned client must be Closed when it is done being used to clean up its underlying connections.

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

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPolicyBindingsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewPolicyBindingsRESTClient

    func NewPolicyBindingsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/google.golang.org/api/option.https://pkg.go.dev/google.golang.org/api/option#ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient, https://pkg.go.dev/builtin#error)

NewPolicyBindingsRESTClient creates a new policy bindings rest client.

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

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3.html#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_NewPolicyBindingsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*PolicyBindingsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*PolicyBindingsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient) Connection() *https://pkg.go.dev/google.golang.org/grpc.https://pkg.go.dev/google.golang.org/grpc#ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always
return the same resource.

### func (\*PolicyBindingsClient) CreatePolicyBinding

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient) CreatePolicyBinding(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_CreatePolicyBindingRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_CreatePolicyBindingOperation, https://pkg.go.dev/builtin#error)

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.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPolicyBindingsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.CreatePolicyBindingRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#CreatePolicyBindingRequest.
    	}
    	op, err := c.CreatePolicyBinding(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

    	resp, err := op.Wait(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*PolicyBindingsClient) CreatePolicyBindingOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient) CreatePolicyBindingOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_CreatePolicyBindingOperation

CreatePolicyBindingOperation returns a new CreatePolicyBindingOperation from a given name.
The name must be that of a previously created CreatePolicyBindingOperation, possibly from a different process.

### func (\*PolicyBindingsClient) DeletePolicyBinding

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient) DeletePolicyBinding(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_DeletePolicyBindingRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_DeletePolicyBindingOperation, https://pkg.go.dev/builtin#error)

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.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPolicyBindingsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.DeletePolicyBindingRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#DeletePolicyBindingRequest.
    	}
    	op, err := c.DeletePolicyBinding(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

    	err = op.Wait(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*PolicyBindingsClient) DeletePolicyBindingOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient) DeletePolicyBindingOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient_DeletePolicyBindingOperation

DeletePolicyBindingOperation returns a new DeletePolicyBindingOperation from a given name.
The name must be that of a previously created DeletePolicyBindingOperation, possibly from a different process.

### func (\*PolicyBindingsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

GetOperation is a utility method from google.longrunning.Operations.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"

    	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPolicyBindingsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_GetOperationRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
    	}
    	resp, err := c.GetOperation(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*PolicyBindingsClient) GetPolicyBinding

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient) GetPolicyBinding(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_GetPolicyBindingRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_PolicyBinding, https://pkg.go.dev/builtin#error)

GetPolicyBinding gets a policy binding.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPolicyBindingsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.GetPolicyBindingRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#GetPolicyBindingRequest.
    	}
    	resp, err := c.GetPolicyBinding(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*PolicyBindingsClient) ListPolicyBindings

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient) ListPolicyBindings(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_ListPolicyBindingsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingIterator

ListPolicyBindings lists policy bindings.

#### Examples

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    	"google.golang.org/api/iterator"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPolicyBindingsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.ListPolicyBindingsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#ListPolicyBindingsRequest.
    	}
    	it := c.ListPolicyBindings(ctx, req)
    	for {
    		resp, err := it.Next()
    		if err == iterator.Done {
    			break
    		}
    		if err != nil {
    			// TODO: Handle error.
    		}
    		// TODO: Use resp.
    		_ = resp

    		// If you need to access the underlying RPC response,
    		// you can do so by casting the `Response` as below.
    		// Otherwise, remove this line. Only populated after
    		// first call to Next(). Not safe for concurrent access.
    		_ = it.Response.(*iampb.ListPolicyBindingsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPolicyBindingsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.ListPolicyBindingsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#ListPolicyBindingsRequest.
    	}
    	for resp, err := range c.ListPolicyBindings(ctx, req).All() {
    		if err != nil {
    			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
    		}
    		// TODO: Use resp.
    		_ = resp
    	}
    }

### func (\*PolicyBindingsClient) SearchTargetPolicyBindings

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient) SearchTargetPolicyBindings(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_SearchTargetPolicyBindingsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingIterator

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

#### Examples

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    	"google.golang.org/api/iterator"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPolicyBindingsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.SearchTargetPolicyBindingsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#SearchTargetPolicyBindingsRequest.
    	}
    	it := c.SearchTargetPolicyBindings(ctx, req)
    	for {
    		resp, err := it.Next()
    		if err == iterator.Done {
    			break
    		}
    		if err != nil {
    			// TODO: Handle error.
    		}
    		// TODO: Use resp.
    		_ = resp

    		// If you need to access the underlying RPC response,
    		// you can do so by casting the `Response` as below.
    		// Otherwise, remove this line. Only populated after
    		// first call to Next(). Not safe for concurrent access.
    		_ = it.Response.(*iampb.SearchTargetPolicyBindingsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPolicyBindingsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.SearchTargetPolicyBindingsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#SearchTargetPolicyBindingsRequest.
    	}
    	for resp, err := range c.SearchTargetPolicyBindings(ctx, req).All() {
    		if err != nil {
    			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
    		}
    		// TODO: Use resp.
    		_ = resp
    	}
    }

### func (\*PolicyBindingsClient) UpdatePolicyBinding

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient) UpdatePolicyBinding(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_UpdatePolicyBindingRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdatePolicyBindingOperation, https://pkg.go.dev/builtin#error)

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.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPolicyBindingsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.UpdatePolicyBindingRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#UpdatePolicyBindingRequest.
    	}
    	op, err := c.UpdatePolicyBinding(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

    	resp, err := op.Wait(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*PolicyBindingsClient) UpdatePolicyBindingOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingsClient) UpdatePolicyBindingOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdatePolicyBindingOperation

UpdatePolicyBindingOperation returns a new UpdatePolicyBindingOperation from a given name.
The name must be that of a previously created UpdatePolicyBindingOperation, possibly from a different process.

## PrincipalAccessBoundaryPoliciesCallOptions

    type PrincipalAccessBoundaryPoliciesCallOptions struct {
    	CreatePrincipalAccessBoundaryPolicy         []gax.CallOption
    	GetPrincipalAccessBoundaryPolicy            []gax.CallOption
    	UpdatePrincipalAccessBoundaryPolicy         []gax.CallOption
    	DeletePrincipalAccessBoundaryPolicy         []gax.CallOption
    	ListPrincipalAccessBoundaryPolicies         []gax.CallOption
    	SearchPrincipalAccessBoundaryPolicyBindings []gax.CallOption
    	GetOperation                                []gax.CallOption
    }

PrincipalAccessBoundaryPoliciesCallOptions contains the retry settings for each method of PrincipalAccessBoundaryPoliciesClient.

## PrincipalAccessBoundaryPoliciesClient

    type PrincipalAccessBoundaryPoliciesClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesCallOptions

    	// LROClient is used internally to handle long-running operations.
    	// It is exposed so that its CallOptions can be modified if required.
    	// Users should not Close this client.
    	LROClient *lroauto.OperationsClient
    	// contains filtered or unexported fields
    }

PrincipalAccessBoundaryPoliciesClient is a client for interacting with Identity and Access Management (IAM) API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Manages Identity and Access Management (IAM) principal access boundary
policies.

### func NewPrincipalAccessBoundaryPoliciesClient

    func NewPrincipalAccessBoundaryPoliciesClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/google.golang.org/api/option.https://pkg.go.dev/google.golang.org/api/option#ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient, https://pkg.go.dev/builtin#error)

NewPrincipalAccessBoundaryPoliciesClient creates a new principal access boundary policies client based on gRPC.
The returned client must be Closed when it is done being used to clean up its underlying connections.

Manages Identity and Access Management (IAM) principal access boundary
policies.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPrincipalAccessBoundaryPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewPrincipalAccessBoundaryPoliciesRESTClient

    func NewPrincipalAccessBoundaryPoliciesRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/google.golang.org/api/option.https://pkg.go.dev/google.golang.org/api/option#ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient, https://pkg.go.dev/builtin#error)

NewPrincipalAccessBoundaryPoliciesRESTClient creates a new principal access boundary policies rest client.

Manages Identity and Access Management (IAM) principal access boundary
policies.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3.html#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_NewPrincipalAccessBoundaryPoliciesRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*PrincipalAccessBoundaryPoliciesClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*PrincipalAccessBoundaryPoliciesClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient) Connection() *https://pkg.go.dev/google.golang.org/grpc.https://pkg.go.dev/google.golang.org/grpc#ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always
return the same resource.

### func (\*PrincipalAccessBoundaryPoliciesClient) CreatePrincipalAccessBoundaryPolicy

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient) CreatePrincipalAccessBoundaryPolicy(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_CreatePrincipalAccessBoundaryPolicyRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_CreatePrincipalAccessBoundaryPolicyOperation, https://pkg.go.dev/builtin#error)

CreatePrincipalAccessBoundaryPolicy creates a principal access boundary policy, and returns a long running
operation.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPrincipalAccessBoundaryPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.CreatePrincipalAccessBoundaryPolicyRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#CreatePrincipalAccessBoundaryPolicyRequest.
    	}
    	op, err := c.CreatePrincipalAccessBoundaryPolicy(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

    	resp, err := op.Wait(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*PrincipalAccessBoundaryPoliciesClient) CreatePrincipalAccessBoundaryPolicyOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient) CreatePrincipalAccessBoundaryPolicyOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_CreatePrincipalAccessBoundaryPolicyOperation

CreatePrincipalAccessBoundaryPolicyOperation returns a new CreatePrincipalAccessBoundaryPolicyOperation from a given name.
The name must be that of a previously created CreatePrincipalAccessBoundaryPolicyOperation, possibly from a different process.

### func (\*PrincipalAccessBoundaryPoliciesClient) DeletePrincipalAccessBoundaryPolicy

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient) DeletePrincipalAccessBoundaryPolicy(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_DeletePrincipalAccessBoundaryPolicyRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_DeletePrincipalAccessBoundaryPolicyOperation, https://pkg.go.dev/builtin#error)

DeletePrincipalAccessBoundaryPolicy deletes a principal access boundary policy.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPrincipalAccessBoundaryPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.DeletePrincipalAccessBoundaryPolicyRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#DeletePrincipalAccessBoundaryPolicyRequest.
    	}
    	op, err := c.DeletePrincipalAccessBoundaryPolicy(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

    	err = op.Wait(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*PrincipalAccessBoundaryPoliciesClient) DeletePrincipalAccessBoundaryPolicyOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient) DeletePrincipalAccessBoundaryPolicyOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient_DeletePrincipalAccessBoundaryPolicyOperation

DeletePrincipalAccessBoundaryPolicyOperation returns a new DeletePrincipalAccessBoundaryPolicyOperation from a given name.
The name must be that of a previously created DeletePrincipalAccessBoundaryPolicyOperation, possibly from a different process.

### func (\*PrincipalAccessBoundaryPoliciesClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

GetOperation is a utility method from google.longrunning.Operations.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"

    	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPrincipalAccessBoundaryPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_GetOperationRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
    	}
    	resp, err := c.GetOperation(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*PrincipalAccessBoundaryPoliciesClient) GetPrincipalAccessBoundaryPolicy

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient) GetPrincipalAccessBoundaryPolicy(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_GetPrincipalAccessBoundaryPolicyRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_PrincipalAccessBoundaryPolicy, https://pkg.go.dev/builtin#error)

GetPrincipalAccessBoundaryPolicy gets a principal access boundary policy.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPrincipalAccessBoundaryPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.GetPrincipalAccessBoundaryPolicyRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#GetPrincipalAccessBoundaryPolicyRequest.
    	}
    	resp, err := c.GetPrincipalAccessBoundaryPolicy(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*PrincipalAccessBoundaryPoliciesClient) ListPrincipalAccessBoundaryPolicies

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient) ListPrincipalAccessBoundaryPolicies(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_ListPrincipalAccessBoundaryPoliciesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPolicyIterator

ListPrincipalAccessBoundaryPolicies lists principal access boundary policies.

#### Examples

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    	"google.golang.org/api/iterator"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPrincipalAccessBoundaryPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.ListPrincipalAccessBoundaryPoliciesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#ListPrincipalAccessBoundaryPoliciesRequest.
    	}
    	it := c.ListPrincipalAccessBoundaryPolicies(ctx, req)
    	for {
    		resp, err := it.Next()
    		if err == iterator.Done {
    			break
    		}
    		if err != nil {
    			// TODO: Handle error.
    		}
    		// TODO: Use resp.
    		_ = resp

    		// If you need to access the underlying RPC response,
    		// you can do so by casting the `Response` as below.
    		// Otherwise, remove this line. Only populated after
    		// first call to Next(). Not safe for concurrent access.
    		_ = it.Response.(*iampb.ListPrincipalAccessBoundaryPoliciesResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPrincipalAccessBoundaryPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.ListPrincipalAccessBoundaryPoliciesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#ListPrincipalAccessBoundaryPoliciesRequest.
    	}
    	for resp, err := range c.ListPrincipalAccessBoundaryPolicies(ctx, req).All() {
    		if err != nil {
    			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
    		}
    		// TODO: Use resp.
    		_ = resp
    	}
    }

### func (\*PrincipalAccessBoundaryPoliciesClient) SearchPrincipalAccessBoundaryPolicyBindings

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient) SearchPrincipalAccessBoundaryPolicyBindings(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_SearchPrincipalAccessBoundaryPolicyBindingsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PolicyBindingIterator

SearchPrincipalAccessBoundaryPolicyBindings returns all policy bindings that bind a specific policy if a user has
searchPolicyBindings permission on that policy.

#### Examples

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    	"google.golang.org/api/iterator"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPrincipalAccessBoundaryPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.SearchPrincipalAccessBoundaryPolicyBindingsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#SearchPrincipalAccessBoundaryPolicyBindingsRequest.
    	}
    	it := c.SearchPrincipalAccessBoundaryPolicyBindings(ctx, req)
    	for {
    		resp, err := it.Next()
    		if err == iterator.Done {
    			break
    		}
    		if err != nil {
    			// TODO: Handle error.
    		}
    		// TODO: Use resp.
    		_ = resp

    		// If you need to access the underlying RPC response,
    		// you can do so by casting the `Response` as below.
    		// Otherwise, remove this line. Only populated after
    		// first call to Next(). Not safe for concurrent access.
    		_ = it.Response.(*iampb.SearchPrincipalAccessBoundaryPolicyBindingsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPrincipalAccessBoundaryPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.SearchPrincipalAccessBoundaryPolicyBindingsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#SearchPrincipalAccessBoundaryPolicyBindingsRequest.
    	}
    	for resp, err := range c.SearchPrincipalAccessBoundaryPolicyBindings(ctx, req).All() {
    		if err != nil {
    			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
    		}
    		// TODO: Use resp.
    		_ = resp
    	}
    }

### func (\*PrincipalAccessBoundaryPoliciesClient) UpdatePrincipalAccessBoundaryPolicy

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient) UpdatePrincipalAccessBoundaryPolicy(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_UpdatePrincipalAccessBoundaryPolicyRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdatePrincipalAccessBoundaryPolicyOperation, https://pkg.go.dev/builtin#error)

UpdatePrincipalAccessBoundaryPolicy updates a principal access boundary policy.

#### Example

    package main

    import (
    	"context"

    	iam "cloud.google.com/go/iam/apiv3"
    	iampb "cloud.google.com/go/iam/apiv3/iampb"
    )

    func main() {
    	ctx := context.Background()
    	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
    	c, err := iam.NewPrincipalAccessBoundaryPoliciesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &iampb.UpdatePrincipalAccessBoundaryPolicyRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/iam/apiv3/iampb#UpdatePrincipalAccessBoundaryPolicyRequest.
    	}
    	op, err := c.UpdatePrincipalAccessBoundaryPolicy(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

    	resp, err := op.Wait(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*PrincipalAccessBoundaryPoliciesClient) UpdatePrincipalAccessBoundaryPolicyOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPoliciesClient) UpdatePrincipalAccessBoundaryPolicyOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdatePrincipalAccessBoundaryPolicyOperation

UpdatePrincipalAccessBoundaryPolicyOperation returns a new UpdatePrincipalAccessBoundaryPolicyOperation from a given name.
The name must be that of a previously created UpdatePrincipalAccessBoundaryPolicyOperation, possibly from a different process.

## PrincipalAccessBoundaryPolicyIterator

    type PrincipalAccessBoundaryPolicyIterator struct {

    	// Response is the raw response for the current page.
    	// It must be cast to the RPC response type.
    	// Calling Next() or InternalFetch() updates this value.
    	Response interface{}

    	// InternalFetch is for use by the Google Cloud Libraries only.
    	// It is not part of the stable interface of this package.
    	//
    	// InternalFetch returns results from a single call to the underlying RPC.
    	// The number of results is no greater than pageSize.
    	// If there are no more results, nextPageToken is empty and err is nil.
    	InternalFetch func(pageSize https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*iampb.PrincipalAccessBoundaryPolicy, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

PrincipalAccessBoundaryPolicyIterator manages a stream of \*iampb.PrincipalAccessBoundaryPolicy.

### func (\*PrincipalAccessBoundaryPolicyIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPolicyIterator) All() iter.Seq2[*iampb.PrincipalAccessBoundaryPolicy, error]

All returns an iterator. If an error is returned by the iterator, the
iterator will stop after that iteration.

### func (\*PrincipalAccessBoundaryPolicyIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPolicyIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_PrincipalAccessBoundaryPolicy, https://pkg.go.dev/builtin#error)

Next returns the next result. Its second return value is iterator.Done if there are no more
results. Once Next returns Done, all subsequent calls will return Done.

### func (\*PrincipalAccessBoundaryPolicyIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_PrincipalAccessBoundaryPolicyIterator) PageInfo() *https://pkg.go.dev/google.golang.org/api/iterator.https://pkg.go.dev/google.golang.org/api/iterator#PageInfo

PageInfo supports pagination. See the \[google.golang.org/api/iterator\] package for details.

## UpdateAccessPolicyOperation

    type UpdateAccessPolicyOperation struct {
    	// contains filtered or unexported fields
    }

UpdateAccessPolicyOperation manages a long-running operation from UpdateAccessPolicy.

### func (\*UpdateAccessPolicyOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdateAccessPolicyOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*UpdateAccessPolicyOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdateAccessPolicyOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_OperationMetadata, https://pkg.go.dev/builtin#error)

Metadata returns metadata associated with the long-running operation.
Metadata itself does not contact the server, but Poll does.
To get the latest metadata, call this method after a successful call to Poll.
If the metadata is not available, the returned metadata and error are both nil.

### func (\*UpdateAccessPolicyOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdateAccessPolicyOperation) Name() https://pkg.go.dev/builtin#string

Name returns the name of the long-running operation.
The name is assigned by the server and is unique within the service from which the operation is created.

### func (\*UpdateAccessPolicyOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdateAccessPolicyOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_AccessPolicy, https://pkg.go.dev/builtin#error)

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
the operation has completed with failure, the error is returned and op.Done will return true.
If Poll succeeds and the operation has completed successfully,
op.Done will return true, and the response of the operation is returned.
If Poll succeeds and the operation has not completed, the returned response and error are both nil.

### func (\*UpdateAccessPolicyOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdateAccessPolicyOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_AccessPolicy, https://pkg.go.dev/builtin#error)

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

## UpdatePolicyBindingOperation

    type UpdatePolicyBindingOperation struct {
    	// contains filtered or unexported fields
    }

UpdatePolicyBindingOperation manages a long-running operation from UpdatePolicyBinding.

### func (\*UpdatePolicyBindingOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdatePolicyBindingOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*UpdatePolicyBindingOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdatePolicyBindingOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_OperationMetadata, https://pkg.go.dev/builtin#error)

Metadata returns metadata associated with the long-running operation.
Metadata itself does not contact the server, but Poll does.
To get the latest metadata, call this method after a successful call to Poll.
If the metadata is not available, the returned metadata and error are both nil.

### func (\*UpdatePolicyBindingOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdatePolicyBindingOperation) Name() https://pkg.go.dev/builtin#string

Name returns the name of the long-running operation.
The name is assigned by the server and is unique within the service from which the operation is created.

### func (\*UpdatePolicyBindingOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdatePolicyBindingOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_PolicyBinding, https://pkg.go.dev/builtin#error)

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
the operation has completed with failure, the error is returned and op.Done will return true.
If Poll succeeds and the operation has completed successfully,
op.Done will return true, and the response of the operation is returned.
If Poll succeeds and the operation has not completed, the returned response and error are both nil.

### func (\*UpdatePolicyBindingOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdatePolicyBindingOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_PolicyBinding, https://pkg.go.dev/builtin#error)

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

## UpdatePrincipalAccessBoundaryPolicyOperation

    type UpdatePrincipalAccessBoundaryPolicyOperation struct {
    	// contains filtered or unexported fields
    }

UpdatePrincipalAccessBoundaryPolicyOperation manages a long-running operation from UpdatePrincipalAccessBoundaryPolicy.

### func (\*UpdatePrincipalAccessBoundaryPolicyOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdatePrincipalAccessBoundaryPolicyOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*UpdatePrincipalAccessBoundaryPolicyOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdatePrincipalAccessBoundaryPolicyOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_OperationMetadata, https://pkg.go.dev/builtin#error)

Metadata returns metadata associated with the long-running operation.
Metadata itself does not contact the server, but Poll does.
To get the latest metadata, call this method after a successful call to Poll.
If the metadata is not available, the returned metadata and error are both nil.

### func (\*UpdatePrincipalAccessBoundaryPolicyOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdatePrincipalAccessBoundaryPolicyOperation) Name() https://pkg.go.dev/builtin#string

Name returns the name of the long-running operation.
The name is assigned by the server and is unique within the service from which the operation is created.

### func (\*UpdatePrincipalAccessBoundaryPolicyOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdatePrincipalAccessBoundaryPolicyOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_PrincipalAccessBoundaryPolicy, https://pkg.go.dev/builtin#error)

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
the operation has completed with failure, the error is returned and op.Done will return true.
If Poll succeeds and the operation has completed successfully,
op.Done will return true, and the response of the operation is returned.
If Poll succeeds and the operation has not completed, the returned response and error are both nil.

### func (\*UpdatePrincipalAccessBoundaryPolicyOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3#cloud_google_com_go_iam_apiv3_UpdatePrincipalAccessBoundaryPolicyOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3/iampb#cloud_google_com_go_iam_apiv3_iampb_PrincipalAccessBoundaryPolicy, https://pkg.go.dev/builtin#error)

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.