accesscontextmanager

package
v1.8.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package accesscontextmanager is an auto-generated package for the Access Context Manager API.

An API for setting attribute based access control to requests to GCP services.

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:

Example usage

To get started with this package, create a client.

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 := accesscontextmanager.NewClient(ctx)
if err != nil {
	// TODO: Handle error.
}
defer c.Close()

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.

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 := accesscontextmanager.NewClient(ctx)
if err != nil {
	// TODO: Handle error.
}
defer c.Close()

req := &accesscontextmanagerpb.CommitServicePerimetersRequest{
	// TODO: Fill request struct fields.
	// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#CommitServicePerimetersRequest.
}
op, err := c.CommitServicePerimeters(ctx, req)
if err != nil {
	// TODO: Handle error.
}

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

Use of Context

The ctx passed to NewClient 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.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

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

Types

type AccessLevelIterator

type AccessLevelIterator 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 int, pageToken string) (results []*accesscontextmanagerpb.AccessLevel, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AccessLevelIterator manages a stream of *accesscontextmanagerpb.AccessLevel.

func (*AccessLevelIterator) Next

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 (*AccessLevelIterator) PageInfo

func (it *AccessLevelIterator) PageInfo() *iterator.PageInfo

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

type 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 int, pageToken string) (results []*accesscontextmanagerpb.AccessPolicy, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AccessPolicyIterator manages a stream of *accesscontextmanagerpb.AccessPolicy.

func (*AccessPolicyIterator) Next

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 *AccessPolicyIterator) PageInfo() *iterator.PageInfo

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

type CallOptions

type CallOptions struct {
	ListAccessPolicies         []gax.CallOption
	GetAccessPolicy            []gax.CallOption
	CreateAccessPolicy         []gax.CallOption
	UpdateAccessPolicy         []gax.CallOption
	DeleteAccessPolicy         []gax.CallOption
	ListAccessLevels           []gax.CallOption
	GetAccessLevel             []gax.CallOption
	CreateAccessLevel          []gax.CallOption
	UpdateAccessLevel          []gax.CallOption
	DeleteAccessLevel          []gax.CallOption
	ReplaceAccessLevels        []gax.CallOption
	ListServicePerimeters      []gax.CallOption
	GetServicePerimeter        []gax.CallOption
	CreateServicePerimeter     []gax.CallOption
	UpdateServicePerimeter     []gax.CallOption
	DeleteServicePerimeter     []gax.CallOption
	ReplaceServicePerimeters   []gax.CallOption
	CommitServicePerimeters    []gax.CallOption
	ListGcpUserAccessBindings  []gax.CallOption
	GetGcpUserAccessBinding    []gax.CallOption
	CreateGcpUserAccessBinding []gax.CallOption
	UpdateGcpUserAccessBinding []gax.CallOption
	DeleteGcpUserAccessBinding []gax.CallOption
	SetIamPolicy               []gax.CallOption
	GetIamPolicy               []gax.CallOption
	TestIamPermissions         []gax.CallOption
	GetOperation               []gax.CallOption
}

CallOptions contains the retry settings for each method of Client.

type Client

type Client struct {

	// The call options for this service.
	CallOptions *CallOptions

	// 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
}

Client is a client for interacting with Access Context Manager API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

API for setting [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] and [service perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] for Google Cloud projects. Each organization has one [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] and [service perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter]. This [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is applicable to all resources in the organization. AccessPolicies

func NewClient

func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

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

API for setting [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] and [service perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] for Google Cloud projects. Each organization has one [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] and [service perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter]. This [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is applicable to all resources in the organization. AccessPolicies

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}
Output:

func NewRESTClient added in v1.6.0

func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

NewRESTClient creates a new access context manager rest client.

API for setting [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] and [service perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] for Google Cloud projects. Each organization has one [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] and [service perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter]. This [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is applicable to all resources in the organization. AccessPolicies

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
)

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 := accesscontextmanager.NewRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}
Output:

func (*Client) Close

func (c *Client) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*Client) CommitServicePerimeters

CommitServicePerimeters commits the dry-run specification for all the [service perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. A commit operation on a service perimeter involves copying its spec field to the status field of the service perimeter. Only [service perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] with use_explicit_dry_run_spec field set to true are affected by a commit operation. The long-running operation from this RPC has a successful status after the dry-run specifications for all the [service perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] have been committed. If a commit fails, it causes the long-running operation to return an error response and the entire commit operation is cancelled. When successful, the Operation.response field contains CommitServicePerimetersResponse. The dry_run and the spec fields are cleared after a successful commit operation.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.CommitServicePerimetersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#CommitServicePerimetersRequest.
	}
	op, err := c.CommitServicePerimeters(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*Client) CommitServicePerimetersOperation

