Cloud Workstations API v1 - Package cloud.google.com/go/workstations/apiv1 (v1.1.6) Stay organized with collections Save and categorize content based on your preferences.
Package workstations is an auto-generated package for theCloud Workstations API.
Allows administrators to create managed developer environments in thecloud.
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/workstations/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:=workstations.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:=&workstationspb.CreateWorkstationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#CreateWorkstationRequest.}op,err:=c.CreateWorkstation(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.
CallOptions
typeCallOptionsstruct{GetWorkstationCluster[]gax.CallOptionListWorkstationClusters[]gax.CallOptionCreateWorkstationCluster[]gax.CallOptionUpdateWorkstationCluster[]gax.CallOptionDeleteWorkstationCluster[]gax.CallOptionGetWorkstationConfig[]gax.CallOptionListWorkstationConfigs[]gax.CallOptionListUsableWorkstationConfigs[]gax.CallOptionCreateWorkstationConfig[]gax.CallOptionUpdateWorkstationConfig[]gax.CallOptionDeleteWorkstationConfig[]gax.CallOptionGetWorkstation[]gax.CallOptionListWorkstations[]gax.CallOptionListUsableWorkstations[]gax.CallOptionCreateWorkstation[]gax.CallOptionUpdateWorkstation[]gax.CallOptionDeleteWorkstation[]gax.CallOptionStartWorkstation[]gax.CallOptionStopWorkstation[]gax.CallOptionGenerateAccessToken[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]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 Cloud Workstations API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service for interacting with Cloud Workstations.
func NewClient
NewClient creates a new workstations client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Service for interacting with Cloud Workstations.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewRESTClient
NewRESTClient creates a new workstations rest client.
Service for interacting with Cloud Workstations.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/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:=workstations.NewRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*Client) CancelOperation
func(c*Client)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"workstations"cloud.google.com/go/workstations/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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.CancelOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.}err=c.CancelOperation(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) Close
Close closes the connection to the API service. The user should invoke this whenthe client is no longer required.
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) CreateWorkstation
func(c*Client)CreateWorkstation(ctxcontext.Context,req*workstationspb.CreateWorkstationRequest,opts...gax.CallOption)(*CreateWorkstationOperation,error)CreateWorkstation creates a new workstation.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.CreateWorkstationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#CreateWorkstationRequest.}op,err:=c.CreateWorkstation(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateWorkstationCluster
func(c*Client)CreateWorkstationCluster(ctxcontext.Context,req*workstationspb.CreateWorkstationClusterRequest,opts...gax.CallOption)(*CreateWorkstationClusterOperation,error)CreateWorkstationCluster creates a new workstation cluster.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.CreateWorkstationClusterRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#CreateWorkstationClusterRequest.}op,err:=c.CreateWorkstationCluster(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateWorkstationClusterOperation
func(c*Client)CreateWorkstationClusterOperation(namestring)*CreateWorkstationClusterOperationCreateWorkstationClusterOperation returns a new CreateWorkstationClusterOperation from a given name.The name must be that of a previously created CreateWorkstationClusterOperation, possibly from a different process.
func (*Client) CreateWorkstationConfig
func(c*Client)CreateWorkstationConfig(ctxcontext.Context,req*workstationspb.CreateWorkstationConfigRequest,opts...gax.CallOption)(*CreateWorkstationConfigOperation,error)CreateWorkstationConfig creates a new workstation configuration.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.CreateWorkstationConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#CreateWorkstationConfigRequest.}op,err:=c.CreateWorkstationConfig(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateWorkstationConfigOperation
func(c*Client)CreateWorkstationConfigOperation(namestring)*CreateWorkstationConfigOperationCreateWorkstationConfigOperation returns a new CreateWorkstationConfigOperation from a given name.The name must be that of a previously created CreateWorkstationConfigOperation, possibly from a different process.
func (*Client) CreateWorkstationOperation
func(c*Client)CreateWorkstationOperation(namestring)*CreateWorkstationOperationCreateWorkstationOperation returns a new CreateWorkstationOperation from a given name.The name must be that of a previously created CreateWorkstationOperation, possibly from a different process.
func (*Client) DeleteOperation
func(c*Client)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"workstations"cloud.google.com/go/workstations/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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.DeleteOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.}err=c.DeleteOperation(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteWorkstation
func(c*Client)DeleteWorkstation(ctxcontext.Context,req*workstationspb.DeleteWorkstationRequest,opts...gax.CallOption)(*DeleteWorkstationOperation,error)DeleteWorkstation deletes the specified workstation.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.DeleteWorkstationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#DeleteWorkstationRequest.}op,err:=c.DeleteWorkstation(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) DeleteWorkstationCluster
func(c*Client)DeleteWorkstationCluster(ctxcontext.Context,req*workstationspb.DeleteWorkstationClusterRequest,opts...gax.CallOption)(*DeleteWorkstationClusterOperation,error)DeleteWorkstationCluster deletes the specified workstation cluster.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.DeleteWorkstationClusterRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#DeleteWorkstationClusterRequest.}op,err:=c.DeleteWorkstationCluster(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) DeleteWorkstationClusterOperation
func(c*Client)DeleteWorkstationClusterOperation(namestring)*DeleteWorkstationClusterOperationDeleteWorkstationClusterOperation returns a new DeleteWorkstationClusterOperation from a given name.The name must be that of a previously created DeleteWorkstationClusterOperation, possibly from a different process.
func (*Client) DeleteWorkstationConfig
func(c*Client)DeleteWorkstationConfig(ctxcontext.Context,req*workstationspb.DeleteWorkstationConfigRequest,opts...gax.CallOption)(*DeleteWorkstationConfigOperation,error)DeleteWorkstationConfig deletes the specified workstation configuration.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.DeleteWorkstationConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#DeleteWorkstationConfigRequest.}op,err:=c.DeleteWorkstationConfig(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) DeleteWorkstationConfigOperation
func(c*Client)DeleteWorkstationConfigOperation(namestring)*DeleteWorkstationConfigOperationDeleteWorkstationConfigOperation returns a new DeleteWorkstationConfigOperation from a given name.The name must be that of a previously created DeleteWorkstationConfigOperation, possibly from a different process.
func (*Client) DeleteWorkstationOperation
func(c*Client)DeleteWorkstationOperation(namestring)*DeleteWorkstationOperationDeleteWorkstationOperation returns a new DeleteWorkstationOperation from a given name.The name must be that of a previously created DeleteWorkstationOperation, possibly from a different process.
func (*Client) GenerateAccessToken
func(c*Client)GenerateAccessToken(ctxcontext.Context,req*workstationspb.GenerateAccessTokenRequest,opts...gax.CallOption)(*workstationspb.GenerateAccessTokenResponse,error)GenerateAccessToken returns a short-lived credential that can be used to send authenticated andauthorized traffic to a workstation.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.GenerateAccessTokenRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#GenerateAccessTokenRequest.}resp,err:=c.GenerateAccessToken(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 access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"iampb"cloud.google.com/go/iam/apiv1/iampb"workstations"cloud.google.com/go/workstations/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:=workstations.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"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"workstations"cloud.google.com/go/workstations/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:=workstations.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) GetWorkstation
func(c*Client)GetWorkstation(ctxcontext.Context,req*workstationspb.GetWorkstationRequest,opts...gax.CallOption)(*workstationspb.Workstation,error)GetWorkstation returns the requested workstation.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.GetWorkstationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#GetWorkstationRequest.}resp,err:=c.GetWorkstation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetWorkstationCluster
func(c*Client)GetWorkstationCluster(ctxcontext.Context,req*workstationspb.GetWorkstationClusterRequest,opts...gax.CallOption)(*workstationspb.WorkstationCluster,error)GetWorkstationCluster returns the requested workstation cluster.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.GetWorkstationClusterRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#GetWorkstationClusterRequest.}resp,err:=c.GetWorkstationCluster(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetWorkstationConfig
func(c*Client)GetWorkstationConfig(ctxcontext.Context,req*workstationspb.GetWorkstationConfigRequest,opts...gax.CallOption)(*workstationspb.WorkstationConfig,error)GetWorkstationConfig returns the requested workstation configuration.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.GetWorkstationConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#GetWorkstationConfigRequest.}resp,err:=c.GetWorkstationConfig(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ListOperations
func(c*Client)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"workstations"cloud.google.com/go/workstations/apiv1""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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}it:=c.ListOperations(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.(*longrunningpb.ListOperationsResponse)}}all
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"workstations"cloud.google.com/go/workstations/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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}forresp,err:=rangec.ListOperations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListUsableWorkstationConfigs
func(c*Client)ListUsableWorkstationConfigs(ctxcontext.Context,req*workstationspb.ListUsableWorkstationConfigsRequest,opts...gax.CallOption)*WorkstationConfigIteratorListUsableWorkstationConfigs returns all workstation configurations in the specified cluster on whichthe caller has the “workstations.workstation.create” permission.
Examples
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb""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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.ListUsableWorkstationConfigsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#ListUsableWorkstationConfigsRequest.}it:=c.ListUsableWorkstationConfigs(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.(*workstationspb.ListUsableWorkstationConfigsResponse)}}all
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.ListUsableWorkstationConfigsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#ListUsableWorkstationConfigsRequest.}forresp,err:=rangec.ListUsableWorkstationConfigs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListUsableWorkstations
func(c*Client)ListUsableWorkstations(ctxcontext.Context,req*workstationspb.ListUsableWorkstationsRequest,opts...gax.CallOption)*WorkstationIteratorListUsableWorkstations returns all workstations using the specified workstation configurationon which the caller has the “workstations.workstations.use” permission.
Examples
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb""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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.ListUsableWorkstationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#ListUsableWorkstationsRequest.}it:=c.ListUsableWorkstations(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.(*workstationspb.ListUsableWorkstationsResponse)}}all
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.ListUsableWorkstationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#ListUsableWorkstationsRequest.}forresp,err:=rangec.ListUsableWorkstations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListWorkstationClusters
func(c*Client)ListWorkstationClusters(ctxcontext.Context,req*workstationspb.ListWorkstationClustersRequest,opts...gax.CallOption)*WorkstationClusterIteratorListWorkstationClusters returns all workstation clusters in the specified location.
Examples
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb""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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.ListWorkstationClustersRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#ListWorkstationClustersRequest.}it:=c.ListWorkstationClusters(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.(*workstationspb.ListWorkstationClustersResponse)}}all
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.ListWorkstationClustersRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#ListWorkstationClustersRequest.}forresp,err:=rangec.ListWorkstationClusters(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListWorkstationConfigs
func(c*Client)ListWorkstationConfigs(ctxcontext.Context,req*workstationspb.ListWorkstationConfigsRequest,opts...gax.CallOption)*WorkstationConfigIteratorListWorkstationConfigs returns all workstation configurations in the specified cluster.
Examples
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb""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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.ListWorkstationConfigsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#ListWorkstationConfigsRequest.}it:=c.ListWorkstationConfigs(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.(*workstationspb.ListWorkstationConfigsResponse)}}all
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.ListWorkstationConfigsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#ListWorkstationConfigsRequest.}forresp,err:=rangec.ListWorkstationConfigs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListWorkstations
func(c*Client)ListWorkstations(ctxcontext.Context,req*workstationspb.ListWorkstationsRequest,opts...gax.CallOption)*WorkstationIteratorListWorkstations returns all Workstations using the specified workstation configuration.
Examples
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb""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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.ListWorkstationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#ListWorkstationsRequest.}it:=c.ListWorkstations(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.(*workstationspb.ListWorkstationsResponse)}}all
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.ListWorkstationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#ListWorkstationsRequest.}forresp,err:=rangec.ListWorkstations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) SetIamPolicy
func(c*Client)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"iampb"cloud.google.com/go/iam/apiv1/iampb"workstations"cloud.google.com/go/workstations/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:=workstations.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) StartWorkstation
func(c*Client)StartWorkstation(ctxcontext.Context,req*workstationspb.StartWorkstationRequest,opts...gax.CallOption)(*StartWorkstationOperation,error)StartWorkstation starts running a workstation so that users can connect to it.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.StartWorkstationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#StartWorkstationRequest.}op,err:=c.StartWorkstation(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) StartWorkstationOperation
func(c*Client)StartWorkstationOperation(namestring)*StartWorkstationOperationStartWorkstationOperation returns a new StartWorkstationOperation from a given name.The name must be that of a previously created StartWorkstationOperation, possibly from a different process.
func (*Client) StopWorkstation
func(c*Client)StopWorkstation(ctxcontext.Context,req*workstationspb.StopWorkstationRequest,opts...gax.CallOption)(*StopWorkstationOperation,error)StopWorkstation stops running a workstation, reducing costs.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.StopWorkstationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#StopWorkstationRequest.}op,err:=c.StopWorkstation(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) StopWorkstationOperation
func(c*Client)StopWorkstationOperation(namestring)*StopWorkstationOperationStopWorkstationOperation returns a new StopWorkstationOperation from a given name.The name must be that of a previously created StopWorkstationOperation, possibly from a different process.
func (*Client) TestIamPermissions
func(c*Client)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"iampb"cloud.google.com/go/iam/apiv1/iampb"workstations"cloud.google.com/go/workstations/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:=workstations.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) UpdateWorkstation
func(c*Client)UpdateWorkstation(ctxcontext.Context,req*workstationspb.UpdateWorkstationRequest,opts...gax.CallOption)(*UpdateWorkstationOperation,error)UpdateWorkstation updates an existing workstation.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.UpdateWorkstationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#UpdateWorkstationRequest.}op,err:=c.UpdateWorkstation(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateWorkstationCluster
func(c*Client)UpdateWorkstationCluster(ctxcontext.Context,req*workstationspb.UpdateWorkstationClusterRequest,opts...gax.CallOption)(*UpdateWorkstationClusterOperation,error)UpdateWorkstationCluster updates an existing workstation cluster.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.UpdateWorkstationClusterRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#UpdateWorkstationClusterRequest.}op,err:=c.UpdateWorkstationCluster(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateWorkstationClusterOperation
func(c*Client)UpdateWorkstationClusterOperation(namestring)*UpdateWorkstationClusterOperationUpdateWorkstationClusterOperation returns a new UpdateWorkstationClusterOperation from a given name.The name must be that of a previously created UpdateWorkstationClusterOperation, possibly from a different process.
func (*Client) UpdateWorkstationConfig
func(c*Client)UpdateWorkstationConfig(ctxcontext.Context,req*workstationspb.UpdateWorkstationConfigRequest,opts...gax.CallOption)(*UpdateWorkstationConfigOperation,error)UpdateWorkstationConfig updates an existing workstation configuration.
Example
packagemainimport("context"workstations"cloud.google.com/go/workstations/apiv1"workstationspb"cloud.google.com/go/workstations/apiv1/workstationspb")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:=workstations.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&workstationspb.UpdateWorkstationConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/workstations/apiv1/workstationspb#UpdateWorkstationConfigRequest.}op,err:=c.UpdateWorkstationConfig(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateWorkstationConfigOperation
func(c*Client)UpdateWorkstationConfigOperation(namestring)*UpdateWorkstationConfigOperationUpdateWorkstationConfigOperation returns a new UpdateWorkstationConfigOperation from a given name.The name must be that of a previously created UpdateWorkstationConfigOperation, possibly from a different process.
func (*Client) UpdateWorkstationOperation
func(c*Client)UpdateWorkstationOperation(namestring)*UpdateWorkstationOperationUpdateWorkstationOperation returns a new UpdateWorkstationOperation from a given name.The name must be that of a previously created UpdateWorkstationOperation, possibly from a different process.
CreateWorkstationClusterOperation
typeCreateWorkstationClusterOperationstruct{// contains filtered or unexported fields}CreateWorkstationClusterOperation manages a long-running operation from CreateWorkstationCluster.
func (*CreateWorkstationClusterOperation) Done
func(op*CreateWorkstationClusterOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateWorkstationClusterOperation) Metadata
func(op*CreateWorkstationClusterOperation)Metadata()(*workstationspb.OperationMetadata,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 (*CreateWorkstationClusterOperation) Name
func(op*CreateWorkstationClusterOperation)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 (*CreateWorkstationClusterOperation) Poll
func(op*CreateWorkstationClusterOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.WorkstationCluster,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 (*CreateWorkstationClusterOperation) Wait
func(op*CreateWorkstationClusterOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.WorkstationCluster,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.
CreateWorkstationConfigOperation
typeCreateWorkstationConfigOperationstruct{// contains filtered or unexported fields}CreateWorkstationConfigOperation manages a long-running operation from CreateWorkstationConfig.
func (*CreateWorkstationConfigOperation) Done
func(op*CreateWorkstationConfigOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateWorkstationConfigOperation) Metadata
func(op*CreateWorkstationConfigOperation)Metadata()(*workstationspb.OperationMetadata,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 (*CreateWorkstationConfigOperation) Name
func(op*CreateWorkstationConfigOperation)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 (*CreateWorkstationConfigOperation) Poll
func(op*CreateWorkstationConfigOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.WorkstationConfig,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 (*CreateWorkstationConfigOperation) Wait
func(op*CreateWorkstationConfigOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.WorkstationConfig,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.
CreateWorkstationOperation
typeCreateWorkstationOperationstruct{// contains filtered or unexported fields}CreateWorkstationOperation manages a long-running operation from CreateWorkstation.
func (*CreateWorkstationOperation) Done
func(op*CreateWorkstationOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateWorkstationOperation) Metadata
func(op*CreateWorkstationOperation)Metadata()(*workstationspb.OperationMetadata,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 (*CreateWorkstationOperation) Name
func(op*CreateWorkstationOperation)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 (*CreateWorkstationOperation) Poll
func(op*CreateWorkstationOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.Workstation,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 (*CreateWorkstationOperation) Wait
func(op*CreateWorkstationOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.Workstation,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.
DeleteWorkstationClusterOperation
typeDeleteWorkstationClusterOperationstruct{// contains filtered or unexported fields}DeleteWorkstationClusterOperation manages a long-running operation from DeleteWorkstationCluster.
func (*DeleteWorkstationClusterOperation) Done
func(op*DeleteWorkstationClusterOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteWorkstationClusterOperation) Metadata
func(op*DeleteWorkstationClusterOperation)Metadata()(*workstationspb.OperationMetadata,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 (*DeleteWorkstationClusterOperation) Name
func(op*DeleteWorkstationClusterOperation)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 (*DeleteWorkstationClusterOperation) Poll
func(op*DeleteWorkstationClusterOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.WorkstationCluster,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 (*DeleteWorkstationClusterOperation) Wait
func(op*DeleteWorkstationClusterOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.WorkstationCluster,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.
DeleteWorkstationConfigOperation
typeDeleteWorkstationConfigOperationstruct{// contains filtered or unexported fields}DeleteWorkstationConfigOperation manages a long-running operation from DeleteWorkstationConfig.
func (*DeleteWorkstationConfigOperation) Done
func(op*DeleteWorkstationConfigOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteWorkstationConfigOperation) Metadata
func(op*DeleteWorkstationConfigOperation)Metadata()(*workstationspb.OperationMetadata,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 (*DeleteWorkstationConfigOperation) Name
func(op*DeleteWorkstationConfigOperation)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 (*DeleteWorkstationConfigOperation) Poll
func(op*DeleteWorkstationConfigOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.WorkstationConfig,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 (*DeleteWorkstationConfigOperation) Wait
func(op*DeleteWorkstationConfigOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.WorkstationConfig,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.
DeleteWorkstationOperation
typeDeleteWorkstationOperationstruct{// contains filtered or unexported fields}DeleteWorkstationOperation manages a long-running operation from DeleteWorkstation.
func (*DeleteWorkstationOperation) Done
func(op*DeleteWorkstationOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteWorkstationOperation) Metadata
func(op*DeleteWorkstationOperation)Metadata()(*workstationspb.OperationMetadata,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 (*DeleteWorkstationOperation) Name
func(op*DeleteWorkstationOperation)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 (*DeleteWorkstationOperation) Poll
func(op*DeleteWorkstationOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.Workstation,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 (*DeleteWorkstationOperation) Wait
func(op*DeleteWorkstationOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.Workstation,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.
OperationIterator
typeOperationIteratorstruct{// 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[]*longrunningpb.Operation,nextPageTokenstring,errerror)// contains filtered or unexported fields}OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All
func(it*OperationIterator)All()iter.Seq2[*longrunningpb.Operation,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*OperationIterator) Next
func(it*OperationIterator)Next()(*longrunningpb.Operation,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 (*OperationIterator) PageInfo
func(it*OperationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
StartWorkstationOperation
typeStartWorkstationOperationstruct{// contains filtered or unexported fields}StartWorkstationOperation manages a long-running operation from StartWorkstation.
func (*StartWorkstationOperation) Done
func(op*StartWorkstationOperation)Done()boolDone reports whether the long-running operation has completed.
func (*StartWorkstationOperation) Metadata
func(op*StartWorkstationOperation)Metadata()(*workstationspb.OperationMetadata,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 (*StartWorkstationOperation) Name
func(op*StartWorkstationOperation)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 (*StartWorkstationOperation) Poll
func(op*StartWorkstationOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.Workstation,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 (*StartWorkstationOperation) Wait
func(op*StartWorkstationOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.Workstation,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.
StopWorkstationOperation
typeStopWorkstationOperationstruct{// contains filtered or unexported fields}StopWorkstationOperation manages a long-running operation from StopWorkstation.
func (*StopWorkstationOperation) Done
func(op*StopWorkstationOperation)Done()boolDone reports whether the long-running operation has completed.
func (*StopWorkstationOperation) Metadata
func(op*StopWorkstationOperation)Metadata()(*workstationspb.OperationMetadata,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 (*StopWorkstationOperation) Name
func(op*StopWorkstationOperation)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 (*StopWorkstationOperation) Poll
func(op*StopWorkstationOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.Workstation,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 (*StopWorkstationOperation) Wait
func(op*StopWorkstationOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.Workstation,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.
UpdateWorkstationClusterOperation
typeUpdateWorkstationClusterOperationstruct{// contains filtered or unexported fields}UpdateWorkstationClusterOperation manages a long-running operation from UpdateWorkstationCluster.
func (*UpdateWorkstationClusterOperation) Done
func(op*UpdateWorkstationClusterOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateWorkstationClusterOperation) Metadata
func(op*UpdateWorkstationClusterOperation)Metadata()(*workstationspb.OperationMetadata,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 (*UpdateWorkstationClusterOperation) Name
func(op*UpdateWorkstationClusterOperation)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 (*UpdateWorkstationClusterOperation) Poll
func(op*UpdateWorkstationClusterOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.WorkstationCluster,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 (*UpdateWorkstationClusterOperation) Wait
func(op*UpdateWorkstationClusterOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.WorkstationCluster,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.
UpdateWorkstationConfigOperation
typeUpdateWorkstationConfigOperationstruct{// contains filtered or unexported fields}UpdateWorkstationConfigOperation manages a long-running operation from UpdateWorkstationConfig.
func (*UpdateWorkstationConfigOperation) Done
func(op*UpdateWorkstationConfigOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateWorkstationConfigOperation) Metadata
func(op*UpdateWorkstationConfigOperation)Metadata()(*workstationspb.OperationMetadata,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 (*UpdateWorkstationConfigOperation) Name
func(op*UpdateWorkstationConfigOperation)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 (*UpdateWorkstationConfigOperation) Poll
func(op*UpdateWorkstationConfigOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.WorkstationConfig,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 (*UpdateWorkstationConfigOperation) Wait
func(op*UpdateWorkstationConfigOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.WorkstationConfig,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.
UpdateWorkstationOperation
typeUpdateWorkstationOperationstruct{// contains filtered or unexported fields}UpdateWorkstationOperation manages a long-running operation from UpdateWorkstation.
func (*UpdateWorkstationOperation) Done
func(op*UpdateWorkstationOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateWorkstationOperation) Metadata
func(op*UpdateWorkstationOperation)Metadata()(*workstationspb.OperationMetadata,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 (*UpdateWorkstationOperation) Name
func(op*UpdateWorkstationOperation)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 (*UpdateWorkstationOperation) Poll
func(op*UpdateWorkstationOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.Workstation,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 (*UpdateWorkstationOperation) Wait
func(op*UpdateWorkstationOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*workstationspb.Workstation,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.
WorkstationClusterIterator
typeWorkstationClusterIteratorstruct{// 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[]*workstationspb.WorkstationCluster,nextPageTokenstring,errerror)// contains filtered or unexported fields}WorkstationClusterIterator manages a stream of *workstationspb.WorkstationCluster.
func (*WorkstationClusterIterator) All
func(it*WorkstationClusterIterator)All()iter.Seq2[*workstationspb.WorkstationCluster,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*WorkstationClusterIterator) Next
func(it*WorkstationClusterIterator)Next()(*workstationspb.WorkstationCluster,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 (*WorkstationClusterIterator) PageInfo
func(it*WorkstationClusterIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
WorkstationConfigIterator
typeWorkstationConfigIteratorstruct{// 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[]*workstationspb.WorkstationConfig,nextPageTokenstring,errerror)// contains filtered or unexported fields}WorkstationConfigIterator manages a stream of *workstationspb.WorkstationConfig.
func (*WorkstationConfigIterator) All
func(it*WorkstationConfigIterator)All()iter.Seq2[*workstationspb.WorkstationConfig,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*WorkstationConfigIterator) Next
func(it*WorkstationConfigIterator)Next()(*workstationspb.WorkstationConfig,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 (*WorkstationConfigIterator) PageInfo
func(it*WorkstationConfigIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
WorkstationIterator
typeWorkstationIteratorstruct{// 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[]*workstationspb.Workstation,nextPageTokenstring,errerror)// contains filtered or unexported fields}WorkstationIterator manages a stream of *workstationspb.Workstation.
func (*WorkstationIterator) All
func(it*WorkstationIterator)All()iter.Seq2[*workstationspb.Workstation,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*WorkstationIterator) Next
func(it*WorkstationIterator)Next()(*workstationspb.Workstation,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 (*WorkstationIterator) PageInfo
func(it*WorkstationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
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.