Package workstations is an auto-generated package for the Cloud Workstations API.
NOTE: This package is in beta. It is not stable, and may be subject to changes.
General documentation
For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go.
Example usage
To get started with this package, create a client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := workstations.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client
The following is an example of making an API call with the newly created client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := workstations.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.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) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Use of Context
The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Functions
func DefaultAuthScopes
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
CallOptions
type CallOptions struct {
GetWorkstationCluster []gax.CallOption
ListWorkstationClusters []gax.CallOption
CreateWorkstationCluster []gax.CallOption
UpdateWorkstationCluster []gax.CallOption
DeleteWorkstationCluster []gax.CallOption
GetWorkstationConfig []gax.CallOption
ListWorkstationConfigs []gax.CallOption
ListUsableWorkstationConfigs []gax.CallOption
CreateWorkstationConfig []gax.CallOption
UpdateWorkstationConfig []gax.CallOption
DeleteWorkstationConfig []gax.CallOption
GetWorkstation []gax.CallOption
ListWorkstations []gax.CallOption
ListUsableWorkstations []gax.CallOption
CreateWorkstation []gax.CallOption
UpdateWorkstation []gax.CallOption
DeleteWorkstation []gax.CallOption
StartWorkstation []gax.CallOption
StopWorkstation []gax.CallOption
GenerateAccessToken []gax.CallOption
GetIamPolicy []gax.CallOption
SetIamPolicy []gax.CallOption
TestIamPermissions []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
CallOptions contains the retry settings for each method of Client.
Client
type Client struct {
// The call options for this service.
CallOptions *CallOptions
// LROClient is used internally to handle long-running operations.
// It is exposed so that its CallOptions can be modified if required.
// Users should not Close this client.
LROClient *lroauto.OperationsClient
// contains filtered or unexported fields
}
Client is a client for interacting with 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
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewRESTClient
NewRESTClient creates a new workstations rest client.
Service for interacting with Cloud Workstations.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*Client) CancelOperation
func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
workstations "cloud.google.com/go/workstations/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) Close
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*Client) Connection (deprecated)
func (c *Client) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*Client) CreateWorkstation
func (c *Client) CreateWorkstation(ctx context.Context, req *workstationspb.CreateWorkstationRequest, opts ...gax.CallOption) (*CreateWorkstationOperation, error)
CreateWorkstation creates a new workstation.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateWorkstationCluster
func (c *Client) CreateWorkstationCluster(ctx context.Context, req *workstationspb.CreateWorkstationClusterRequest, opts ...gax.CallOption) (*CreateWorkstationClusterOperation, error)
CreateWorkstationCluster creates a new workstation cluster.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateWorkstationClusterOperation
func (c *Client) CreateWorkstationClusterOperation(name string) *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
func (c *Client) CreateWorkstationConfig(ctx context.Context, req *workstationspb.CreateWorkstationConfigRequest, opts ...gax.CallOption) (*CreateWorkstationConfigOperation, error)
CreateWorkstationConfig creates a new workstation configuration.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateWorkstationConfigOperation
func (c *Client) CreateWorkstationConfigOperation(name string) *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(name string) *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
func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
workstations "cloud.google.com/go/workstations/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteWorkstation
func (c *Client) DeleteWorkstation(ctx context.Context, req *workstationspb.DeleteWorkstationRequest, opts ...gax.CallOption) (*DeleteWorkstationOperation, error)
DeleteWorkstation deletes the specified workstation.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) DeleteWorkstationCluster
func (c *Client) DeleteWorkstationCluster(ctx context.Context, req *workstationspb.DeleteWorkstationClusterRequest, opts ...gax.CallOption) (*DeleteWorkstationClusterOperation, error)
DeleteWorkstationCluster deletes the specified workstation cluster.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) DeleteWorkstationClusterOperation
func (c *Client) DeleteWorkstationClusterOperation(name string) *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
func (c *Client) DeleteWorkstationConfig(ctx context.Context, req *workstationspb.DeleteWorkstationConfigRequest, opts ...gax.CallOption) (*DeleteWorkstationConfigOperation, error)
DeleteWorkstationConfig deletes the specified workstation configuration.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) DeleteWorkstationConfigOperation
func (c *Client) DeleteWorkstationConfigOperation(name string) *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(name string) *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
func (c *Client) GenerateAccessToken(ctx context.Context, req *workstationspb.GenerateAccessTokenRequest, opts ...gax.CallOption) (*workstationspb.GenerateAccessTokenResponse, error)
GenerateAccessToken returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetIamPolicy
func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
workstations "cloud.google.com/go/workstations/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.GetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.
}
resp, err := c.GetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetOperation
func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
workstations "cloud.google.com/go/workstations/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetWorkstation
func (c *Client) GetWorkstation(ctx context.Context, req *workstationspb.GetWorkstationRequest, opts ...gax.CallOption) (*workstationspb.Workstation, error)
GetWorkstation returns the requested workstation.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetWorkstationCluster
func (c *Client) GetWorkstationCluster(ctx context.Context, req *workstationspb.GetWorkstationClusterRequest, opts ...gax.CallOption) (*workstationspb.WorkstationCluster, error)
GetWorkstationCluster returns the requested workstation cluster.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetWorkstationConfig
func (c *Client) GetWorkstationConfig(ctx context.Context, req *workstationspb.GetWorkstationConfigRequest, opts ...gax.CallOption) (*workstationspb.WorkstationConfig, error)
GetWorkstationConfig returns the requested workstation configuration.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ListOperations
func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
workstations "cloud.google.com/go/workstations/apiv1"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListUsableWorkstationConfigs
func (c *Client) ListUsableWorkstationConfigs(ctx context.Context, req *workstationspb.ListUsableWorkstationConfigsRequest, opts ...gax.CallOption) *WorkstationConfigIterator
ListUsableWorkstationConfigs returns all workstation configurations in the specified cluster on which the caller has the “workstations.workstation.create” permission.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListUsableWorkstations
func (c *Client) ListUsableWorkstations(ctx context.Context, req *workstationspb.ListUsableWorkstationsRequest, opts ...gax.CallOption) *WorkstationIterator
ListUsableWorkstations returns all Workstations using the specified config on which the caller has the “workstations.workstations.use” permission.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListWorkstationClusters
func (c *Client) ListWorkstationClusters(ctx context.Context, req *workstationspb.ListWorkstationClustersRequest, opts ...gax.CallOption) *WorkstationClusterIterator
ListWorkstationClusters returns all workstation clusters in the specified location.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListWorkstationConfigs
func (c *Client) ListWorkstationConfigs(ctx context.Context, req *workstationspb.ListWorkstationConfigsRequest, opts ...gax.CallOption) *WorkstationConfigIterator
ListWorkstationConfigs returns all WorkstationConfigs in the specified cluster.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListWorkstations
func (c *Client) ListWorkstations(ctx context.Context, req *workstationspb.ListWorkstationsRequest, opts ...gax.CallOption) *WorkstationIterator
ListWorkstations returns all Workstations using the specified config.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) SetIamPolicy
func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
workstations "cloud.google.com/go/workstations/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.SetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.
}
resp, err := c.SetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) StartWorkstation
func (c *Client) StartWorkstation(ctx context.Context, req *workstationspb.StartWorkstationRequest, opts ...gax.CallOption) (*StartWorkstationOperation, error)
StartWorkstation starts running a workstation so that users can connect to it.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) StartWorkstationOperation
func (c *Client) StartWorkstationOperation(name string) *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
func (c *Client) StopWorkstation(ctx context.Context, req *workstationspb.StopWorkstationRequest, opts ...gax.CallOption) (*StopWorkstationOperation, error)
StopWorkstation stops running a workstation, reducing costs.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) StopWorkstationOperation
func (c *Client) StopWorkstationOperation(name string) *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
func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
workstations "cloud.google.com/go/workstations/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.TestIamPermissionsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.
}
resp, err := c.TestIamPermissions(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateWorkstation
func (c *Client) UpdateWorkstation(ctx context.Context, req *workstationspb.UpdateWorkstationRequest, opts ...gax.CallOption) (*UpdateWorkstationOperation, error)
UpdateWorkstation updates an existing workstation.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateWorkstationCluster
func (c *Client) UpdateWorkstationCluster(ctx context.Context, req *workstationspb.UpdateWorkstationClusterRequest, opts ...gax.CallOption) (*UpdateWorkstationClusterOperation, error)
UpdateWorkstationCluster updates an existing workstation cluster.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateWorkstationClusterOperation
func (c *Client) UpdateWorkstationClusterOperation(name string) *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
func (c *Client) UpdateWorkstationConfig(ctx context.Context, req *workstationspb.UpdateWorkstationConfigRequest, opts ...gax.CallOption) (*UpdateWorkstationConfigOperation, error)
UpdateWorkstationConfig updates an existing workstation configuration.
Example
package main
import (
"context"
workstations "cloud.google.com/go/workstations/apiv1"
workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := workstations.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateWorkstationConfigOperation
func (c *Client) UpdateWorkstationConfigOperation(name string) *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(name string) *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
type CreateWorkstationClusterOperation struct {
// contains filtered or unexported fields
}
CreateWorkstationClusterOperation manages a long-running operation from CreateWorkstationCluster.
func (*CreateWorkstationClusterOperation) Done
func (op *CreateWorkstationClusterOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateWorkstationClusterOperation) Poll
func (op *CreateWorkstationClusterOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateWorkstationClusterOperation) Wait
func (op *CreateWorkstationClusterOperation) Wait(ctx context.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
type CreateWorkstationConfigOperation struct {
// contains filtered or unexported fields
}
CreateWorkstationConfigOperation manages a long-running operation from CreateWorkstationConfig.
func (*CreateWorkstationConfigOperation) Done
func (op *CreateWorkstationConfigOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateWorkstationConfigOperation) Poll
func (op *CreateWorkstationConfigOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateWorkstationConfigOperation) Wait
func (op *CreateWorkstationConfigOperation) Wait(ctx context.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
type CreateWorkstationOperation struct {
// contains filtered or unexported fields
}
CreateWorkstationOperation manages a long-running operation from CreateWorkstation.
func (*CreateWorkstationOperation) Done
func (op *CreateWorkstationOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateWorkstationOperation) Poll
func (op *CreateWorkstationOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateWorkstationOperation) Wait
func (op *CreateWorkstationOperation) Wait(ctx context.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
type DeleteWorkstationClusterOperation struct {
// contains filtered or unexported fields
}
DeleteWorkstationClusterOperation manages a long-running operation from DeleteWorkstationCluster.
func (*DeleteWorkstationClusterOperation) Done
func (op *DeleteWorkstationClusterOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteWorkstationClusterOperation) Poll
func (op *DeleteWorkstationClusterOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteWorkstationClusterOperation) Wait
func (op *DeleteWorkstationClusterOperation) Wait(ctx context.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
type DeleteWorkstationConfigOperation struct {
// contains filtered or unexported fields
}
DeleteWorkstationConfigOperation manages a long-running operation from DeleteWorkstationConfig.
func (*DeleteWorkstationConfigOperation) Done
func (op *DeleteWorkstationConfigOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteWorkstationConfigOperation) Poll
func (op *DeleteWorkstationConfigOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteWorkstationConfigOperation) Wait
func (op *DeleteWorkstationConfigOperation) Wait(ctx context.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
type DeleteWorkstationOperation struct {
// contains filtered or unexported fields
}
DeleteWorkstationOperation manages a long-running operation from DeleteWorkstation.
func (*DeleteWorkstationOperation) Done
func (op *DeleteWorkstationOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteWorkstationOperation) Poll
func (op *DeleteWorkstationOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteWorkstationOperation) Wait
func (op *DeleteWorkstationOperation) Wait(ctx context.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
type OperationIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
// contains filtered or unexported fields
}
OperationIterator manages a stream of *longrunningpb.Operation.
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 more results. 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
type StartWorkstationOperation struct {
// contains filtered or unexported fields
}
StartWorkstationOperation manages a long-running operation from StartWorkstation.
func (*StartWorkstationOperation) Done
func (op *StartWorkstationOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*StartWorkstationOperation) Poll
func (op *StartWorkstationOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*StartWorkstationOperation) Wait
func (op *StartWorkstationOperation) Wait(ctx context.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
type StopWorkstationOperation struct {
// contains filtered or unexported fields
}
StopWorkstationOperation manages a long-running operation from StopWorkstation.
func (*StopWorkstationOperation) Done
func (op *StopWorkstationOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*StopWorkstationOperation) Poll
func (op *StopWorkstationOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*StopWorkstationOperation) Wait
func (op *StopWorkstationOperation) Wait(ctx context.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
type UpdateWorkstationClusterOperation struct {
// contains filtered or unexported fields
}
UpdateWorkstationClusterOperation manages a long-running operation from UpdateWorkstationCluster.
func (*UpdateWorkstationClusterOperation) Done
func (op *UpdateWorkstationClusterOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateWorkstationClusterOperation) Poll
func (op *UpdateWorkstationClusterOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateWorkstationClusterOperation) Wait
func (op *UpdateWorkstationClusterOperation) Wait(ctx context.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
type UpdateWorkstationConfigOperation struct {
// contains filtered or unexported fields
}
UpdateWorkstationConfigOperation manages a long-running operation from UpdateWorkstationConfig.
func (*UpdateWorkstationConfigOperation) Done
func (op *UpdateWorkstationConfigOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateWorkstationConfigOperation) Poll
func (op *UpdateWorkstationConfigOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateWorkstationConfigOperation) Wait
func (op *UpdateWorkstationConfigOperation) Wait(ctx context.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
type UpdateWorkstationOperation struct {
// contains filtered or unexported fields
}
UpdateWorkstationOperation manages a long-running operation from UpdateWorkstation.
func (*UpdateWorkstationOperation) Done
func (op *UpdateWorkstationOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateWorkstationOperation) Poll
func (op *UpdateWorkstationOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateWorkstationOperation) Wait
func (op *UpdateWorkstationOperation) Wait(ctx context.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
type WorkstationClusterIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*workstationspb.WorkstationCluster, nextPageToken string, err error)
// contains filtered or unexported fields
}
WorkstationClusterIterator manages a stream of *workstationspb.WorkstationCluster.
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 more results. 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
type WorkstationConfigIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*workstationspb.WorkstationConfig, nextPageToken string, err error)
// contains filtered or unexported fields
}
WorkstationConfigIterator manages a stream of *workstationspb.WorkstationConfig.
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 more results. 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
type WorkstationIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*workstationspb.Workstation, nextPageToken string, err error)
// contains filtered or unexported fields
}
WorkstationIterator manages a stream of *workstationspb.Workstation.
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 more results. 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.