func (c *Client) CommitServicePerimetersOperation(name string) *CommitServicePerimetersOperation

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

func (*Client) Connection deprecated

func (c *Client) Connection() *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 (*Client) CreateAccessLevel

CreateAccessLevel creates an [access level] [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running operation from this RPC has a successful status after the [access level] [google.identity.accesscontextmanager.v1.AccessLevel] propagates to long-lasting storage. If [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] contain errors, an error response is returned for the first error encountered.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.CreateAccessLevelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#CreateAccessLevelRequest.
	}
	op, err := c.CreateAccessLevel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*Client) CreateAccessLevelOperation

func (c *Client) CreateAccessLevelOperation(name string) *CreateAccessLevelOperation

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

func (*Client) CreateAccessPolicy

CreateAccessPolicy creates an access policy. This method fails if the organization already has an access policy. The long-running operation has a successful status after the access policy propagates to long-lasting storage. Syntactic and basic semantic errors are returned in metadata as a BadRequest proto.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.AccessPolicy{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#AccessPolicy.
	}
	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
}
Output:

func (*Client) CreateAccessPolicyOperation

func (c *Client) CreateAccessPolicyOperation(name string) *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 (*Client) CreateGcpUserAccessBinding

CreateGcpUserAccessBinding creates a [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the client specifies a [name] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name (at http://google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name)], the server ignores it. Fails if a resource already exists with the same [group_key] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. Completion of this long-running operation does not necessarily signify that the new binding is deployed onto all affected users, which may take more time.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.CreateGcpUserAccessBindingRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#CreateGcpUserAccessBindingRequest.
	}
	op, err := c.CreateGcpUserAccessBinding(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*Client) CreateGcpUserAccessBindingOperation

func (c *Client) CreateGcpUserAccessBindingOperation(name string) *CreateGcpUserAccessBindingOperation

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

func (*Client) CreateServicePerimeter

CreateServicePerimeter creates a [service perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. The long-running operation from this RPC has a successful status after the [service perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] propagates to long-lasting storage. If a [service perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] contains errors, an error response is returned for the first error encountered.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.CreateServicePerimeterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#CreateServicePerimeterRequest.
	}
	op, err := c.CreateServicePerimeter(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*Client) CreateServicePerimeterOperation

func (c *Client) CreateServicePerimeterOperation(name string) *CreateServicePerimeterOperation

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

func (*Client) DeleteAccessLevel

DeleteAccessLevel deletes an [access level] [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource name. The long-running operation from this RPC has a successful status after the [access level] [google.identity.accesscontextmanager.v1.AccessLevel] has been removed from long-lasting storage.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.DeleteAccessLevelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#DeleteAccessLevelRequest.
	}
	op, err := c.DeleteAccessLevel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*Client) DeleteAccessLevelOperation

func (c *Client) DeleteAccessLevelOperation(name string) *DeleteAccessLevelOperation

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

func (*Client) DeleteAccessPolicy

DeleteAccessPolicy deletes an [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] based on the resource name. The long-running operation has a successful status after the [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is removed from long-lasting storage.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*Client) DeleteAccessPolicyOperation

func (c *Client) DeleteAccessPolicyOperation(name string) *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 (*Client) DeleteGcpUserAccessBinding

DeleteGcpUserAccessBinding deletes a [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. Completion of this long-running operation does not necessarily signify that the binding deletion is deployed onto all affected users, which may take more time.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.DeleteGcpUserAccessBindingRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#DeleteGcpUserAccessBindingRequest.
	}
	op, err := c.DeleteGcpUserAccessBinding(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*Client) DeleteGcpUserAccessBindingOperation

func (c *Client) DeleteGcpUserAccessBindingOperation(name string) *DeleteGcpUserAccessBindingOperation

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

func (*Client) DeleteServicePerimeter

DeleteServicePerimeter deletes a [service perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the resource name. The long-running operation from this RPC has a successful status after the [service perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from long-lasting storage.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.DeleteServicePerimeterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#DeleteServicePerimeterRequest.
	}
	op, err := c.DeleteServicePerimeter(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*Client) DeleteServicePerimeterOperation

func (c *Client) DeleteServicePerimeterOperation(name string) *DeleteServicePerimeterOperation

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

func (*Client) GetAccessLevel

GetAccessLevel gets an [access level] [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource name.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.GetAccessLevelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#GetAccessLevelRequest.
	}
	resp, err := c.GetAccessLevel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*Client) GetAccessPolicy

