Access Context Manager API v1 - Package cloud.google.com/go/accesscontextmanager/apiv1 (v1.9.7) Stay organized with collections Save and categorize content based on your preferences.
Package accesscontextmanager is an auto-generated package for theAccess Context Manager API.
An API for setting attribute based access control to requests to GCPservices.
General documentation
For information that is relevant for all client libraries please referencehttps://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on thispage includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage
To get started with this package, create a client.
// go get cloud.google.com/go/accesscontextmanager/apiv1@latestctx:=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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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, mentioned above.
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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp
Use of Context
The ctx passed to NewClient is used for authentication requests andfor 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
funcDefaultAuthScopes()[]stringDefaultAuthScopes reports the default set of authentication scopes to use with this package.
AccessLevelIterator
typeAccessLevelIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*accesscontextmanagerpb.AccessLevel,nextPageTokenstring,errerror)// contains filtered or unexported fields}AccessLevelIterator manages a stream of *accesscontextmanagerpb.AccessLevel.
func (*AccessLevelIterator) All
func(it*AccessLevelIterator)All()iter.Seq2[*accesscontextmanagerpb.AccessLevel,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*AccessLevelIterator) Next
func(it*AccessLevelIterator)Next()(*accesscontextmanagerpb.AccessLevel,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*AccessLevelIterator) PageInfo
func(it*AccessLevelIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
AccessPolicyIterator
typeAccessPolicyIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*accesscontextmanagerpb.AccessPolicy,nextPageTokenstring,errerror)// contains filtered or unexported fields}AccessPolicyIterator manages a stream of *accesscontextmanagerpb.AccessPolicy.
func (*AccessPolicyIterator) All
func(it*AccessPolicyIterator)All()iter.Seq2[*accesscontextmanagerpb.AccessPolicy,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*AccessPolicyIterator) Next
func(it*AccessPolicyIterator)Next()(*accesscontextmanagerpb.AccessPolicy,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*AccessPolicyIterator) PageInfo
func(it*AccessPolicyIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CallOptions
typeCallOptionsstruct{ListAccessPolicies[]gax.CallOptionGetAccessPolicy[]gax.CallOptionCreateAccessPolicy[]gax.CallOptionUpdateAccessPolicy[]gax.CallOptionDeleteAccessPolicy[]gax.CallOptionListAccessLevels[]gax.CallOptionGetAccessLevel[]gax.CallOptionCreateAccessLevel[]gax.CallOptionUpdateAccessLevel[]gax.CallOptionDeleteAccessLevel[]gax.CallOptionReplaceAccessLevels[]gax.CallOptionListServicePerimeters[]gax.CallOptionGetServicePerimeter[]gax.CallOptionCreateServicePerimeter[]gax.CallOptionUpdateServicePerimeter[]gax.CallOptionDeleteServicePerimeter[]gax.CallOptionReplaceServicePerimeters[]gax.CallOptionCommitServicePerimeters[]gax.CallOptionListGcpUserAccessBindings[]gax.CallOptionGetGcpUserAccessBinding[]gax.CallOptionCreateGcpUserAccessBinding[]gax.CallOptionUpdateGcpUserAccessBinding[]gax.CallOptionDeleteGcpUserAccessBinding[]gax.CallOptionSetIamPolicy[]gax.CallOptionGetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionGetOperation[]gax.CallOption}CallOptions contains the retry settings for each method of Client.
Client
typeClientstruct{// 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 [serviceperimeters] [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] isapplicable to all resources in the organization.AccessPolicies
func NewClient
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 [serviceperimeters] [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] isapplicable to all resources in the organization.AccessPolicies
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewRESTClient
NewRESTClient creates a new access context manager rest client.
API for setting [access levels][google.identity.accesscontextmanager.v1.AccessLevel] and [serviceperimeters] [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] isapplicable to all resources in the organization.AccessPolicies
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1")funcmain(){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_Optionsc,err:=accesscontextmanager.NewRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*Client) Close
Close closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*Client) CommitServicePerimeters
func(c*Client)CommitServicePerimeters(ctxcontext.Context,req*accesscontextmanagerpb.CommitServicePerimetersRequest,opts...gax.CallOption)(*CommitServicePerimetersOperation,error)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 fieldto the status field of the service perimeter. Only [service perimeters][google.identity.accesscontextmanager.v1.ServicePerimeter] withuse_explicit_dry_run_spec field set to true are affected by a commitoperation. The long-running operation from this RPC has a successfulstatus after the dry-run specifications for all the [service perimeters][google.identity.accesscontextmanager.v1.ServicePerimeter] have beencommitted. If a commit fails, it causes the long-running operation toreturn an error response and the entire commit operation is cancelled.When successful, the Operation.response field containsCommitServicePerimetersResponse. The dry_run and the spec fields arecleared after a successful commit operation.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CommitServicePerimetersOperation
func(c*Client)CommitServicePerimetersOperation(namestring)*CommitServicePerimetersOperationCommitServicePerimetersOperation 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.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*Client) CreateAccessLevel
func(c*Client)CreateAccessLevel(ctxcontext.Context,req*accesscontextmanagerpb.CreateAccessLevelRequest,opts...gax.CallOption)(*CreateAccessLevelOperation,error)CreateAccessLevel creates an [access level][google.identity.accesscontextmanager.v1.AccessLevel]. The long-runningoperation from this RPC has a successful status after the [accesslevel] [google.identity.accesscontextmanager.v1.AccessLevel]propagates to long-lasting storage. If [access levels][google.identity.accesscontextmanager.v1.AccessLevel] containerrors, an error response is returned for the first error encountered.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateAccessLevelOperation
func(c*Client)CreateAccessLevelOperation(namestring)*CreateAccessLevelOperationCreateAccessLevelOperation 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
func(c*Client)CreateAccessPolicy(ctxcontext.Context,req*accesscontextmanagerpb.AccessPolicy,opts...gax.CallOption)(*CreateAccessPolicyOperation,error)CreateAccessPolicy creates an access policy. This method fails if the organization already hasan access policy. The long-running operation has a successful statusafter the access policy propagates to long-lasting storage.Syntactic and basic semantic errors are returned in metadata as aBadRequest proto.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateAccessPolicyOperation
func(c*Client)CreateAccessPolicyOperation(namestring)*CreateAccessPolicyOperationCreateAccessPolicyOperation 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
func(c*Client)CreateGcpUserAccessBinding(ctxcontext.Context,req*accesscontextmanagerpb.CreateGcpUserAccessBindingRequest,opts...gax.CallOption)(*CreateGcpUserAccessBindingOperation,error)CreateGcpUserAccessBinding creates a [GcpUserAccessBinding][google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If theclient specifies a [name][google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name (athttp://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 thatthe new binding is deployed onto all affected users, which may take moretime.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateGcpUserAccessBindingOperation
func(c*Client)CreateGcpUserAccessBindingOperation(namestring)*CreateGcpUserAccessBindingOperationCreateGcpUserAccessBindingOperation 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
func(c*Client)CreateServicePerimeter(ctxcontext.Context,req*accesscontextmanagerpb.CreateServicePerimeterRequest,opts...gax.CallOption)(*CreateServicePerimeterOperation,error)CreateServicePerimeter creates a [service perimeter][google.identity.accesscontextmanager.v1.ServicePerimeter]. Thelong-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] containserrors, an error response is returned for the first error encountered.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateServicePerimeterOperation
func(c*Client)CreateServicePerimeterOperation(namestring)*CreateServicePerimeterOperationCreateServicePerimeterOperation 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
func(c*Client)DeleteAccessLevel(ctxcontext.Context,req*accesscontextmanagerpb.DeleteAccessLevelRequest,opts...gax.CallOption)(*DeleteAccessLevelOperation,error)DeleteAccessLevel deletes an [access level][google.identity.accesscontextmanager.v1.AccessLevel] based on the resourcename. The long-running operation from this RPC has a successful statusafter the [access level][google.identity.accesscontextmanager.v1.AccessLevel] has been removedfrom long-lasting storage.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteAccessLevelOperation
func(c*Client)DeleteAccessLevelOperation(namestring)*DeleteAccessLevelOperationDeleteAccessLevelOperation 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
func(c*Client)DeleteAccessPolicy(ctxcontext.Context,req*accesscontextmanagerpb.DeleteAccessPolicyRequest,opts...gax.CallOption)(*DeleteAccessPolicyOperation,error)DeleteAccessPolicy deletes an [access policy][google.identity.accesscontextmanager.v1.AccessPolicy] based on theresource 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
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteAccessPolicyOperation
func(c*Client)DeleteAccessPolicyOperation(namestring)*DeleteAccessPolicyOperationDeleteAccessPolicyOperation 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
func(c*Client)DeleteGcpUserAccessBinding(ctxcontext.Context,req*accesscontextmanagerpb.DeleteGcpUserAccessBindingRequest,opts...gax.CallOption)(*DeleteGcpUserAccessBindingOperation,error)DeleteGcpUserAccessBinding deletes a [GcpUserAccessBinding][google.identity.accesscontextmanager.v1.GcpUserAccessBinding].Completion of this long-running operation does not necessarily signify thatthe binding deletion is deployed onto all affected users, which may takemore time.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteGcpUserAccessBindingOperation
func(c*Client)DeleteGcpUserAccessBindingOperation(namestring)*DeleteGcpUserAccessBindingOperationDeleteGcpUserAccessBindingOperation 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
func(c*Client)DeleteServicePerimeter(ctxcontext.Context,req*accesscontextmanagerpb.DeleteServicePerimeterRequest,opts...gax.CallOption)(*DeleteServicePerimeterOperation,error)DeleteServicePerimeter deletes a [service perimeter][google.identity.accesscontextmanager.v1.ServicePerimeter] based on theresource name. The long-running operation from this RPC has a successfulstatus after the [service perimeter][google.identity.accesscontextmanager.v1.ServicePerimeter] is removed fromlong-lasting storage.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteServicePerimeterOperation
func(c*Client)DeleteServicePerimeterOperation(namestring)*DeleteServicePerimeterOperationDeleteServicePerimeterOperation 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
func(c*Client)GetAccessLevel(ctxcontext.Context,req*accesscontextmanagerpb.GetAccessLevelRequest,opts...gax.CallOption)(*accesscontextmanagerpb.AccessLevel,error)GetAccessLevel gets an [access level][google.identity.accesscontextmanager.v1.AccessLevel] based on the resourcename.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetAccessPolicy
func(c*Client)GetAccessPolicy(ctxcontext.Context,req*accesscontextmanagerpb.GetAccessPolicyRequest,opts...gax.CallOption)(*accesscontextmanagerpb.AccessPolicy,error)GetAccessPolicy returns an [access policy][google.identity.accesscontextmanager.v1.AccessPolicy] based on the name.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetGcpUserAccessBinding
func(c*Client)GetGcpUserAccessBinding(ctxcontext.Context,req*accesscontextmanagerpb.GetGcpUserAccessBindingRequest,opts...gax.CallOption)(*accesscontextmanagerpb.GcpUserAccessBinding,error)GetGcpUserAccessBinding gets the [GcpUserAccessBinding][google.identity.accesscontextmanager.v1.GcpUserAccessBinding] withthe given name.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetIamPolicy
func(c*Client)GetIamPolicy(ctxcontext.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
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetOperation
func(c*Client)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetServicePerimeter
func(c*Client)GetServicePerimeter(ctxcontext.Context,req*accesscontextmanagerpb.GetServicePerimeterRequest,opts...gax.CallOption)(*accesscontextmanagerpb.ServicePerimeter,error)GetServicePerimeter gets a [service perimeter][google.identity.accesscontextmanager.v1.ServicePerimeter] based on theresource name.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ListAccessLevels
func(c*Client)ListAccessLevels(ctxcontext.Context,req*accesscontextmanagerpb.ListAccessLevelsRequest,opts...gax.CallOption)*AccessLevelIteratorListAccessLevels lists all [access levels][google.identity.accesscontextmanager.v1.AccessLevel] for an accesspolicy.
Examples
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=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.(*accesscontextmanagerpb.ListAccessLevelsResponse)}}all
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&accesscontextmanagerpb.ListAccessLevelsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#ListAccessLevelsRequest.}forresp,err:=rangec.ListAccessLevels(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListAccessPolicies
func(c*Client)ListAccessPolicies(ctxcontext.Context,req*accesscontextmanagerpb.ListAccessPoliciesRequest,opts...gax.CallOption)*AccessPolicyIteratorListAccessPolicies lists all [access policies][google.identity.accesscontextmanager.v1.AccessPolicy] in anorganization.
Examples
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=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.(*accesscontextmanagerpb.ListAccessPoliciesResponse)}}all
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&accesscontextmanagerpb.ListAccessPoliciesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#ListAccessPoliciesRequest.}forresp,err:=rangec.ListAccessPolicies(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListGcpUserAccessBindings
func(c*Client)ListGcpUserAccessBindings(ctxcontext.Context,req*accesscontextmanagerpb.ListGcpUserAccessBindingsRequest,opts...gax.CallOption)*GcpUserAccessBindingIteratorListGcpUserAccessBindings lists all [GcpUserAccessBindings][google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for aGoogle Cloud organization.
Examples
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=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.(*accesscontextmanagerpb.ListGcpUserAccessBindingsResponse)}}all
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&accesscontextmanagerpb.ListGcpUserAccessBindingsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#ListGcpUserAccessBindingsRequest.}forresp,err:=rangec.ListGcpUserAccessBindings(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListServicePerimeters
func(c*Client)ListServicePerimeters(ctxcontext.Context,req*accesscontextmanagerpb.ListServicePerimetersRequest,opts...gax.CallOption)*ServicePerimeterIteratorListServicePerimeters lists all [service perimeters][google.identity.accesscontextmanager.v1.ServicePerimeter] for anaccess policy.
Examples
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=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.(*accesscontextmanagerpb.ListServicePerimetersResponse)}}all
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&accesscontextmanagerpb.ListServicePerimetersRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb#ListServicePerimetersRequest.}forresp,err:=rangec.ListServicePerimeters(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ReplaceAccessLevels
func(c*Client)ReplaceAccessLevels(ctxcontext.Context,req*accesscontextmanagerpb.ReplaceAccessLevelsRequest,opts...gax.CallOption)(*ReplaceAccessLevelsOperation,error)ReplaceAccessLevels replaces all existing [access levels][google.identity.accesscontextmanager.v1.AccessLevel] in an [accesspolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] withthe [access levels][google.identity.accesscontextmanager.v1.AccessLevel] provided. Thisis done atomically. The long-running operation from this RPC has asuccessful status after all replacements propagate to long-lastingstorage. If the replacement contains errors, an error response is returnedfor the first error encountered. Upon error, the replacement is cancelled,and existing [access levels][google.identity.accesscontextmanager.v1.AccessLevel] are notaffected. The Operation.response field containsReplaceAccessLevelsResponse. Removing [access levels][google.identity.accesscontextmanager.v1.AccessLevel] contained in existing[service perimeters][google.identity.accesscontextmanager.v1.ServicePerimeter] result in anerror.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ReplaceAccessLevelsOperation
func(c*Client)ReplaceAccessLevelsOperation(namestring)*ReplaceAccessLevelsOperationReplaceAccessLevelsOperation 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
func(c*Client)ReplaceServicePerimeters(ctxcontext.Context,req*accesscontextmanagerpb.ReplaceServicePerimetersRequest,opts...gax.CallOption)(*ReplaceServicePerimetersOperation,error)ReplaceServicePerimeters replace all existing [service perimeters][google.identity.accesscontextmanager.v1.ServicePerimeter] in an [accesspolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the[service perimeters][google.identity.accesscontextmanager.v1.ServicePerimeter] provided. Thisis done atomically. The long-running operation from this RPC has asuccessful status after all replacements propagate to long-lasting storage.Replacements containing errors result in an error response for the firsterror encountered. Upon an error, replacement are cancelled and existing[service perimeters][google.identity.accesscontextmanager.v1.ServicePerimeter] are notaffected. The Operation.response field containsReplaceServicePerimetersResponse.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ReplaceServicePerimetersOperation
func(c*Client)ReplaceServicePerimetersOperation(namestring)*ReplaceServicePerimetersOperationReplaceServicePerimetersOperation 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
func(c*Client)SetIamPolicy(ctxcontext.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 IAMpolicy controls the set of users who can perform specific operations on theAccess Context Manager [accesspolicy][google.identity.accesscontextmanager.v1.AccessPolicy].
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) TestIamPermissions
func(c*Client)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns the IAM permissions that the caller has on the specified AccessContext Manager resource. The resource can be anAccessPolicy,AccessLevel, or[ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter]. This method does not support other resources.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateAccessLevel
func(c*Client)UpdateAccessLevel(ctxcontext.Context,req*accesscontextmanagerpb.UpdateAccessLevelRequest,opts...gax.CallOption)(*UpdateAccessLevelOperation,error)UpdateAccessLevel updates an [access level][google.identity.accesscontextmanager.v1.AccessLevel]. The long-runningoperation from this RPC has a successful status after the changes tothe [access level][google.identity.accesscontextmanager.v1.AccessLevel] propagateto long-lasting storage. If [access levels][google.identity.accesscontextmanager.v1.AccessLevel] containerrors, an error response is returned for the first error encountered.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateAccessLevelOperation
func(c*Client)UpdateAccessLevelOperation(namestring)*UpdateAccessLevelOperationUpdateAccessLevelOperation 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
func(c*Client)UpdateAccessPolicy(ctxcontext.Context,req*accesscontextmanagerpb.UpdateAccessPolicyRequest,opts...gax.CallOption)(*UpdateAccessPolicyOperation,error)UpdateAccessPolicy updates an [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. Thelong-running operation from this RPC has a successful status after thechanges to the [access policy][google.identity.accesscontextmanager.v1.AccessPolicy] propagateto long-lasting storage.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateAccessPolicyOperation
func(c*Client)UpdateAccessPolicyOperation(namestring)*UpdateAccessPolicyOperationUpdateAccessPolicyOperation 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
func(c*Client)UpdateGcpUserAccessBinding(ctxcontext.Context,req*accesscontextmanagerpb.UpdateGcpUserAccessBindingRequest,opts...gax.CallOption)(*UpdateGcpUserAccessBindingOperation,error)UpdateGcpUserAccessBinding updates a [GcpUserAccessBinding][google.identity.accesscontextmanager.v1.GcpUserAccessBinding].Completion of this long-running operation does not necessarily signify thatthe changed binding is deployed onto all affected users, which may takemore time.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateGcpUserAccessBindingOperation
func(c*Client)UpdateGcpUserAccessBindingOperation(namestring)*UpdateGcpUserAccessBindingOperationUpdateGcpUserAccessBindingOperation 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
func(c*Client)UpdateServicePerimeter(ctxcontext.Context,req*accesscontextmanagerpb.UpdateServicePerimeterRequest,opts...gax.CallOption)(*UpdateServicePerimeterOperation,error)UpdateServicePerimeter updates a [service perimeter][google.identity.accesscontextmanager.v1.ServicePerimeter]. Thelong-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] containserrors, an error response is returned for the first error encountered.
Example
packagemainimport("context"accesscontextmanager"cloud.google.com/go/accesscontextmanager/apiv1"accesscontextmanagerpb"cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb")funcmain(){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_Optionsc,err:=accesscontextmanager.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateServicePerimeterOperation
func(c*Client)UpdateServicePerimeterOperation(namestring)*UpdateServicePerimeterOperationUpdateServicePerimeterOperation returns a new UpdateServicePerimeterOperation from a given name.The name must be that of a previously created UpdateServicePerimeterOperation, possibly from a different process.
CommitServicePerimetersOperation
typeCommitServicePerimetersOperationstruct{// contains filtered or unexported fields}CommitServicePerimetersOperation manages a long-running operation from CommitServicePerimeters.
func (*CommitServicePerimetersOperation) Done
func(op*CommitServicePerimetersOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CommitServicePerimetersOperation) Metadata
func(op*CommitServicePerimetersOperation)Metadata()(*accesscontextmanagerpb.AccessContextManagerOperationMetadata,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 (*CommitServicePerimetersOperation) Name
func(op*CommitServicePerimetersOperation)Name()stringName 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
func(op*CommitServicePerimetersOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.CommitServicePerimetersResponse,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 andthe 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
func(op*CommitServicePerimetersOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.CommitServicePerimetersResponse,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.
CreateAccessLevelOperation
typeCreateAccessLevelOperationstruct{// contains filtered or unexported fields}CreateAccessLevelOperation manages a long-running operation from CreateAccessLevel.
func (*CreateAccessLevelOperation) Done
func(op*CreateAccessLevelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateAccessLevelOperation) Metadata
func(op*CreateAccessLevelOperation)Metadata()(*accesscontextmanagerpb.AccessContextManagerOperationMetadata,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 (*CreateAccessLevelOperation) Name
func(op*CreateAccessLevelOperation)Name()stringName 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
func(op*CreateAccessLevelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.AccessLevel,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 andthe 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
func(op*CreateAccessLevelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.AccessLevel,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.
CreateAccessPolicyOperation
typeCreateAccessPolicyOperationstruct{// contains filtered or unexported fields}CreateAccessPolicyOperation manages a long-running operation from CreateAccessPolicy.
func (*CreateAccessPolicyOperation) Done
func(op*CreateAccessPolicyOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateAccessPolicyOperation) Metadata
func(op*CreateAccessPolicyOperation)Metadata()(*accesscontextmanagerpb.AccessContextManagerOperationMetadata,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*CreateAccessPolicyOperation)Name()stringName 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*CreateAccessPolicyOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.AccessPolicy,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 andthe 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*CreateAccessPolicyOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.AccessPolicy,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.
CreateGcpUserAccessBindingOperation
typeCreateGcpUserAccessBindingOperationstruct{// contains filtered or unexported fields}CreateGcpUserAccessBindingOperation manages a long-running operation from CreateGcpUserAccessBinding.
func (*CreateGcpUserAccessBindingOperation) Done
func(op*CreateGcpUserAccessBindingOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateGcpUserAccessBindingOperation) Metadata
func(op*CreateGcpUserAccessBindingOperation)Metadata()(*accesscontextmanagerpb.GcpUserAccessBindingOperationMetadata,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 (*CreateGcpUserAccessBindingOperation) Name
func(op*CreateGcpUserAccessBindingOperation)Name()stringName 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
func(op*CreateGcpUserAccessBindingOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.GcpUserAccessBinding,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 andthe 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
func(op*CreateGcpUserAccessBindingOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.GcpUserAccessBinding,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.
CreateServicePerimeterOperation
typeCreateServicePerimeterOperationstruct{// contains filtered or unexported fields}CreateServicePerimeterOperation manages a long-running operation from CreateServicePerimeter.
func (*CreateServicePerimeterOperation) Done
func(op*CreateServicePerimeterOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateServicePerimeterOperation) Metadata
func(op*CreateServicePerimeterOperation)Metadata()(*accesscontextmanagerpb.AccessContextManagerOperationMetadata,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 (*CreateServicePerimeterOperation) Name
func(op*CreateServicePerimeterOperation)Name()stringName 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
func(op*CreateServicePerimeterOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.ServicePerimeter,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 andthe 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
func(op*CreateServicePerimeterOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.ServicePerimeter,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.
DeleteAccessLevelOperation
typeDeleteAccessLevelOperationstruct{// contains filtered or unexported fields}DeleteAccessLevelOperation manages a long-running operation from DeleteAccessLevel.
func (*DeleteAccessLevelOperation) Done
func(op*DeleteAccessLevelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteAccessLevelOperation) Metadata
func(op*DeleteAccessLevelOperation)Metadata()(*accesscontextmanagerpb.AccessContextManagerOperationMetadata,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 (*DeleteAccessLevelOperation) Name
func(op*DeleteAccessLevelOperation)Name()stringName 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
func(op*DeleteAccessLevelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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
func(op*DeleteAccessLevelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteAccessPolicyOperation
typeDeleteAccessPolicyOperationstruct{// contains filtered or unexported fields}DeleteAccessPolicyOperation manages a long-running operation from DeleteAccessPolicy.
func (*DeleteAccessPolicyOperation) Done
func(op*DeleteAccessPolicyOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteAccessPolicyOperation) Metadata
func(op*DeleteAccessPolicyOperation)Metadata()(*accesscontextmanagerpb.AccessContextManagerOperationMetadata,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*DeleteAccessPolicyOperation)Name()stringName 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*DeleteAccessPolicyOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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*DeleteAccessPolicyOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteGcpUserAccessBindingOperation
typeDeleteGcpUserAccessBindingOperationstruct{// contains filtered or unexported fields}DeleteGcpUserAccessBindingOperation manages a long-running operation from DeleteGcpUserAccessBinding.
func (*DeleteGcpUserAccessBindingOperation) Done
func(op*DeleteGcpUserAccessBindingOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteGcpUserAccessBindingOperation) Metadata
func(op*DeleteGcpUserAccessBindingOperation)Metadata()(*accesscontextmanagerpb.GcpUserAccessBindingOperationMetadata,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 (*DeleteGcpUserAccessBindingOperation) Name
func(op*DeleteGcpUserAccessBindingOperation)Name()stringName 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
func(op*DeleteGcpUserAccessBindingOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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
func(op*DeleteGcpUserAccessBindingOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteServicePerimeterOperation
typeDeleteServicePerimeterOperationstruct{// contains filtered or unexported fields}DeleteServicePerimeterOperation manages a long-running operation from DeleteServicePerimeter.
func (*DeleteServicePerimeterOperation) Done
func(op*DeleteServicePerimeterOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteServicePerimeterOperation) Metadata
func(op*DeleteServicePerimeterOperation)Metadata()(*accesscontextmanagerpb.AccessContextManagerOperationMetadata,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 (*DeleteServicePerimeterOperation) Name
func(op*DeleteServicePerimeterOperation)Name()stringName 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
func(op*DeleteServicePerimeterOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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
func(op*DeleteServicePerimeterOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
GcpUserAccessBindingIterator
typeGcpUserAccessBindingIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*accesscontextmanagerpb.GcpUserAccessBinding,nextPageTokenstring,errerror)// contains filtered or unexported fields}GcpUserAccessBindingIterator manages a stream of *accesscontextmanagerpb.GcpUserAccessBinding.
func (*GcpUserAccessBindingIterator) All
func(it*GcpUserAccessBindingIterator)All()iter.Seq2[*accesscontextmanagerpb.GcpUserAccessBinding,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*GcpUserAccessBindingIterator) Next
func(it*GcpUserAccessBindingIterator)Next()(*accesscontextmanagerpb.GcpUserAccessBinding,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*GcpUserAccessBindingIterator) PageInfo
func(it*GcpUserAccessBindingIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ReplaceAccessLevelsOperation
typeReplaceAccessLevelsOperationstruct{// contains filtered or unexported fields}ReplaceAccessLevelsOperation manages a long-running operation from ReplaceAccessLevels.
func (*ReplaceAccessLevelsOperation) Done
func(op*ReplaceAccessLevelsOperation)Done()boolDone reports whether the long-running operation has completed.
func (*ReplaceAccessLevelsOperation) Metadata
func(op*ReplaceAccessLevelsOperation)Metadata()(*accesscontextmanagerpb.AccessContextManagerOperationMetadata,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 (*ReplaceAccessLevelsOperation) Name
func(op*ReplaceAccessLevelsOperation)Name()stringName 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
func(op*ReplaceAccessLevelsOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.ReplaceAccessLevelsResponse,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 andthe 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
func(op*ReplaceAccessLevelsOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.ReplaceAccessLevelsResponse,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.
ReplaceServicePerimetersOperation
typeReplaceServicePerimetersOperationstruct{// contains filtered or unexported fields}ReplaceServicePerimetersOperation manages a long-running operation from ReplaceServicePerimeters.
func (*ReplaceServicePerimetersOperation) Done
func(op*ReplaceServicePerimetersOperation)Done()boolDone reports whether the long-running operation has completed.
func (*ReplaceServicePerimetersOperation) Metadata
func(op*ReplaceServicePerimetersOperation)Metadata()(*accesscontextmanagerpb.AccessContextManagerOperationMetadata,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 (*ReplaceServicePerimetersOperation) Name
func(op*ReplaceServicePerimetersOperation)Name()stringName 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
func(op*ReplaceServicePerimetersOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.ReplaceServicePerimetersResponse,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 andthe 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
func(op*ReplaceServicePerimetersOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.ReplaceServicePerimetersResponse,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.
ServicePerimeterIterator
typeServicePerimeterIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*accesscontextmanagerpb.ServicePerimeter,nextPageTokenstring,errerror)// contains filtered or unexported fields}ServicePerimeterIterator manages a stream of *accesscontextmanagerpb.ServicePerimeter.
func (*ServicePerimeterIterator) All
func(it*ServicePerimeterIterator)All()iter.Seq2[*accesscontextmanagerpb.ServicePerimeter,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ServicePerimeterIterator) Next
func(it*ServicePerimeterIterator)Next()(*accesscontextmanagerpb.ServicePerimeter,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ServicePerimeterIterator) PageInfo
func(it*ServicePerimeterIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
UpdateAccessLevelOperation
typeUpdateAccessLevelOperationstruct{// contains filtered or unexported fields}UpdateAccessLevelOperation manages a long-running operation from UpdateAccessLevel.
func (*UpdateAccessLevelOperation) Done
func(op*UpdateAccessLevelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateAccessLevelOperation) Metadata
func(op*UpdateAccessLevelOperation)Metadata()(*accesscontextmanagerpb.AccessContextManagerOperationMetadata,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 (*UpdateAccessLevelOperation) Name
func(op*UpdateAccessLevelOperation)Name()stringName 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
func(op*UpdateAccessLevelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.AccessLevel,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 andthe 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
func(op*UpdateAccessLevelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.AccessLevel,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.
UpdateAccessPolicyOperation
typeUpdateAccessPolicyOperationstruct{// contains filtered or unexported fields}UpdateAccessPolicyOperation manages a long-running operation from UpdateAccessPolicy.
func (*UpdateAccessPolicyOperation) Done
func(op*UpdateAccessPolicyOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateAccessPolicyOperation) Metadata
func(op*UpdateAccessPolicyOperation)Metadata()(*accesscontextmanagerpb.AccessContextManagerOperationMetadata,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*UpdateAccessPolicyOperation)Name()stringName 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*UpdateAccessPolicyOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.AccessPolicy,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 andthe 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*UpdateAccessPolicyOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.AccessPolicy,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.
UpdateGcpUserAccessBindingOperation
typeUpdateGcpUserAccessBindingOperationstruct{// contains filtered or unexported fields}UpdateGcpUserAccessBindingOperation manages a long-running operation from UpdateGcpUserAccessBinding.
func (*UpdateGcpUserAccessBindingOperation) Done
func(op*UpdateGcpUserAccessBindingOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateGcpUserAccessBindingOperation) Metadata
func(op*UpdateGcpUserAccessBindingOperation)Metadata()(*accesscontextmanagerpb.GcpUserAccessBindingOperationMetadata,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 (*UpdateGcpUserAccessBindingOperation) Name
func(op*UpdateGcpUserAccessBindingOperation)Name()stringName 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
func(op*UpdateGcpUserAccessBindingOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.GcpUserAccessBinding,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 andthe 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
func(op*UpdateGcpUserAccessBindingOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.GcpUserAccessBinding,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.
UpdateServicePerimeterOperation
typeUpdateServicePerimeterOperationstruct{// contains filtered or unexported fields}UpdateServicePerimeterOperation manages a long-running operation from UpdateServicePerimeter.
func (*UpdateServicePerimeterOperation) Done
func(op*UpdateServicePerimeterOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateServicePerimeterOperation) Metadata
func(op*UpdateServicePerimeterOperation)Metadata()(*accesscontextmanagerpb.AccessContextManagerOperationMetadata,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 (*UpdateServicePerimeterOperation) Name
func(op*UpdateServicePerimeterOperation)Name()stringName 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
func(op*UpdateServicePerimeterOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.ServicePerimeter,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 andthe 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
func(op*UpdateServicePerimeterOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*accesscontextmanagerpb.ServicePerimeter,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.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.