Package accesscontextmanager is an auto-generated package for the Access Context Manager API.
An API for setting attribute based access control to requests to GCP services.
NOTE: This package is in beta. It is not stable, and may be subject to changes.
Example usage
To get started with this package, create a client.
ctx := context.Background() c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client
The following is an example of making an API call with the newly created client.
ctx := context.Background() c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &accesscontextmanagerpb.ListAccessPoliciesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#ListAccessPoliciesRequest. } it := c.ListAccessPolicies(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Use of Context
The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go.
Functions
func DefaultAuthScopes
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
AccessLevelIterator
type AccessLevelIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*accesscontextmanagerpb.AccessLevel, nextPageToken string, err error)
// contains filtered or unexported fields
}
AccessLevelIterator manages a stream of *accesscontextmanagerpb.AccessLevel.
func (*AccessLevelIterator) Next
func (it *AccessLevelIterator) Next() (*accesscontextmanagerpb.AccessLevel, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*AccessLevelIterator) PageInfo
func (it *AccessLevelIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
AccessPolicyIterator
type AccessPolicyIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*accesscontextmanagerpb.AccessPolicy, nextPageToken string, err error)
// contains filtered or unexported fields
}
AccessPolicyIterator manages a stream of *accesscontextmanagerpb.AccessPolicy.
func (*AccessPolicyIterator) Next
func (it *AccessPolicyIterator) Next() (*accesscontextmanagerpb.AccessPolicy, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*AccessPolicyIterator) PageInfo
func (it *AccessPolicyIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
CallOptions
type CallOptions struct {
ListAccessPolicies []gax.CallOption
GetAccessPolicy []gax.CallOption
CreateAccessPolicy []gax.CallOption
UpdateAccessPolicy []gax.CallOption
DeleteAccessPolicy []gax.CallOption
ListAccessLevels []gax.CallOption
GetAccessLevel []gax.CallOption
CreateAccessLevel []gax.CallOption
UpdateAccessLevel []gax.CallOption
DeleteAccessLevel []gax.CallOption
ReplaceAccessLevels []gax.CallOption
ListServicePerimeters []gax.CallOption
GetServicePerimeter []gax.CallOption
CreateServicePerimeter []gax.CallOption
UpdateServicePerimeter []gax.CallOption
DeleteServicePerimeter []gax.CallOption
ReplaceServicePerimeters []gax.CallOption
CommitServicePerimeters []gax.CallOption
ListGcpUserAccessBindings []gax.CallOption
GetGcpUserAccessBinding []gax.CallOption
CreateGcpUserAccessBinding []gax.CallOption
UpdateGcpUserAccessBinding []gax.CallOption
DeleteGcpUserAccessBinding []gax.CallOption
}
CallOptions contains the retry settings for each method of Client.
Client
type Client struct {
// The call options for this service.
CallOptions *CallOptions
// LROClient is used internally to handle long-running operations.
// It is exposed so that its CallOptions can be modified if required.
// Users should not Close this client.
LROClient *lroauto.OperationsClient
// contains filtered or unexported fields
}
Client is a client for interacting with Access Context Manager API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
API for setting [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] and [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] for Google Cloud Projects. Each organization has one [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] containing the [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] and [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter]. This [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] is applicable 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 [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] for Google Cloud Projects. Each organization has one [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] containing the [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] and [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter]. This [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] is applicable to all resources in the organization. AccessPolicies
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*Client) Close
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*Client) CommitServicePerimeters
func (c *Client) CommitServicePerimeters(ctx context.Context, req *accesscontextmanagerpb.CommitServicePerimetersRequest, opts ...gax.CallOption) (*CommitServicePerimetersOperation, error)
CommitServicePerimeters commit the dry-run spec for all the [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [Access Policy][google.identity.accesscontextmanager.v1.AccessPolicy]. A commit operation on a Service Perimeter involves copying its spec field to that Service Perimeter’s status field. Only [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] with use_explicit_dry_run_spec field set to true are affected by a commit operation. The longrunning operation from this RPC will have a successful status once the dry-run specs for all the [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] have been committed. If a commit fails, it will cause the longrunning operation to return an error response and the entire commit operation will be cancelled. When successful, Operation.response field will contain CommitServicePerimetersResponse. The dry_run and the spec fields will be cleared after a successful commit operation.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.CommitServicePerimetersRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#CommitServicePerimetersRequest.
}
op, err := c.CommitServicePerimeters(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CommitServicePerimetersOperation
func (c *Client) CommitServicePerimetersOperation(name string) *CommitServicePerimetersOperation
CommitServicePerimetersOperation returns a new CommitServicePerimetersOperation from a given name. The name must be that of a previously created CommitServicePerimetersOperation, possibly from a different process.
func (*Client) Connection
func (c *Client) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*Client) CreateAccessLevel
func (c *Client) CreateAccessLevel(ctx context.Context, req *accesscontextmanagerpb.CreateAccessLevelRequest, opts ...gax.CallOption) (*CreateAccessLevelOperation, error)
CreateAccessLevel create an [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel]. The longrunning operation from this RPC will have a successful status once the [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] has propagated to long-lasting storage. [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] containing errors will result in an error response for the first error encountered.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.CreateAccessLevelRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#CreateAccessLevelRequest.
}
op, err := c.CreateAccessLevel(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateAccessLevelOperation
func (c *Client) CreateAccessLevelOperation(name string) *CreateAccessLevelOperation
CreateAccessLevelOperation returns a new CreateAccessLevelOperation from a given name. The name must be that of a previously created CreateAccessLevelOperation, possibly from a different process.
func (*Client) CreateAccessPolicy
func (c *Client) CreateAccessPolicy(ctx context.Context, req *accesscontextmanagerpb.AccessPolicy, opts ...gax.CallOption) (*CreateAccessPolicyOperation, error)
CreateAccessPolicy create an AccessPolicy. Fails if this organization already has a AccessPolicy. The longrunning Operation will have a successful status once the AccessPolicy has propagated to long-lasting storage. Syntactic and basic semantic errors will be returned in metadata as a BadRequest proto.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.AccessPolicy{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#AccessPolicy.
}
op, err := c.CreateAccessPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateAccessPolicyOperation
func (c *Client) CreateAccessPolicyOperation(name string) *CreateAccessPolicyOperation
CreateAccessPolicyOperation returns a new CreateAccessPolicyOperation from a given name. The name must be that of a previously created CreateAccessPolicyOperation, possibly from a different process.
func (*Client) CreateGcpUserAccessBinding
func (c *Client) CreateGcpUserAccessBinding(ctx context.Context, req *accesscontextmanagerpb.CreateGcpUserAccessBindingRequest, opts ...gax.CallOption) (*CreateGcpUserAccessBindingOperation, error)
CreateGcpUserAccessBinding creates a [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the client specifies a [name] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name (at http://google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name)], the server will ignore it. Fails if a resource already exists with the same [group_key] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. Completion of this long-running operation does not necessarily signify that the new binding is deployed onto all affected users, which may take more time.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.CreateGcpUserAccessBindingRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#CreateGcpUserAccessBindingRequest.
}
op, err := c.CreateGcpUserAccessBinding(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateGcpUserAccessBindingOperation
func (c *Client) CreateGcpUserAccessBindingOperation(name string) *CreateGcpUserAccessBindingOperation
CreateGcpUserAccessBindingOperation returns a new CreateGcpUserAccessBindingOperation from a given name. The name must be that of a previously created CreateGcpUserAccessBindingOperation, possibly from a different process.
func (*Client) CreateServicePerimeter
func (c *Client) CreateServicePerimeter(ctx context.Context, req *accesscontextmanagerpb.CreateServicePerimeterRequest, opts ...gax.CallOption) (*CreateServicePerimeterOperation, error)
CreateServicePerimeter create a [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. The longrunning operation from this RPC will have a successful status once the [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] has propagated to long-lasting storage. [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] containing errors will result in an error response for the first error encountered.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.CreateServicePerimeterRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#CreateServicePerimeterRequest.
}
op, err := c.CreateServicePerimeter(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateServicePerimeterOperation
func (c *Client) CreateServicePerimeterOperation(name string) *CreateServicePerimeterOperation
CreateServicePerimeterOperation returns a new CreateServicePerimeterOperation from a given name. The name must be that of a previously created CreateServicePerimeterOperation, possibly from a different process.
func (*Client) DeleteAccessLevel
func (c *Client) DeleteAccessLevel(ctx context.Context, req *accesscontextmanagerpb.DeleteAccessLevelRequest, opts ...gax.CallOption) (*DeleteAccessLevelOperation, error)
DeleteAccessLevel delete an [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] by resource name. The longrunning operation from this RPC will have a successful status once the [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] has been removed from long-lasting storage.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.DeleteAccessLevelRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#DeleteAccessLevelRequest.
}
op, err := c.DeleteAccessLevel(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteAccessLevelOperation
func (c *Client) DeleteAccessLevelOperation(name string) *DeleteAccessLevelOperation
DeleteAccessLevelOperation returns a new DeleteAccessLevelOperation from a given name. The name must be that of a previously created DeleteAccessLevelOperation, possibly from a different process.
func (*Client) DeleteAccessPolicy
func (c *Client) DeleteAccessPolicy(ctx context.Context, req *accesscontextmanagerpb.DeleteAccessPolicyRequest, opts ...gax.CallOption) (*DeleteAccessPolicyOperation, error)
DeleteAccessPolicy delete an [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] by resource name. The longrunning Operation will have a successful status once the [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] has been removed from long-lasting storage.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.DeleteAccessPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#DeleteAccessPolicyRequest.
}
op, err := c.DeleteAccessPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteAccessPolicyOperation
func (c *Client) DeleteAccessPolicyOperation(name string) *DeleteAccessPolicyOperation
DeleteAccessPolicyOperation returns a new DeleteAccessPolicyOperation from a given name. The name must be that of a previously created DeleteAccessPolicyOperation, possibly from a different process.
func (*Client) DeleteGcpUserAccessBinding
func (c *Client) DeleteGcpUserAccessBinding(ctx context.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 that the binding deletion is deployed onto all affected users, which may take more time.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.DeleteGcpUserAccessBindingRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#DeleteGcpUserAccessBindingRequest.
}
op, err := c.DeleteGcpUserAccessBinding(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteGcpUserAccessBindingOperation
func (c *Client) DeleteGcpUserAccessBindingOperation(name string) *DeleteGcpUserAccessBindingOperation
DeleteGcpUserAccessBindingOperation returns a new DeleteGcpUserAccessBindingOperation from a given name. The name must be that of a previously created DeleteGcpUserAccessBindingOperation, possibly from a different process.
func (*Client) DeleteServicePerimeter
func (c *Client) DeleteServicePerimeter(ctx context.Context, req *accesscontextmanagerpb.DeleteServicePerimeterRequest, opts ...gax.CallOption) (*DeleteServicePerimeterOperation, error)
DeleteServicePerimeter delete a [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] by resource name. The longrunning operation from this RPC will have a successful status once the [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] has been removed from long-lasting storage.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.DeleteServicePerimeterRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#DeleteServicePerimeterRequest.
}
op, err := c.DeleteServicePerimeter(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteServicePerimeterOperation
func (c *Client) DeleteServicePerimeterOperation(name string) *DeleteServicePerimeterOperation
DeleteServicePerimeterOperation returns a new DeleteServicePerimeterOperation from a given name. The name must be that of a previously created DeleteServicePerimeterOperation, possibly from a different process.
func (*Client) GetAccessLevel
func (c *Client) GetAccessLevel(ctx context.Context, req *accesscontextmanagerpb.GetAccessLevelRequest, opts ...gax.CallOption) (*accesscontextmanagerpb.AccessLevel, error)
GetAccessLevel get an [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] by resource name.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.GetAccessLevelRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#GetAccessLevelRequest.
}
resp, err := c.GetAccessLevel(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetAccessPolicy
func (c *Client) GetAccessPolicy(ctx context.Context, req *accesscontextmanagerpb.GetAccessPolicyRequest, opts ...gax.CallOption) (*accesscontextmanagerpb.AccessPolicy, error)
GetAccessPolicy get an [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] by name.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.GetAccessPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#GetAccessPolicyRequest.
}
resp, err := c.GetAccessPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetGcpUserAccessBinding
func (c *Client) GetGcpUserAccessBinding(ctx context.Context, req *accesscontextmanagerpb.GetGcpUserAccessBindingRequest, opts ...gax.CallOption) (*accesscontextmanagerpb.GcpUserAccessBinding, error)
GetGcpUserAccessBinding gets the [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with the given name.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.GetGcpUserAccessBindingRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#GetGcpUserAccessBindingRequest.
}
resp, err := c.GetGcpUserAccessBinding(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetServicePerimeter
func (c *Client) GetServicePerimeter(ctx context.Context, req *accesscontextmanagerpb.GetServicePerimeterRequest, opts ...gax.CallOption) (*accesscontextmanagerpb.ServicePerimeter, error)
GetServicePerimeter get a [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] by resource name.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.GetServicePerimeterRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#GetServicePerimeterRequest.
}
resp, err := c.GetServicePerimeter(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ListAccessLevels
func (c *Client) ListAccessLevels(ctx context.Context, req *accesscontextmanagerpb.ListAccessLevelsRequest, opts ...gax.CallOption) *AccessLevelIterator
ListAccessLevels list all [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] for an access policy.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
"google.golang.org/api/iterator"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.ListAccessLevelsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#ListAccessLevelsRequest.
}
it := c.ListAccessLevels(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListAccessPolicies
func (c *Client) ListAccessPolicies(ctx context.Context, req *accesscontextmanagerpb.ListAccessPoliciesRequest, opts ...gax.CallOption) *AccessPolicyIterator
ListAccessPolicies list all [AccessPolicies] [google.identity.accesscontextmanager.v1.AccessPolicy] under a container.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
"google.golang.org/api/iterator"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.ListAccessPoliciesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#ListAccessPoliciesRequest.
}
it := c.ListAccessPolicies(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListGcpUserAccessBindings
func (c *Client) ListGcpUserAccessBindings(ctx context.Context, req *accesscontextmanagerpb.ListGcpUserAccessBindingsRequest, opts ...gax.CallOption) *GcpUserAccessBindingIterator
ListGcpUserAccessBindings lists all [GcpUserAccessBindings] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a Google Cloud organization.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
"google.golang.org/api/iterator"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.ListGcpUserAccessBindingsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#ListGcpUserAccessBindingsRequest.
}
it := c.ListGcpUserAccessBindings(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListServicePerimeters
func (c *Client) ListServicePerimeters(ctx context.Context, req *accesscontextmanagerpb.ListServicePerimetersRequest, opts ...gax.CallOption) *ServicePerimeterIterator
ListServicePerimeters list all [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] for an access policy.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
"google.golang.org/api/iterator"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.ListServicePerimetersRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#ListServicePerimetersRequest.
}
it := c.ListServicePerimeters(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ReplaceAccessLevels
func (c *Client) ReplaceAccessLevels(ctx context.Context, req *accesscontextmanagerpb.ReplaceAccessLevelsRequest, opts ...gax.CallOption) (*ReplaceAccessLevelsOperation, error)
ReplaceAccessLevels replace all existing [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] in an [Access Policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] provided. This is done atomically. The longrunning operation from this RPC will have a successful status once all replacements have propagated to long-lasting storage. Replacements containing errors will result in an error response for the first error encountered. Replacement will be cancelled on error, existing [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] will not be affected. Operation.response field will contain ReplaceAccessLevelsResponse. Removing [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] will result in error.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.ReplaceAccessLevelsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#ReplaceAccessLevelsRequest.
}
op, err := c.ReplaceAccessLevels(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ReplaceAccessLevelsOperation
func (c *Client) ReplaceAccessLevelsOperation(name string) *ReplaceAccessLevelsOperation
ReplaceAccessLevelsOperation returns a new ReplaceAccessLevelsOperation from a given name. The name must be that of a previously created ReplaceAccessLevelsOperation, possibly from a different process.
func (*Client) ReplaceServicePerimeters
func (c *Client) ReplaceServicePerimeters(ctx context.Context, req *accesscontextmanagerpb.ReplaceServicePerimetersRequest, opts ...gax.CallOption) (*ReplaceServicePerimetersOperation, error)
ReplaceServicePerimeters replace all existing [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [Access Policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This is done atomically. The longrunning operation from this RPC will have a successful status once all replacements have propagated to long-lasting storage. Replacements containing errors will result in an error response for the first error encountered. Replacement will be cancelled on error, existing [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] will not be affected. Operation.response field will contain ReplaceServicePerimetersResponse.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.ReplaceServicePerimetersRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#ReplaceServicePerimetersRequest.
}
op, err := c.ReplaceServicePerimeters(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ReplaceServicePerimetersOperation
func (c *Client) ReplaceServicePerimetersOperation(name string) *ReplaceServicePerimetersOperation
ReplaceServicePerimetersOperation returns a new ReplaceServicePerimetersOperation from a given name. The name must be that of a previously created ReplaceServicePerimetersOperation, possibly from a different process.
func (*Client) UpdateAccessLevel
func (c *Client) UpdateAccessLevel(ctx context.Context, req *accesscontextmanagerpb.UpdateAccessLevelRequest, opts ...gax.CallOption) (*UpdateAccessLevelOperation, error)
UpdateAccessLevel update an [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel]. The longrunning operation from this RPC will have a successful status once the changes to the [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] have propagated to long-lasting storage. [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] containing errors will result in an error response for the first error encountered.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.UpdateAccessLevelRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#UpdateAccessLevelRequest.
}
op, err := c.UpdateAccessLevel(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateAccessLevelOperation
func (c *Client) UpdateAccessLevelOperation(name string) *UpdateAccessLevelOperation
UpdateAccessLevelOperation returns a new UpdateAccessLevelOperation from a given name. The name must be that of a previously created UpdateAccessLevelOperation, possibly from a different process.
func (*Client) UpdateAccessPolicy
func (c *Client) UpdateAccessPolicy(ctx context.Context, req *accesscontextmanagerpb.UpdateAccessPolicyRequest, opts ...gax.CallOption) (*UpdateAccessPolicyOperation, error)
UpdateAccessPolicy update an [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy]. The longrunning Operation from this RPC will have a successful status once the changes to the [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] have propagated to long-lasting storage. Syntactic and basic semantic errors will be returned in metadata as a BadRequest proto.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.UpdateAccessPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#UpdateAccessPolicyRequest.
}
op, err := c.UpdateAccessPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateAccessPolicyOperation
func (c *Client) UpdateAccessPolicyOperation(name string) *UpdateAccessPolicyOperation
UpdateAccessPolicyOperation returns a new UpdateAccessPolicyOperation from a given name. The name must be that of a previously created UpdateAccessPolicyOperation, possibly from a different process.
func (*Client) UpdateGcpUserAccessBinding
func (c *Client) UpdateGcpUserAccessBinding(ctx context.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 that the changed binding is deployed onto all affected users, which may take more time.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.UpdateGcpUserAccessBindingRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#UpdateGcpUserAccessBindingRequest.
}
op, err := c.UpdateGcpUserAccessBinding(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateGcpUserAccessBindingOperation
func (c *Client) UpdateGcpUserAccessBindingOperation(name string) *UpdateGcpUserAccessBindingOperation
UpdateGcpUserAccessBindingOperation returns a new UpdateGcpUserAccessBindingOperation from a given name. The name must be that of a previously created UpdateGcpUserAccessBindingOperation, possibly from a different process.
func (*Client) UpdateServicePerimeter
func (c *Client) UpdateServicePerimeter(ctx context.Context, req *accesscontextmanagerpb.UpdateServicePerimeterRequest, opts ...gax.CallOption) (*UpdateServicePerimeterOperation, error)
UpdateServicePerimeter update a [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. The longrunning operation from this RPC will have a successful status once the changes to the [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] have propagated to long-lasting storage. [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] containing errors will result in an error response for the first error encountered.
Example
package main
import (
"context"
accesscontextmanager "cloud.google.com/go/accesscontextmanager/apiv1"
accesscontextmanagerpb "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1"
)
func main() {
ctx := context.Background()
c, err := accesscontextmanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &accesscontextmanagerpb.UpdateServicePerimeterRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#UpdateServicePerimeterRequest.
}
op, err := c.UpdateServicePerimeter(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateServicePerimeterOperation
func (c *Client) UpdateServicePerimeterOperation(name string) *UpdateServicePerimeterOperation
UpdateServicePerimeterOperation returns a new UpdateServicePerimeterOperation from a given name. The name must be that of a previously created UpdateServicePerimeterOperation, possibly from a different process.
CommitServicePerimetersOperation
type CommitServicePerimetersOperation struct {
// contains filtered or unexported fields
}
CommitServicePerimetersOperation manages a long-running operation from CommitServicePerimeters.
func (*CommitServicePerimetersOperation) Done
func (op *CommitServicePerimetersOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CommitServicePerimetersOperation) Poll
func (op *CommitServicePerimetersOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CommitServicePerimetersOperation) Wait
func (op *CommitServicePerimetersOperation) Wait(ctx context.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
type CreateAccessLevelOperation struct {
// contains filtered or unexported fields
}
CreateAccessLevelOperation manages a long-running operation from CreateAccessLevel.
func (*CreateAccessLevelOperation) Done
func (op *CreateAccessLevelOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateAccessLevelOperation) Metadata
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateAccessLevelOperation) Poll
func (op *CreateAccessLevelOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateAccessLevelOperation) Wait
func (op *CreateAccessLevelOperation) Wait(ctx context.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
type CreateAccessPolicyOperation struct {
// contains filtered or unexported fields
}
CreateAccessPolicyOperation manages a long-running operation from CreateAccessPolicy.
func (*CreateAccessPolicyOperation) Done
func (op *CreateAccessPolicyOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateAccessPolicyOperation) Metadata
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateAccessPolicyOperation) Poll
func (op *CreateAccessPolicyOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateAccessPolicyOperation) Wait
func (op *CreateAccessPolicyOperation) Wait(ctx context.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
type CreateGcpUserAccessBindingOperation struct {
// contains filtered or unexported fields
}
CreateGcpUserAccessBindingOperation manages a long-running operation from CreateGcpUserAccessBinding.
func (*CreateGcpUserAccessBindingOperation) Done
func (op *CreateGcpUserAccessBindingOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateGcpUserAccessBindingOperation) Poll
func (op *CreateGcpUserAccessBindingOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateGcpUserAccessBindingOperation) Wait
func (op *CreateGcpUserAccessBindingOperation) Wait(ctx context.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
type CreateServicePerimeterOperation struct {
// contains filtered or unexported fields
}
CreateServicePerimeterOperation manages a long-running operation from CreateServicePerimeter.
func (*CreateServicePerimeterOperation) Done
func (op *CreateServicePerimeterOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateServicePerimeterOperation) Poll
func (op *CreateServicePerimeterOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateServicePerimeterOperation) Wait
func (op *CreateServicePerimeterOperation) Wait(ctx context.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
type DeleteAccessLevelOperation struct {
// contains filtered or unexported fields
}
DeleteAccessLevelOperation manages a long-running operation from DeleteAccessLevel.
func (*DeleteAccessLevelOperation) Done
func (op *DeleteAccessLevelOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteAccessLevelOperation) Metadata
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteAccessLevelOperation) Poll
func (op *DeleteAccessLevelOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteAccessLevelOperation) Wait
func (op *DeleteAccessLevelOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteAccessPolicyOperation
type DeleteAccessPolicyOperation struct {
// contains filtered or unexported fields
}
DeleteAccessPolicyOperation manages a long-running operation from DeleteAccessPolicy.
func (*DeleteAccessPolicyOperation) Done
func (op *DeleteAccessPolicyOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteAccessPolicyOperation) Poll
func (op *DeleteAccessPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteAccessPolicyOperation) Wait
func (op *DeleteAccessPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) 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.
DeleteGcpUserAccessBindingOperation
type DeleteGcpUserAccessBindingOperation struct {
// contains filtered or unexported fields
}
DeleteGcpUserAccessBindingOperation manages a long-running operation from DeleteGcpUserAccessBinding.
func (*DeleteGcpUserAccessBindingOperation) Done
func (op *DeleteGcpUserAccessBindingOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteGcpUserAccessBindingOperation) Poll
func (op *DeleteGcpUserAccessBindingOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteGcpUserAccessBindingOperation) Wait
func (op *DeleteGcpUserAccessBindingOperation) Wait(ctx context.Context, opts ...gax.CallOption) 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.
DeleteServicePerimeterOperation
type DeleteServicePerimeterOperation struct {
// contains filtered or unexported fields
}
DeleteServicePerimeterOperation manages a long-running operation from DeleteServicePerimeter.
func (*DeleteServicePerimeterOperation) Done
func (op *DeleteServicePerimeterOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteServicePerimeterOperation) Poll
func (op *DeleteServicePerimeterOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteServicePerimeterOperation) Wait
func (op *DeleteServicePerimeterOperation) Wait(ctx context.Context, opts ...gax.CallOption) 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.
GcpUserAccessBindingIterator
type GcpUserAccessBindingIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*accesscontextmanagerpb.GcpUserAccessBinding, nextPageToken string, err error)
// contains filtered or unexported fields
}
GcpUserAccessBindingIterator manages a stream of *accesscontextmanagerpb.GcpUserAccessBinding.
func (*GcpUserAccessBindingIterator) Next
func (it *GcpUserAccessBindingIterator) Next() (*accesscontextmanagerpb.GcpUserAccessBinding, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*GcpUserAccessBindingIterator) PageInfo
func (it *GcpUserAccessBindingIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
ReplaceAccessLevelsOperation
type ReplaceAccessLevelsOperation struct {
// contains filtered or unexported fields
}
ReplaceAccessLevelsOperation manages a long-running operation from ReplaceAccessLevels.
func (*ReplaceAccessLevelsOperation) Done
func (op *ReplaceAccessLevelsOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*ReplaceAccessLevelsOperation) Poll
func (op *ReplaceAccessLevelsOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ReplaceAccessLevelsOperation) Wait
func (op *ReplaceAccessLevelsOperation) Wait(ctx context.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
type ReplaceServicePerimetersOperation struct {
// contains filtered or unexported fields
}
ReplaceServicePerimetersOperation manages a long-running operation from ReplaceServicePerimeters.
func (*ReplaceServicePerimetersOperation) Done
func (op *ReplaceServicePerimetersOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*ReplaceServicePerimetersOperation) Poll
func (op *ReplaceServicePerimetersOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ReplaceServicePerimetersOperation) Wait
func (op *ReplaceServicePerimetersOperation) Wait(ctx context.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
type ServicePerimeterIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*accesscontextmanagerpb.ServicePerimeter, nextPageToken string, err error)
// contains filtered or unexported fields
}
ServicePerimeterIterator manages a stream of *accesscontextmanagerpb.ServicePerimeter.
func (*ServicePerimeterIterator) Next
func (it *ServicePerimeterIterator) Next() (*accesscontextmanagerpb.ServicePerimeter, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ServicePerimeterIterator) PageInfo
func (it *ServicePerimeterIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
UpdateAccessLevelOperation
type UpdateAccessLevelOperation struct {
// contains filtered or unexported fields
}
UpdateAccessLevelOperation manages a long-running operation from UpdateAccessLevel.
func (*UpdateAccessLevelOperation) Done
func (op *UpdateAccessLevelOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateAccessLevelOperation) Metadata
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateAccessLevelOperation) Poll
func (op *UpdateAccessLevelOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateAccessLevelOperation) Wait
func (op *UpdateAccessLevelOperation) Wait(ctx context.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
type UpdateAccessPolicyOperation struct {
// contains filtered or unexported fields
}
UpdateAccessPolicyOperation manages a long-running operation from UpdateAccessPolicy.
func (*UpdateAccessPolicyOperation) Done
func (op *UpdateAccessPolicyOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateAccessPolicyOperation) Metadata
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateAccessPolicyOperation) Poll
func (op *UpdateAccessPolicyOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateAccessPolicyOperation) Wait
func (op *UpdateAccessPolicyOperation) Wait(ctx context.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
type UpdateGcpUserAccessBindingOperation struct {
// contains filtered or unexported fields
}
UpdateGcpUserAccessBindingOperation manages a long-running operation from UpdateGcpUserAccessBinding.
func (*UpdateGcpUserAccessBindingOperation) Done
func (op *UpdateGcpUserAccessBindingOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateGcpUserAccessBindingOperation) Poll
func (op *UpdateGcpUserAccessBindingOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateGcpUserAccessBindingOperation) Wait
func (op *UpdateGcpUserAccessBindingOperation) Wait(ctx context.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
type UpdateServicePerimeterOperation struct {
// contains filtered or unexported fields
}
UpdateServicePerimeterOperation manages a long-running operation from UpdateServicePerimeter.
func (*UpdateServicePerimeterOperation) Done
func (op *UpdateServicePerimeterOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateServicePerimeterOperation) Poll
func (op *UpdateServicePerimeterOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateServicePerimeterOperation) Wait
func (op *UpdateServicePerimeterOperation) Wait(ctx context.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.