GetAccessPolicy returns an [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*Client) GetGcpUserAccessBinding

GetGcpUserAccessBinding gets the [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with the given name.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.GetGcpUserAccessBindingRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#GetGcpUserAccessBindingRequest.
	}
	resp, err := c.GetGcpUserAccessBinding(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*Client) GetIamPolicy added in v1.5.0

func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the IAM policy for the specified Access Context Manager [access policy][google.identity.accesscontextmanager.v1.AccessPolicy].

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"

	iampb "cloud.google.com/go/iam/apiv1/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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*Client) GetOperation added in v1.5.0

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

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"

	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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &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
}
Output:

func (*Client) GetServicePerimeter

GetServicePerimeter gets a [service perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the resource name.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.GetServicePerimeterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#GetServicePerimeterRequest.
	}
	resp, err := c.GetServicePerimeter(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*Client) ListAccessLevels

ListAccessLevels lists all [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] for an access policy.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
	"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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.ListAccessLevelsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#ListAccessLevelsRequest.
	}
	it := c.ListAccessLevels(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*Client) ListAccessPolicies

ListAccessPolicies lists all [access policies] [google.identity.accesscontextmanager.v1.AccessPolicy] in an organization.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
	"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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.ListAccessPoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#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
	}
}
Output:

func (*Client) ListGcpUserAccessBindings

ListGcpUserAccessBindings lists all [GcpUserAccessBindings] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a Google Cloud organization.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
	"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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.ListGcpUserAccessBindingsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#ListGcpUserAccessBindingsRequest.
	}
	it := c.ListGcpUserAccessBindings(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*Client) ListServicePerimeters

ListServicePerimeters lists all [service perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] for an access policy.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
	"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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.ListServicePerimetersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#ListServicePerimetersRequest.
	}
	it := c.ListServicePerimeters(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*Client) ReplaceAccessLevels

