Cloud Workstations API v1 - Package cloud.google.com/go/workstations/apiv1 (v1.1.6)

Note: To get more information about this package, such as access to older versions, viewthis package on pkg.go.dev.

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:

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()[]string

DefaultAuthScopes 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

funcNewClient(ctxcontext.Context,opts...option.ClientOption)(*Client,error)

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

funcNewRESTClient(ctxcontext.Context,opts...option.ClientOption)(*Client,error)

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

CancelOperation 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

func(c*Client)Close()error

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.ClientConn

Connection returns a connection to the API service.

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

func (*Client) CreateWorkstation

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

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)*CreateWorkstationClusterOperation

CreateWorkstationClusterOperation 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

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)*CreateWorkstationConfigOperation

CreateWorkstationConfigOperation 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)*CreateWorkstationOperation

CreateWorkstationOperation 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

DeleteOperation 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

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

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)*DeleteWorkstationClusterOperation

DeleteWorkstationClusterOperation 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

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)*DeleteWorkstationConfigOperation

DeleteWorkstationConfigOperation 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)*DeleteWorkstationOperation

DeleteWorkstationOperation 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

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

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

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

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

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

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

ListOperations 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

ListUsableWorkstationConfigs 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

ListUsableWorkstations 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

ListWorkstationClusters 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

ListWorkstationConfigs 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

ListWorkstations 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

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

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)*StartWorkstationOperation

StartWorkstationOperation 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

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)*StopWorkstationOperation

StopWorkstationOperation 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

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

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

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)*UpdateWorkstationClusterOperation

UpdateWorkstationClusterOperation 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

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)*UpdateWorkstationConfigOperation

UpdateWorkstationConfigOperation 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)*UpdateWorkstationOperation

UpdateWorkstationOperation 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

Done reports whether the long-running operation has completed.

func (*CreateWorkstationClusterOperation) Metadata

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

func (*CreateWorkstationClusterOperation) Name

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

func (*CreateWorkstationClusterOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

Done reports whether the long-running operation has completed.

func (*CreateWorkstationConfigOperation) Metadata

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

func (*CreateWorkstationConfigOperation) Name

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

func (*CreateWorkstationConfigOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

Done reports whether the long-running operation has completed.

func (*CreateWorkstationOperation) Metadata

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

func (*CreateWorkstationOperation) Name

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

func (*CreateWorkstationOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

Done reports whether the long-running operation has completed.

func (*DeleteWorkstationClusterOperation) Metadata

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

func (*DeleteWorkstationClusterOperation) Name

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

func (*DeleteWorkstationClusterOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

Done reports whether the long-running operation has completed.

func (*DeleteWorkstationConfigOperation) Metadata

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

func (*DeleteWorkstationConfigOperation) Name

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

func (*DeleteWorkstationConfigOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

Done reports whether the long-running operation has completed.

func (*DeleteWorkstationOperation) Metadata

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

func (*DeleteWorkstationOperation) Name

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

func (*DeleteWorkstationOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

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.PageInfo

PageInfo 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

Done reports whether the long-running operation has completed.

func (*StartWorkstationOperation) Metadata

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

func (*StartWorkstationOperation) Name

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

func (*StartWorkstationOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

Done reports whether the long-running operation has completed.

func (*StopWorkstationOperation) Metadata

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

func (*StopWorkstationOperation) Name

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

func (*StopWorkstationOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

Done reports whether the long-running operation has completed.

func (*UpdateWorkstationClusterOperation) Metadata

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

func (*UpdateWorkstationClusterOperation) Name

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

func (*UpdateWorkstationClusterOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

Done reports whether the long-running operation has completed.

func (*UpdateWorkstationConfigOperation) Metadata

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

func (*UpdateWorkstationConfigOperation) Name

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

func (*UpdateWorkstationConfigOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

Done reports whether the long-running operation has completed.

func (*UpdateWorkstationOperation) Metadata

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

func (*UpdateWorkstationOperation) Name

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

func (*UpdateWorkstationOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

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.PageInfo

PageInfo 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

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.PageInfo

PageInfo 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

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.PageInfo

PageInfo 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.