ReplaceAccessLevels replaces all existing [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] in an [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] provided. This is done atomically. The long-running operation from this RPC has a successful status after all replacements propagate to long-lasting storage. If the replacement contains errors, an error response is returned for the first error encountered. Upon error, the replacement is cancelled, and existing [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] are not affected. The Operation.response field contains ReplaceAccessLevelsResponse. Removing [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing [service perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an error.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.ReplaceAccessLevelsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#ReplaceAccessLevelsRequest.
	}
	op, err := c.ReplaceAccessLevels(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*Client) ReplaceAccessLevelsOperation

func (c *Client) ReplaceAccessLevelsOperation(name string) *ReplaceAccessLevelsOperation

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

func (*Client) ReplaceServicePerimeters

ReplaceServicePerimeters replace all existing [service perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the [service perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This is done atomically. The long-running operation from this RPC has a successful status after all replacements propagate to long-lasting storage. Replacements containing errors result in an error response for the first error encountered. Upon an error, replacement are cancelled and existing [service perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] are not affected. The Operation.response field contains ReplaceServicePerimetersResponse.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.ReplaceServicePerimetersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#ReplaceServicePerimetersRequest.
	}
	op, err := c.ReplaceServicePerimeters(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*Client) ReplaceServicePerimetersOperation

func (c *Client) ReplaceServicePerimetersOperation(name string) *ReplaceServicePerimetersOperation

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

func (*Client) SetIamPolicy added in v1.5.0

func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the IAM policy for the specified Access Context Manager [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. This method replaces the existing IAM policy on the access policy. The IAM policy controls the set of users who can perform specific operations on the Access Context Manager [access policy][google.identity.accesscontextmanager.v1.AccessPolicy].

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"

	iampb "cloud.google.com/go/iam/apiv1/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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*Client) TestIamPermissions added in v1.5.0

TestIamPermissions returns the IAM permissions that the caller has on the specified Access Context Manager resource. The resource can be an AccessPolicy, AccessLevel, or [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter ]. This method does not support other resources.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"

	iampb "cloud.google.com/go/iam/apiv1/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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*Client) UpdateAccessLevel

UpdateAccessLevel updates an [access level] [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running operation from this RPC has a successful status after the changes to the [access level] [google.identity.accesscontextmanager.v1.AccessLevel] propagate to long-lasting storage. If [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] contain errors, an error response is returned for the first error encountered.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.UpdateAccessLevelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#UpdateAccessLevelRequest.
	}
	op, err := c.UpdateAccessLevel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*Client) UpdateAccessLevelOperation

func (c *Client) UpdateAccessLevelOperation(name string) *UpdateAccessLevelOperation

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

func (*Client) UpdateAccessPolicy

UpdateAccessPolicy updates an [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy]. The long-running operation from this RPC has a successful status after the changes to the [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] propagate to long-lasting storage.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.UpdateAccessPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#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
}
Output:

func (*Client) UpdateAccessPolicyOperation

func (c *Client) UpdateAccessPolicyOperation(name string) *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.

func (*Client) UpdateGcpUserAccessBinding

UpdateGcpUserAccessBinding updates a [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. Completion of this long-running operation does not necessarily signify that the changed binding is deployed onto all affected users, which may take more time.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.UpdateGcpUserAccessBindingRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#UpdateGcpUserAccessBindingRequest.
	}
	op, err := c.UpdateGcpUserAccessBinding(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*Client) UpdateGcpUserAccessBindingOperation

func (c *Client) UpdateGcpUserAccessBindingOperation(name string) *UpdateGcpUserAccessBindingOperation

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

func (*Client) UpdateServicePerimeter

UpdateServicePerimeter updates a [service perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. The long-running operation from this RPC has a successful status after the [service perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] propagates to long-lasting storage. If a [service perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] contains errors, an error response is returned for the first error encountered.

Example
package main

import (
	"context"

	accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
	accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
)

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 := accesscontextmanager.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &accesscontextmanagerpb.UpdateServicePerimeterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#UpdateServicePerimeterRequest.
	}
	op, err := c.UpdateServicePerimeter(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*Client) UpdateServicePerimeterOperation

func (c *Client) UpdateServicePerimeterOperation(name string) *UpdateServicePerimeterOperation

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

type CommitServicePerimetersOperation

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

CommitServicePerimetersOperation manages a long-running operation from CommitServicePerimeters.

func (*CommitServicePerimetersOperation) Done

Done reports whether the long-running operation has completed.

func (*CommitServicePerimetersOperation) Metadata

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 (*CommitServicePerimetersOperation) Name

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 (*CommitServicePerimetersOperation) Poll

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 (*CommitServicePerimetersOperation) Wait

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

See documentation of Poll for error-handling information.

type CreateAccessLevelOperation

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

CreateAccessLevelOperation manages a long-running operation from CreateAccessLevel.

func (*CreateAccessLevelOperation) Done

func (op *CreateAccessLevelOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateAccessLevelOperation) Metadata

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 (*CreateAccessLevelOperation) Name

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 (*CreateAccessLevelOperation) Poll

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 (*CreateAccessLevelOperation) Wait

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

See documentation of Poll for error-handling information.

type CreateAccessPolicyOperation

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

CreateAccessPolicyOperation manages a long-running operation from CreateAccessPolicy.

func (*CreateAccessPolicyOperation) Done

func (op *CreateAccessPolicyOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateAccessPolicyOperation) Metadata

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

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

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

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

See documentation of Poll for error-handling information.

type CreateGcpUserAccessBindingOperation

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

CreateGcpUserAccessBindingOperation manages a long-running operation from CreateGcpUserAccessBinding.

func (*CreateGcpUserAccessBindingOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateGcpUserAccessBindingOperation) Metadata

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 (*CreateGcpUserAccessBindingOperation) Name

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 (*CreateGcpUserAccessBindingOperation) Poll

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 (*CreateGcpUserAccessBindingOperation) Wait

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

See documentation of Poll for error-handling information.

type CreateServicePerimeterOperation

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

CreateServicePerimeterOperation manages a long-running operation from CreateServicePerimeter.

func (*CreateServicePerimeterOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateServicePerimeterOperation) Metadata

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 (*CreateServicePerimeterOperation) Name

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 (*CreateServicePerimeterOperation) Poll

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 (*CreateServicePerimeterOperation) Wait

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

See documentation of Poll for error-handling information.

type DeleteAccessLevelOperation

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

DeleteAccessLevelOperation manages a long-running operation from DeleteAccessLevel.

func (*DeleteAccessLevelOperation) Done

func (op *DeleteAccessLevelOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteAccessLevelOperation) Metadata

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 (*DeleteAccessLevelOperation) Name

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 (*DeleteAccessLevelOperation) Poll

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 (*DeleteAccessLevelOperation) Wait

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

See documentation of Poll for error-handling information.

type DeleteAccessPolicyOperation

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

DeleteAccessPolicyOperation manages a long-running operation from DeleteAccessPolicy.

func (*DeleteAccessPolicyOperation) Done

func (op *DeleteAccessPolicyOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteAccessPolicyOperation) Metadata

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

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

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

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

See documentation of Poll for error-handling information.

type DeleteGcpUserAccessBindingOperation

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

DeleteGcpUserAccessBindingOperation manages a long-running operation from DeleteGcpUserAccessBinding.

func (*DeleteGcpUserAccessBindingOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteGcpUserAccessBindingOperation) Metadata

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 (*DeleteGcpUserAccessBindingOperation) Name

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 (*DeleteGcpUserAccessBindingOperation) Poll

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 (*DeleteGcpUserAccessBindingOperation) Wait

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

See documentation of Poll for error-handling information.

type DeleteServicePerimeterOperation

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

DeleteServicePerimeterOperation manages a long-running operation from DeleteServicePerimeter.

func (*DeleteServicePerimeterOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteServicePerimeterOperation) Metadata

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 (*DeleteServicePerimeterOperation) Name

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 (*DeleteServicePerimeterOperation) Poll

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 (*DeleteServicePerimeterOperation) Wait

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

See documentation of Poll for error-handling information.

type GcpUserAccessBindingIterator

type GcpUserAccessBindingIterator 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 int, pageToken string) (results []*accesscontextmanagerpb.GcpUserAccessBinding, nextPageToken string, err error)
	// contains filtered or unexported fields
}

GcpUserAccessBindingIterator manages a stream of *accesscontextmanagerpb.GcpUserAccessBinding.

func (*GcpUserAccessBindingIterator) Next

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 (*GcpUserAccessBindingIterator) PageInfo

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

type ReplaceAccessLevelsOperation

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

ReplaceAccessLevelsOperation manages a long-running operation from ReplaceAccessLevels.

func (*ReplaceAccessLevelsOperation) Done

Done reports whether the long-running operation has completed.

func (*ReplaceAccessLevelsOperation) Metadata

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 (*ReplaceAccessLevelsOperation) Name

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 (*ReplaceAccessLevelsOperation) Poll

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 (*ReplaceAccessLevelsOperation) Wait

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

See documentation of Poll for error-handling information.

type ReplaceServicePerimetersOperation

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

ReplaceServicePerimetersOperation manages a long-running operation from ReplaceServicePerimeters.

func (*ReplaceServicePerimetersOperation) Done

Done reports whether the long-running operation has completed.

func (*ReplaceServicePerimetersOperation) Metadata

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 (*ReplaceServicePerimetersOperation) Name

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 (*ReplaceServicePerimetersOperation) Poll

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 (*ReplaceServicePerimetersOperation) Wait

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

See documentation of Poll for error-handling information.

type ServicePerimeterIterator

type ServicePerimeterIterator 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 int, pageToken string) (results []*accesscontextmanagerpb.ServicePerimeter, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ServicePerimeterIterator manages a stream of *accesscontextmanagerpb.ServicePerimeter.

func (*ServicePerimeterIterator) Next

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 (*ServicePerimeterIterator) PageInfo

func (it *ServicePerimeterIterator) PageInfo() *iterator.PageInfo

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

type UpdateAccessLevelOperation

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

UpdateAccessLevelOperation manages a long-running operation from UpdateAccessLevel.

func (*UpdateAccessLevelOperation) Done

func (op *UpdateAccessLevelOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateAccessLevelOperation) Metadata

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 (*UpdateAccessLevelOperation) Name

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 (*UpdateAccessLevelOperation) Poll

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 (*UpdateAccessLevelOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateAccessPolicyOperation

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

UpdateAccessPolicyOperation manages a long-running operation from UpdateAccessPolicy.

func (*UpdateAccessPolicyOperation) Done

func (op *UpdateAccessPolicyOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateAccessPolicyOperation) Metadata

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

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

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

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

See documentation of Poll for error-handling information.

type UpdateGcpUserAccessBindingOperation

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

UpdateGcpUserAccessBindingOperation manages a long-running operation from UpdateGcpUserAccessBinding.

func (*UpdateGcpUserAccessBindingOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateGcpUserAccessBindingOperation) Metadata

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 (*UpdateGcpUserAccessBindingOperation) Name

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 (*UpdateGcpUserAccessBindingOperation) Poll

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 (*UpdateGcpUserAccessBindingOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateServicePerimeterOperation

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

UpdateServicePerimeterOperation manages a long-running operation from UpdateServicePerimeter.

func (*UpdateServicePerimeterOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateServicePerimeterOperation) Metadata

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 (*UpdateServicePerimeterOperation) Name

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 (*UpdateServicePerimeterOperation) Poll

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 (*UpdateServicePerimeterOperation) Wait

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

See documentation of Poll for error-handling information.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL