Documentation ¶
Overview ¶
Package baremetalsolution is an auto-generated package for the Bare Metal Solution API.
Provides ways to manage Bare Metal Solution hardware installed in a regional extension located near a Google Cloud data center.
General documentation ¶
For information that is relevant for all client libraries please reference https://pkg.golang.ir/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage ¶
To get started with this package, create a client.
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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.CreateNfsShareRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#CreateNfsShareRequest. } op, err := c.CreateNfsShare(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) 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.
Index ¶
- func DefaultAuthScopes() []string
- type CallOptions
- type Client
- func (c *Client) Close() error
- func (c *Client) Connection() *grpc.ClientConndeprecated
- func (c *Client) CreateNfsShare(ctx context.Context, req *baremetalsolutionpb.CreateNfsShareRequest, ...) (*CreateNfsShareOperation, error)
- func (c *Client) CreateNfsShareOperation(name string) *CreateNfsShareOperation
- func (c *Client) CreateProvisioningConfig(ctx context.Context, req *baremetalsolutionpb.CreateProvisioningConfigRequest, ...) (*baremetalsolutionpb.ProvisioningConfig, error)
- func (c *Client) CreateSSHKey(ctx context.Context, req *baremetalsolutionpb.CreateSSHKeyRequest, ...) (*baremetalsolutionpb.SSHKey, error)
- func (c *Client) CreateVolumeSnapshot(ctx context.Context, req *baremetalsolutionpb.CreateVolumeSnapshotRequest, ...) (*baremetalsolutionpb.VolumeSnapshot, error)
- func (c *Client) DeleteNfsShare(ctx context.Context, req *baremetalsolutionpb.DeleteNfsShareRequest, ...) (*DeleteNfsShareOperation, error)
- func (c *Client) DeleteNfsShareOperation(name string) *DeleteNfsShareOperation
- func (c *Client) DeleteSSHKey(ctx context.Context, req *baremetalsolutionpb.DeleteSSHKeyRequest, ...) error
- func (c *Client) DeleteVolumeSnapshot(ctx context.Context, req *baremetalsolutionpb.DeleteVolumeSnapshotRequest, ...) error
- func (c *Client) DetachLun(ctx context.Context, req *baremetalsolutionpb.DetachLunRequest, ...) (*DetachLunOperation, error)
- func (c *Client) DetachLunOperation(name string) *DetachLunOperation
- func (c *Client) DisableInteractiveSerialConsole(ctx context.Context, ...) (*DisableInteractiveSerialConsoleOperation, error)
- func (c *Client) DisableInteractiveSerialConsoleOperation(name string) *DisableInteractiveSerialConsoleOperation
- func (c *Client) EnableInteractiveSerialConsole(ctx context.Context, ...) (*EnableInteractiveSerialConsoleOperation, error)
- func (c *Client) EnableInteractiveSerialConsoleOperation(name string) *EnableInteractiveSerialConsoleOperation
- func (c *Client) EvictLun(ctx context.Context, req *baremetalsolutionpb.EvictLunRequest, ...) (*EvictLunOperation, error)
- func (c *Client) EvictLunOperation(name string) *EvictLunOperation
- func (c *Client) EvictVolume(ctx context.Context, req *baremetalsolutionpb.EvictVolumeRequest, ...) (*EvictVolumeOperation, error)
- func (c *Client) EvictVolumeOperation(name string) *EvictVolumeOperation
- func (c *Client) GetInstance(ctx context.Context, req *baremetalsolutionpb.GetInstanceRequest, ...) (*baremetalsolutionpb.Instance, error)
- func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *Client) GetLun(ctx context.Context, req *baremetalsolutionpb.GetLunRequest, ...) (*baremetalsolutionpb.Lun, error)
- func (c *Client) GetNetwork(ctx context.Context, req *baremetalsolutionpb.GetNetworkRequest, ...) (*baremetalsolutionpb.Network, error)
- func (c *Client) GetNfsShare(ctx context.Context, req *baremetalsolutionpb.GetNfsShareRequest, ...) (*baremetalsolutionpb.NfsShare, error)
- func (c *Client) GetProvisioningConfig(ctx context.Context, req *baremetalsolutionpb.GetProvisioningConfigRequest, ...) (*baremetalsolutionpb.ProvisioningConfig, error)
- func (c *Client) GetVolume(ctx context.Context, req *baremetalsolutionpb.GetVolumeRequest, ...) (*baremetalsolutionpb.Volume, error)
- func (c *Client) GetVolumeSnapshot(ctx context.Context, req *baremetalsolutionpb.GetVolumeSnapshotRequest, ...) (*baremetalsolutionpb.VolumeSnapshot, error)
- func (c *Client) ListInstances(ctx context.Context, req *baremetalsolutionpb.ListInstancesRequest, ...) *InstanceIterator
- func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *Client) ListLuns(ctx context.Context, req *baremetalsolutionpb.ListLunsRequest, ...) *LunIterator
- func (c *Client) ListNetworkUsage(ctx context.Context, req *baremetalsolutionpb.ListNetworkUsageRequest, ...) (*baremetalsolutionpb.ListNetworkUsageResponse, error)
- func (c *Client) ListNetworks(ctx context.Context, req *baremetalsolutionpb.ListNetworksRequest, ...) *NetworkIterator
- func (c *Client) ListNfsShares(ctx context.Context, req *baremetalsolutionpb.ListNfsSharesRequest, ...) *NfsShareIterator
- func (c *Client) ListOSImages(ctx context.Context, req *baremetalsolutionpb.ListOSImagesRequest, ...) *OSImageIterator
- func (c *Client) ListProvisioningQuotas(ctx context.Context, req *baremetalsolutionpb.ListProvisioningQuotasRequest, ...) *ProvisioningQuotaIterator
- func (c *Client) ListSSHKeys(ctx context.Context, req *baremetalsolutionpb.ListSSHKeysRequest, ...) *SSHKeyIterator
- func (c *Client) ListVolumeSnapshots(ctx context.Context, req *baremetalsolutionpb.ListVolumeSnapshotsRequest, ...) *VolumeSnapshotIterator
- func (c *Client) ListVolumes(ctx context.Context, req *baremetalsolutionpb.ListVolumesRequest, ...) *VolumeIterator
- func (c *Client) RenameInstance(ctx context.Context, req *baremetalsolutionpb.RenameInstanceRequest, ...) (*baremetalsolutionpb.Instance, error)
- func (c *Client) RenameNetwork(ctx context.Context, req *baremetalsolutionpb.RenameNetworkRequest, ...) (*baremetalsolutionpb.Network, error)
- func (c *Client) RenameNfsShare(ctx context.Context, req *baremetalsolutionpb.RenameNfsShareRequest, ...) (*baremetalsolutionpb.NfsShare, error)
- func (c *Client) RenameVolume(ctx context.Context, req *baremetalsolutionpb.RenameVolumeRequest, ...) (*baremetalsolutionpb.Volume, error)
- func (c *Client) ResetInstance(ctx context.Context, req *baremetalsolutionpb.ResetInstanceRequest, ...) (*ResetInstanceOperation, error)
- func (c *Client) ResetInstanceOperation(name string) *ResetInstanceOperation
- func (c *Client) ResizeVolume(ctx context.Context, req *baremetalsolutionpb.ResizeVolumeRequest, ...) (*ResizeVolumeOperation, error)
- func (c *Client) ResizeVolumeOperation(name string) *ResizeVolumeOperation
- func (c *Client) RestoreVolumeSnapshot(ctx context.Context, req *baremetalsolutionpb.RestoreVolumeSnapshotRequest, ...) (*RestoreVolumeSnapshotOperation, error)
- func (c *Client) RestoreVolumeSnapshotOperation(name string) *RestoreVolumeSnapshotOperation
- func (c *Client) StartInstance(ctx context.Context, req *baremetalsolutionpb.StartInstanceRequest, ...) (*StartInstanceOperation, error)
- func (c *Client) StartInstanceOperation(name string) *StartInstanceOperation
- func (c *Client) StopInstance(ctx context.Context, req *baremetalsolutionpb.StopInstanceRequest, ...) (*StopInstanceOperation, error)
- func (c *Client) StopInstanceOperation(name string) *StopInstanceOperation
- func (c *Client) SubmitProvisioningConfig(ctx context.Context, req *baremetalsolutionpb.SubmitProvisioningConfigRequest, ...) (*baremetalsolutionpb.SubmitProvisioningConfigResponse, error)
- func (c *Client) UpdateInstance(ctx context.Context, req *baremetalsolutionpb.UpdateInstanceRequest, ...) (*UpdateInstanceOperation, error)
- func (c *Client) UpdateInstanceOperation(name string) *UpdateInstanceOperation
- func (c *Client) UpdateNetwork(ctx context.Context, req *baremetalsolutionpb.UpdateNetworkRequest, ...) (*UpdateNetworkOperation, error)
- func (c *Client) UpdateNetworkOperation(name string) *UpdateNetworkOperation
- func (c *Client) UpdateNfsShare(ctx context.Context, req *baremetalsolutionpb.UpdateNfsShareRequest, ...) (*UpdateNfsShareOperation, error)
- func (c *Client) UpdateNfsShareOperation(name string) *UpdateNfsShareOperation
- func (c *Client) UpdateProvisioningConfig(ctx context.Context, req *baremetalsolutionpb.UpdateProvisioningConfigRequest, ...) (*baremetalsolutionpb.ProvisioningConfig, error)
- func (c *Client) UpdateVolume(ctx context.Context, req *baremetalsolutionpb.UpdateVolumeRequest, ...) (*UpdateVolumeOperation, error)
- func (c *Client) UpdateVolumeOperation(name string) *UpdateVolumeOperation
- type CreateNfsShareOperation
- func (op *CreateNfsShareOperation) Done() bool
- func (op *CreateNfsShareOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *CreateNfsShareOperation) Name() string
- func (op *CreateNfsShareOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.NfsShare, error)
- func (op *CreateNfsShareOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.NfsShare, error)
- type DeleteNfsShareOperation
- func (op *DeleteNfsShareOperation) Done() bool
- func (op *DeleteNfsShareOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *DeleteNfsShareOperation) Name() string
- func (op *DeleteNfsShareOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteNfsShareOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DetachLunOperation
- func (op *DetachLunOperation) Done() bool
- func (op *DetachLunOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *DetachLunOperation) Name() string
- func (op *DetachLunOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Instance, error)
- func (op *DetachLunOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Instance, error)
- type DisableInteractiveSerialConsoleOperation
- func (op *DisableInteractiveSerialConsoleOperation) Done() bool
- func (op *DisableInteractiveSerialConsoleOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *DisableInteractiveSerialConsoleOperation) Name() string
- func (op *DisableInteractiveSerialConsoleOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.DisableInteractiveSerialConsoleResponse, error)
- func (op *DisableInteractiveSerialConsoleOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.DisableInteractiveSerialConsoleResponse, error)
- type EnableInteractiveSerialConsoleOperation
- func (op *EnableInteractiveSerialConsoleOperation) Done() bool
- func (op *EnableInteractiveSerialConsoleOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *EnableInteractiveSerialConsoleOperation) Name() string
- func (op *EnableInteractiveSerialConsoleOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.EnableInteractiveSerialConsoleResponse, error)
- func (op *EnableInteractiveSerialConsoleOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.EnableInteractiveSerialConsoleResponse, error)
- type EvictLunOperation
- func (op *EvictLunOperation) Done() bool
- func (op *EvictLunOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *EvictLunOperation) Name() string
- func (op *EvictLunOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *EvictLunOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type EvictVolumeOperation
- func (op *EvictVolumeOperation) Done() bool
- func (op *EvictVolumeOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *EvictVolumeOperation) Name() string
- func (op *EvictVolumeOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *EvictVolumeOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type InstanceIterator
- type LocationIterator
- type LunIterator
- type NetworkIterator
- type NfsShareIterator
- type OSImageIterator
- type ProvisioningQuotaIterator
- type ResetInstanceOperation
- func (op *ResetInstanceOperation) Done() bool
- func (op *ResetInstanceOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *ResetInstanceOperation) Name() string
- func (op *ResetInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.ResetInstanceResponse, error)
- func (op *ResetInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.ResetInstanceResponse, error)
- type ResizeVolumeOperation
- func (op *ResizeVolumeOperation) Done() bool
- func (op *ResizeVolumeOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *ResizeVolumeOperation) Name() string
- func (op *ResizeVolumeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Volume, error)
- func (op *ResizeVolumeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Volume, error)
- type RestoreVolumeSnapshotOperation
- func (op *RestoreVolumeSnapshotOperation) Done() bool
- func (op *RestoreVolumeSnapshotOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *RestoreVolumeSnapshotOperation) Name() string
- func (op *RestoreVolumeSnapshotOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.VolumeSnapshot, error)
- func (op *RestoreVolumeSnapshotOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.VolumeSnapshot, error)
- type SSHKeyIterator
- type StartInstanceOperation
- func (op *StartInstanceOperation) Done() bool
- func (op *StartInstanceOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *StartInstanceOperation) Name() string
- func (op *StartInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.StartInstanceResponse, error)
- func (op *StartInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.StartInstanceResponse, error)
- type StopInstanceOperation
- func (op *StopInstanceOperation) Done() bool
- func (op *StopInstanceOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *StopInstanceOperation) Name() string
- func (op *StopInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.StopInstanceResponse, error)
- func (op *StopInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.StopInstanceResponse, error)
- type UpdateInstanceOperation
- func (op *UpdateInstanceOperation) Done() bool
- func (op *UpdateInstanceOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *UpdateInstanceOperation) Name() string
- func (op *UpdateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Instance, error)
- func (op *UpdateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Instance, error)
- type UpdateNetworkOperation
- func (op *UpdateNetworkOperation) Done() bool
- func (op *UpdateNetworkOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *UpdateNetworkOperation) Name() string
- func (op *UpdateNetworkOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Network, error)
- func (op *UpdateNetworkOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Network, error)
- type UpdateNfsShareOperation
- func (op *UpdateNfsShareOperation) Done() bool
- func (op *UpdateNfsShareOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *UpdateNfsShareOperation) Name() string
- func (op *UpdateNfsShareOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.NfsShare, error)
- func (op *UpdateNfsShareOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.NfsShare, error)
- type UpdateVolumeOperation
- func (op *UpdateVolumeOperation) Done() bool
- func (op *UpdateVolumeOperation) Metadata() (*baremetalsolutionpb.OperationMetadata, error)
- func (op *UpdateVolumeOperation) Name() string
- func (op *UpdateVolumeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Volume, error)
- func (op *UpdateVolumeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Volume, error)
- type VolumeIterator
- type VolumeSnapshotIterator
Examples ¶
- Client.CreateNfsShare
- Client.CreateProvisioningConfig
- Client.CreateSSHKey
- Client.CreateVolumeSnapshot
- Client.DeleteNfsShare
- Client.DeleteSSHKey
- Client.DeleteVolumeSnapshot
- Client.DetachLun
- Client.DisableInteractiveSerialConsole
- Client.EnableInteractiveSerialConsole
- Client.EvictLun
- Client.EvictVolume
- Client.GetInstance
- Client.GetLocation
- Client.GetLun
- Client.GetNetwork
- Client.GetNfsShare
- Client.GetProvisioningConfig
- Client.GetVolume
- Client.GetVolumeSnapshot
- Client.ListInstances
- Client.ListLocations
- Client.ListLuns
- Client.ListNetworkUsage
- Client.ListNetworks
- Client.ListNfsShares
- Client.ListOSImages
- Client.ListProvisioningQuotas
- Client.ListSSHKeys
- Client.ListVolumeSnapshots
- Client.ListVolumes
- Client.RenameInstance
- Client.RenameNetwork
- Client.RenameNfsShare
- Client.RenameVolume
- Client.ResetInstance
- Client.ResizeVolume
- Client.RestoreVolumeSnapshot
- Client.StartInstance
- Client.StopInstance
- Client.SubmitProvisioningConfig
- Client.UpdateInstance
- Client.UpdateNetwork
- Client.UpdateNfsShare
- Client.UpdateProvisioningConfig
- Client.UpdateVolume
- NewClient
- NewRESTClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type CallOptions ¶
type CallOptions struct { ListInstances []gax.CallOption GetInstance []gax.CallOption UpdateInstance []gax.CallOption RenameInstance []gax.CallOption ResetInstance []gax.CallOption StartInstance []gax.CallOption StopInstance []gax.CallOption EnableInteractiveSerialConsole []gax.CallOption DisableInteractiveSerialConsole []gax.CallOption DetachLun []gax.CallOption ListSSHKeys []gax.CallOption CreateSSHKey []gax.CallOption DeleteSSHKey []gax.CallOption ListVolumes []gax.CallOption GetVolume []gax.CallOption UpdateVolume []gax.CallOption RenameVolume []gax.CallOption EvictVolume []gax.CallOption ResizeVolume []gax.CallOption ListNetworks []gax.CallOption ListNetworkUsage []gax.CallOption GetNetwork []gax.CallOption UpdateNetwork []gax.CallOption CreateVolumeSnapshot []gax.CallOption RestoreVolumeSnapshot []gax.CallOption DeleteVolumeSnapshot []gax.CallOption GetVolumeSnapshot []gax.CallOption ListVolumeSnapshots []gax.CallOption GetLun []gax.CallOption ListLuns []gax.CallOption EvictLun []gax.CallOption ListProvisioningQuotas []gax.CallOption SubmitProvisioningConfig []gax.CallOption GetProvisioningConfig []gax.CallOption CreateProvisioningConfig []gax.CallOption UpdateProvisioningConfig []gax.CallOption RenameNetwork []gax.CallOption ListOSImages []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption }
CallOptions contains the retry settings for each method of Client.
type 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 Bare Metal Solution API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Performs management operations on Bare Metal Solution servers.
The baremetalsolution.googleapis.com service provides management capabilities for Bare Metal Solution servers. To access the API methods, you must assign Bare Metal Solution IAM roles containing the desired permissions to your staff in your Google Cloud project. You must also enable the Bare Metal Solution API. Once enabled, the methods act upon specific servers in your Bare Metal Solution environment.
func NewClient ¶
NewClient creates a new bare metal solution client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Performs management operations on Bare Metal Solution servers.
The baremetalsolution.googleapis.com service provides management capabilities for Bare Metal Solution servers. To access the API methods, you must assign Bare Metal Solution IAM roles containing the desired permissions to your staff in your Google Cloud project. You must also enable the Bare Metal Solution API. Once enabled, the methods act upon specific servers in your Bare Metal Solution environment.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewRESTClient ¶ added in v0.5.0
NewRESTClient creates a new bare metal solution rest client.
Performs management operations on Bare Metal Solution servers.
The baremetalsolution.googleapis.com service provides management capabilities for Bare Metal Solution servers. To access the API methods, you must assign Bare Metal Solution IAM roles containing the desired permissions to your staff in your Google Cloud project. You must also enable the Bare Metal Solution API. Once enabled, the methods act upon specific servers in your Bare Metal Solution environment.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
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) CreateNfsShare ¶ added in v1.2.0
func (c *Client) CreateNfsShare(ctx context.Context, req *baremetalsolutionpb.CreateNfsShareRequest, opts ...gax.CallOption) (*CreateNfsShareOperation, error)
CreateNfsShare create an NFS share.
func (*Client) CreateNfsShareOperation ¶ added in v1.2.0
func (c *Client) CreateNfsShareOperation(name string) *CreateNfsShareOperation
CreateNfsShareOperation returns a new CreateNfsShareOperation from a given name. The name must be that of a previously created CreateNfsShareOperation, possibly from a different process.
func (*Client) CreateProvisioningConfig ¶ added in v1.2.0
func (c *Client) CreateProvisioningConfig(ctx context.Context, req *baremetalsolutionpb.CreateProvisioningConfigRequest, opts ...gax.CallOption) (*baremetalsolutionpb.ProvisioningConfig, error)
CreateProvisioningConfig create new ProvisioningConfig.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.CreateProvisioningConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#CreateProvisioningConfigRequest. } resp, err := c.CreateProvisioningConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) CreateSSHKey ¶ added in v1.2.0
func (c *Client) CreateSSHKey(ctx context.Context, req *baremetalsolutionpb.CreateSSHKeyRequest, opts ...gax.CallOption) (*baremetalsolutionpb.SSHKey, error)
CreateSSHKey register a public SSH key in the specified project for use with the interactive serial console feature.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.CreateSSHKeyRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#CreateSSHKeyRequest. } resp, err := c.CreateSSHKey(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) CreateVolumeSnapshot ¶
func (c *Client) CreateVolumeSnapshot(ctx context.Context, req *baremetalsolutionpb.CreateVolumeSnapshotRequest, opts ...gax.CallOption) (*baremetalsolutionpb.VolumeSnapshot, error)
CreateVolumeSnapshot takes a snapshot of a boot volume. Returns INVALID_ARGUMENT if called for a non-boot volume.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.CreateVolumeSnapshotRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#CreateVolumeSnapshotRequest. } resp, err := c.CreateVolumeSnapshot(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) DeleteNfsShare ¶ added in v1.2.0
func (c *Client) DeleteNfsShare(ctx context.Context, req *baremetalsolutionpb.DeleteNfsShareRequest, opts ...gax.CallOption) (*DeleteNfsShareOperation, error)
DeleteNfsShare delete an NFS share. The underlying volume is automatically deleted.
func (*Client) DeleteNfsShareOperation ¶ added in v1.2.0
func (c *Client) DeleteNfsShareOperation(name string) *DeleteNfsShareOperation
DeleteNfsShareOperation returns a new DeleteNfsShareOperation from a given name. The name must be that of a previously created DeleteNfsShareOperation, possibly from a different process.
func (*Client) DeleteSSHKey ¶ added in v1.2.0
func (c *Client) DeleteSSHKey(ctx context.Context, req *baremetalsolutionpb.DeleteSSHKeyRequest, opts ...gax.CallOption) error
DeleteSSHKey deletes a public SSH key registered in the specified project.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.DeleteSSHKeyRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#DeleteSSHKeyRequest. } err = c.DeleteSSHKey(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DeleteVolumeSnapshot ¶
func (c *Client) DeleteVolumeSnapshot(ctx context.Context, req *baremetalsolutionpb.DeleteVolumeSnapshotRequest, opts ...gax.CallOption) error
DeleteVolumeSnapshot deletes a volume snapshot. Returns INVALID_ARGUMENT if called for a non-boot volume.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.DeleteVolumeSnapshotRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#DeleteVolumeSnapshotRequest. } err = c.DeleteVolumeSnapshot(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DetachLun ¶ added in v0.2.0
func (c *Client) DetachLun(ctx context.Context, req *baremetalsolutionpb.DetachLunRequest, opts ...gax.CallOption) (*DetachLunOperation, error)
DetachLun detach LUN from Instance.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.DetachLunRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#DetachLunRequest. } op, err := c.DetachLun(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) DetachLunOperation ¶ added in v0.2.0
func (c *Client) DetachLunOperation(name string) *DetachLunOperation
DetachLunOperation returns a new DetachLunOperation from a given name. The name must be that of a previously created DetachLunOperation, possibly from a different process.
func (*Client) DisableInteractiveSerialConsole ¶ added in v1.2.0
func (c *Client) DisableInteractiveSerialConsole(ctx context.Context, req *baremetalsolutionpb.DisableInteractiveSerialConsoleRequest, opts ...gax.CallOption) (*DisableInteractiveSerialConsoleOperation, error)
DisableInteractiveSerialConsole disable the interactive serial console feature on an instance.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.DisableInteractiveSerialConsoleRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#DisableInteractiveSerialConsoleRequest. } op, err := c.DisableInteractiveSerialConsole(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) DisableInteractiveSerialConsoleOperation ¶ added in v1.2.0
func (c *Client) DisableInteractiveSerialConsoleOperation(name string) *DisableInteractiveSerialConsoleOperation
DisableInteractiveSerialConsoleOperation returns a new DisableInteractiveSerialConsoleOperation from a given name. The name must be that of a previously created DisableInteractiveSerialConsoleOperation, possibly from a different process.
func (*Client) EnableInteractiveSerialConsole ¶ added in v1.2.0
func (c *Client) EnableInteractiveSerialConsole(ctx context.Context, req *baremetalsolutionpb.EnableInteractiveSerialConsoleRequest, opts ...gax.CallOption) (*EnableInteractiveSerialConsoleOperation, error)
EnableInteractiveSerialConsole enable the interactive serial console feature on an instance.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.EnableInteractiveSerialConsoleRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#EnableInteractiveSerialConsoleRequest. } op, err := c.EnableInteractiveSerialConsole(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) EnableInteractiveSerialConsoleOperation ¶ added in v1.2.0
func (c *Client) EnableInteractiveSerialConsoleOperation(name string) *EnableInteractiveSerialConsoleOperation
EnableInteractiveSerialConsoleOperation returns a new EnableInteractiveSerialConsoleOperation from a given name. The name must be that of a previously created EnableInteractiveSerialConsoleOperation, possibly from a different process.
func (*Client) EvictLun ¶ added in v1.2.0
func (c *Client) EvictLun(ctx context.Context, req *baremetalsolutionpb.EvictLunRequest, opts ...gax.CallOption) (*EvictLunOperation, error)
EvictLun skips lun’s cooloff and deletes it now. Lun must be in cooloff state.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.EvictLunRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#EvictLunRequest. } op, err := c.EvictLun(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) EvictLunOperation ¶ added in v1.2.0
func (c *Client) EvictLunOperation(name string) *EvictLunOperation
EvictLunOperation returns a new EvictLunOperation from a given name. The name must be that of a previously created EvictLunOperation, possibly from a different process.
func (*Client) EvictVolume ¶ added in v1.2.0
func (c *Client) EvictVolume(ctx context.Context, req *baremetalsolutionpb.EvictVolumeRequest, opts ...gax.CallOption) (*EvictVolumeOperation, error)
EvictVolume skips volume’s cooloff and deletes it now. Volume must be in cooloff state.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.EvictVolumeRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#EvictVolumeRequest. } op, err := c.EvictVolume(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) EvictVolumeOperation ¶ added in v1.2.0
func (c *Client) EvictVolumeOperation(name string) *EvictVolumeOperation
EvictVolumeOperation returns a new EvictVolumeOperation from a given name. The name must be that of a previously created EvictVolumeOperation, possibly from a different process.
func (*Client) GetInstance ¶
func (c *Client) GetInstance(ctx context.Context, req *baremetalsolutionpb.GetInstanceRequest, opts ...gax.CallOption) (*baremetalsolutionpb.Instance, error)
GetInstance get details about a single server.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.GetInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#GetInstanceRequest. } resp, err := c.GetInstance(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetLocation ¶ added in v0.2.0
func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.GetLocationRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. } resp, err := c.GetLocation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetLun ¶
func (c *Client) GetLun(ctx context.Context, req *baremetalsolutionpb.GetLunRequest, opts ...gax.CallOption) (*baremetalsolutionpb.Lun, error)
GetLun get details of a single storage logical unit number(LUN).
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.GetLunRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#GetLunRequest. } resp, err := c.GetLun(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetNetwork ¶
func (c *Client) GetNetwork(ctx context.Context, req *baremetalsolutionpb.GetNetworkRequest, opts ...gax.CallOption) (*baremetalsolutionpb.Network, error)
GetNetwork get details of a single network.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.GetNetworkRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#GetNetworkRequest. } resp, err := c.GetNetwork(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetNfsShare ¶ added in v0.2.0
func (c *Client) GetNfsShare(ctx context.Context, req *baremetalsolutionpb.GetNfsShareRequest, opts ...gax.CallOption) (*baremetalsolutionpb.NfsShare, error)
GetNfsShare get details of a single NFS share.
func (*Client) GetProvisioningConfig ¶ added in v1.2.0
func (c *Client) GetProvisioningConfig(ctx context.Context, req *baremetalsolutionpb.GetProvisioningConfigRequest, opts ...gax.CallOption) (*baremetalsolutionpb.ProvisioningConfig, error)
GetProvisioningConfig get ProvisioningConfig by name.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.GetProvisioningConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#GetProvisioningConfigRequest. } resp, err := c.GetProvisioningConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetVolume ¶
func (c *Client) GetVolume(ctx context.Context, req *baremetalsolutionpb.GetVolumeRequest, opts ...gax.CallOption) (*baremetalsolutionpb.Volume, error)
GetVolume get details of a single storage volume.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.GetVolumeRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#GetVolumeRequest. } resp, err := c.GetVolume(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetVolumeSnapshot ¶
func (c *Client) GetVolumeSnapshot(ctx context.Context, req *baremetalsolutionpb.GetVolumeSnapshotRequest, opts ...gax.CallOption) (*baremetalsolutionpb.VolumeSnapshot, error)
GetVolumeSnapshot returns the specified snapshot resource. Returns INVALID_ARGUMENT if called for a non-boot volume.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.GetVolumeSnapshotRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#GetVolumeSnapshotRequest. } resp, err := c.GetVolumeSnapshot(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) ListInstances ¶
func (c *Client) ListInstances(ctx context.Context, req *baremetalsolutionpb.ListInstancesRequest, opts ...gax.CallOption) *InstanceIterator
ListInstances list servers in a given project and location.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" "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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.ListInstancesRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#ListInstancesRequest. } it := c.ListInstances(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListLocations ¶ added in v0.2.0
func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" "google.golang.org/api/iterator" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.ListLocationsRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. } it := c.ListLocations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListLuns ¶
func (c *Client) ListLuns(ctx context.Context, req *baremetalsolutionpb.ListLunsRequest, opts ...gax.CallOption) *LunIterator
ListLuns list storage volume luns for given storage volume.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" "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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.ListLunsRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#ListLunsRequest. } it := c.ListLuns(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListNetworkUsage ¶ added in v0.2.0
func (c *Client) ListNetworkUsage(ctx context.Context, req *baremetalsolutionpb.ListNetworkUsageRequest, opts ...gax.CallOption) (*baremetalsolutionpb.ListNetworkUsageResponse, error)
ListNetworkUsage list all Networks (and used IPs for each Network) in the vendor account associated with the specified project.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.ListNetworkUsageRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#ListNetworkUsageRequest. } resp, err := c.ListNetworkUsage(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) ListNetworks ¶
func (c *Client) ListNetworks(ctx context.Context, req *baremetalsolutionpb.ListNetworksRequest, opts ...gax.CallOption) *NetworkIterator
ListNetworks list network in a given project and location.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" "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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.ListNetworksRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#ListNetworksRequest. } it := c.ListNetworks(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListNfsShares ¶ added in v0.2.0
func (c *Client) ListNfsShares(ctx context.Context, req *baremetalsolutionpb.ListNfsSharesRequest, opts ...gax.CallOption) *NfsShareIterator
ListNfsShares list NFS shares.
func (*Client) ListOSImages ¶ added in v1.2.0
func (c *Client) ListOSImages(ctx context.Context, req *baremetalsolutionpb.ListOSImagesRequest, opts ...gax.CallOption) *OSImageIterator
ListOSImages retrieves the list of OS images which are currently approved.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" "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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.ListOSImagesRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#ListOSImagesRequest. } it := c.ListOSImages(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListProvisioningQuotas ¶ added in v1.2.0
func (c *Client) ListProvisioningQuotas(ctx context.Context, req *baremetalsolutionpb.ListProvisioningQuotasRequest, opts ...gax.CallOption) *ProvisioningQuotaIterator
ListProvisioningQuotas list the budget details to provision resources on a given project.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" "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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.ListProvisioningQuotasRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#ListProvisioningQuotasRequest. } it := c.ListProvisioningQuotas(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListSSHKeys ¶ added in v1.2.0
func (c *Client) ListSSHKeys(ctx context.Context, req *baremetalsolutionpb.ListSSHKeysRequest, opts ...gax.CallOption) *SSHKeyIterator
ListSSHKeys lists the public SSH keys registered for the specified project. These SSH keys are used only for the interactive serial console feature.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" "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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.ListSSHKeysRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#ListSSHKeysRequest. } it := c.ListSSHKeys(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListVolumeSnapshots ¶
func (c *Client) ListVolumeSnapshots(ctx context.Context, req *baremetalsolutionpb.ListVolumeSnapshotsRequest, opts ...gax.CallOption) *VolumeSnapshotIterator
ListVolumeSnapshots retrieves the list of snapshots for the specified volume. Returns a response with an empty list of snapshots if called for a non-boot volume.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" "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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.ListVolumeSnapshotsRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#ListVolumeSnapshotsRequest. } it := c.ListVolumeSnapshots(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListVolumes ¶
func (c *Client) ListVolumes(ctx context.Context, req *baremetalsolutionpb.ListVolumesRequest, opts ...gax.CallOption) *VolumeIterator
ListVolumes list storage volumes in a given project and location.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" "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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.ListVolumesRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#ListVolumesRequest. } it := c.ListVolumes(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) RenameInstance ¶ added in v1.2.0
func (c *Client) RenameInstance(ctx context.Context, req *baremetalsolutionpb.RenameInstanceRequest, opts ...gax.CallOption) (*baremetalsolutionpb.Instance, error)
RenameInstance renameInstance sets a new name for an instance. Use with caution, previous names become immediately invalidated.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.RenameInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#RenameInstanceRequest. } resp, err := c.RenameInstance(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) RenameNetwork ¶ added in v1.2.0
func (c *Client) RenameNetwork(ctx context.Context, req *baremetalsolutionpb.RenameNetworkRequest, opts ...gax.CallOption) (*baremetalsolutionpb.Network, error)
RenameNetwork renameNetwork sets a new name for a network. Use with caution, previous names become immediately invalidated.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.RenameNetworkRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#RenameNetworkRequest. } resp, err := c.RenameNetwork(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) RenameNfsShare ¶ added in v1.2.0
func (c *Client) RenameNfsShare(ctx context.Context, req *baremetalsolutionpb.RenameNfsShareRequest, opts ...gax.CallOption) (*baremetalsolutionpb.NfsShare, error)
RenameNfsShare renameNfsShare sets a new name for an nfsshare. Use with caution, previous names become immediately invalidated.
func (*Client) RenameVolume ¶ added in v1.2.0
func (c *Client) RenameVolume(ctx context.Context, req *baremetalsolutionpb.RenameVolumeRequest, opts ...gax.CallOption) (*baremetalsolutionpb.Volume, error)
RenameVolume renameVolume sets a new name for a volume. Use with caution, previous names become immediately invalidated.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.RenameVolumeRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#RenameVolumeRequest. } resp, err := c.RenameVolume(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) ResetInstance ¶
func (c *Client) ResetInstance(ctx context.Context, req *baremetalsolutionpb.ResetInstanceRequest, opts ...gax.CallOption) (*ResetInstanceOperation, error)
ResetInstance perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.ResetInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#ResetInstanceRequest. } op, err := c.ResetInstance(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) ResetInstanceOperation ¶
func (c *Client) ResetInstanceOperation(name string) *ResetInstanceOperation
ResetInstanceOperation returns a new ResetInstanceOperation from a given name. The name must be that of a previously created ResetInstanceOperation, possibly from a different process.
func (*Client) ResizeVolume ¶ added in v0.2.0
func (c *Client) ResizeVolume(ctx context.Context, req *baremetalsolutionpb.ResizeVolumeRequest, opts ...gax.CallOption) (*ResizeVolumeOperation, error)
ResizeVolume emergency Volume resize.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.ResizeVolumeRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#ResizeVolumeRequest. } op, err := c.ResizeVolume(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) ResizeVolumeOperation ¶ added in v0.2.0
func (c *Client) ResizeVolumeOperation(name string) *ResizeVolumeOperation
ResizeVolumeOperation returns a new ResizeVolumeOperation from a given name. The name must be that of a previously created ResizeVolumeOperation, possibly from a different process.
func (*Client) RestoreVolumeSnapshot ¶
func (c *Client) RestoreVolumeSnapshot(ctx context.Context, req *baremetalsolutionpb.RestoreVolumeSnapshotRequest, opts ...gax.CallOption) (*RestoreVolumeSnapshotOperation, error)
RestoreVolumeSnapshot uses the specified snapshot to restore its parent volume. Returns INVALID_ARGUMENT if called for a non-boot volume.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.RestoreVolumeSnapshotRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#RestoreVolumeSnapshotRequest. } op, err := c.RestoreVolumeSnapshot(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) RestoreVolumeSnapshotOperation ¶
func (c *Client) RestoreVolumeSnapshotOperation(name string) *RestoreVolumeSnapshotOperation
RestoreVolumeSnapshotOperation returns a new RestoreVolumeSnapshotOperation from a given name. The name must be that of a previously created RestoreVolumeSnapshotOperation, possibly from a different process.
func (*Client) StartInstance ¶ added in v0.2.0
func (c *Client) StartInstance(ctx context.Context, req *baremetalsolutionpb.StartInstanceRequest, opts ...gax.CallOption) (*StartInstanceOperation, error)
StartInstance starts a server that was shutdown.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.StartInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#StartInstanceRequest. } op, err := c.StartInstance(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) StartInstanceOperation ¶ added in v0.2.0
func (c *Client) StartInstanceOperation(name string) *StartInstanceOperation
StartInstanceOperation returns a new StartInstanceOperation from a given name. The name must be that of a previously created StartInstanceOperation, possibly from a different process.
func (*Client) StopInstance ¶ added in v0.2.0
func (c *Client) StopInstance(ctx context.Context, req *baremetalsolutionpb.StopInstanceRequest, opts ...gax.CallOption) (*StopInstanceOperation, error)
StopInstance stop a running server.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.StopInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#StopInstanceRequest. } op, err := c.StopInstance(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) StopInstanceOperation ¶ added in v0.2.0
func (c *Client) StopInstanceOperation(name string) *StopInstanceOperation
StopInstanceOperation returns a new StopInstanceOperation from a given name. The name must be that of a previously created StopInstanceOperation, possibly from a different process.
func (*Client) SubmitProvisioningConfig ¶ added in v1.2.0
func (c *Client) SubmitProvisioningConfig(ctx context.Context, req *baremetalsolutionpb.SubmitProvisioningConfigRequest, opts ...gax.CallOption) (*baremetalsolutionpb.SubmitProvisioningConfigResponse, error)
SubmitProvisioningConfig submit a provisiong configuration for a given project.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.SubmitProvisioningConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#SubmitProvisioningConfigRequest. } resp, err := c.SubmitProvisioningConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) UpdateInstance ¶ added in v0.2.0
func (c *Client) UpdateInstance(ctx context.Context, req *baremetalsolutionpb.UpdateInstanceRequest, opts ...gax.CallOption) (*UpdateInstanceOperation, error)
UpdateInstance update details of a single server.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.UpdateInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#UpdateInstanceRequest. } op, err := c.UpdateInstance(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) UpdateInstanceOperation ¶ added in v0.2.0
func (c *Client) UpdateInstanceOperation(name string) *UpdateInstanceOperation
UpdateInstanceOperation returns a new UpdateInstanceOperation from a given name. The name must be that of a previously created UpdateInstanceOperation, possibly from a different process.
func (*Client) UpdateNetwork ¶ added in v0.2.0
func (c *Client) UpdateNetwork(ctx context.Context, req *baremetalsolutionpb.UpdateNetworkRequest, opts ...gax.CallOption) (*UpdateNetworkOperation, error)
UpdateNetwork update details of a single network.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.UpdateNetworkRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#UpdateNetworkRequest. } op, err := c.UpdateNetwork(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) UpdateNetworkOperation ¶ added in v0.2.0
func (c *Client) UpdateNetworkOperation(name string) *UpdateNetworkOperation
UpdateNetworkOperation returns a new UpdateNetworkOperation from a given name. The name must be that of a previously created UpdateNetworkOperation, possibly from a different process.
func (*Client) UpdateNfsShare ¶ added in v0.2.0
func (c *Client) UpdateNfsShare(ctx context.Context, req *baremetalsolutionpb.UpdateNfsShareRequest, opts ...gax.CallOption) (*UpdateNfsShareOperation, error)
UpdateNfsShare update details of a single NFS share.
func (*Client) UpdateNfsShareOperation ¶ added in v0.2.0
func (c *Client) UpdateNfsShareOperation(name string) *UpdateNfsShareOperation
UpdateNfsShareOperation returns a new UpdateNfsShareOperation from a given name. The name must be that of a previously created UpdateNfsShareOperation, possibly from a different process.
func (*Client) UpdateProvisioningConfig ¶ added in v1.2.0
func (c *Client) UpdateProvisioningConfig(ctx context.Context, req *baremetalsolutionpb.UpdateProvisioningConfigRequest, opts ...gax.CallOption) (*baremetalsolutionpb.ProvisioningConfig, error)
UpdateProvisioningConfig update existing ProvisioningConfig.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.UpdateProvisioningConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#UpdateProvisioningConfigRequest. } resp, err := c.UpdateProvisioningConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) UpdateVolume ¶
func (c *Client) UpdateVolume(ctx context.Context, req *baremetalsolutionpb.UpdateVolumeRequest, opts ...gax.CallOption) (*UpdateVolumeOperation, error)
UpdateVolume update details of a single storage volume.
Example ¶
package main import ( "context" baremetalsolution "cloud.google.com/go/baremetalsolution/apiv2" baremetalsolutionpb "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb" ) 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.golang.ir/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &baremetalsolutionpb.UpdateVolumeRequest{ // TODO: Fill request struct fields. // See https://pkg.golang.ir/cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb#UpdateVolumeRequest. } op, err := c.UpdateVolume(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) UpdateVolumeOperation ¶
func (c *Client) UpdateVolumeOperation(name string) *UpdateVolumeOperation
UpdateVolumeOperation returns a new UpdateVolumeOperation from a given name. The name must be that of a previously created UpdateVolumeOperation, possibly from a different process.
type CreateNfsShareOperation ¶ added in v1.2.0
type CreateNfsShareOperation struct {
// contains filtered or unexported fields
}
CreateNfsShareOperation manages a long-running operation from CreateNfsShare.
func (*CreateNfsShareOperation) Done ¶ added in v1.2.0
func (op *CreateNfsShareOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateNfsShareOperation) Metadata ¶ added in v1.2.0
func (op *CreateNfsShareOperation) Metadata() (*baremetalsolutionpb.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 (*CreateNfsShareOperation) Name ¶ added in v1.2.0
func (op *CreateNfsShareOperation) 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 (*CreateNfsShareOperation) Poll ¶ added in v1.2.0
func (op *CreateNfsShareOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.NfsShare, 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 (*CreateNfsShareOperation) Wait ¶ added in v1.2.0
func (op *CreateNfsShareOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.NfsShare, 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.
type DeleteNfsShareOperation ¶ added in v1.2.0
type DeleteNfsShareOperation struct {
// contains filtered or unexported fields
}
DeleteNfsShareOperation manages a long-running operation from DeleteNfsShare.
func (*DeleteNfsShareOperation) Done ¶ added in v1.2.0
func (op *DeleteNfsShareOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteNfsShareOperation) Metadata ¶ added in v1.2.0
func (op *DeleteNfsShareOperation) Metadata() (*baremetalsolutionpb.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 (*DeleteNfsShareOperation) Name ¶ added in v1.2.0
func (op *DeleteNfsShareOperation) 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 (*DeleteNfsShareOperation) Poll ¶ added in v1.2.0
func (op *DeleteNfsShareOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteNfsShareOperation) Wait ¶ added in v1.2.0
func (op *DeleteNfsShareOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DetachLunOperation ¶ added in v0.2.0
type DetachLunOperation struct {
// contains filtered or unexported fields
}
DetachLunOperation manages a long-running operation from DetachLun.
func (*DetachLunOperation) Done ¶ added in v0.2.0
func (op *DetachLunOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DetachLunOperation) Metadata ¶ added in v0.2.0
func (op *DetachLunOperation) Metadata() (*baremetalsolutionpb.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 (*DetachLunOperation) Name ¶ added in v0.2.0
func (op *DetachLunOperation) 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 (*DetachLunOperation) Poll ¶ added in v0.2.0
func (op *DetachLunOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Instance, 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 (*DetachLunOperation) Wait ¶ added in v0.2.0
func (op *DetachLunOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Instance, 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.
type DisableInteractiveSerialConsoleOperation ¶ added in v1.2.0
type DisableInteractiveSerialConsoleOperation struct {
// contains filtered or unexported fields
}
DisableInteractiveSerialConsoleOperation manages a long-running operation from DisableInteractiveSerialConsole.
func (*DisableInteractiveSerialConsoleOperation) Done ¶ added in v1.2.0
func (op *DisableInteractiveSerialConsoleOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DisableInteractiveSerialConsoleOperation) Metadata ¶ added in v1.2.0
func (op *DisableInteractiveSerialConsoleOperation) Metadata() (*baremetalsolutionpb.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 (*DisableInteractiveSerialConsoleOperation) Name ¶ added in v1.2.0
func (op *DisableInteractiveSerialConsoleOperation) 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 (*DisableInteractiveSerialConsoleOperation) Poll ¶ added in v1.2.0
func (op *DisableInteractiveSerialConsoleOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.DisableInteractiveSerialConsoleResponse, 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 (*DisableInteractiveSerialConsoleOperation) Wait ¶ added in v1.2.0
func (op *DisableInteractiveSerialConsoleOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.DisableInteractiveSerialConsoleResponse, 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.
type EnableInteractiveSerialConsoleOperation ¶ added in v1.2.0
type EnableInteractiveSerialConsoleOperation struct {
// contains filtered or unexported fields
}
EnableInteractiveSerialConsoleOperation manages a long-running operation from EnableInteractiveSerialConsole.
func (*EnableInteractiveSerialConsoleOperation) Done ¶ added in v1.2.0
func (op *EnableInteractiveSerialConsoleOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*EnableInteractiveSerialConsoleOperation) Metadata ¶ added in v1.2.0
func (op *EnableInteractiveSerialConsoleOperation) Metadata() (*baremetalsolutionpb.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 (*EnableInteractiveSerialConsoleOperation) Name ¶ added in v1.2.0
func (op *EnableInteractiveSerialConsoleOperation) 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 (*EnableInteractiveSerialConsoleOperation) Poll ¶ added in v1.2.0
func (op *EnableInteractiveSerialConsoleOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.EnableInteractiveSerialConsoleResponse, 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 (*EnableInteractiveSerialConsoleOperation) Wait ¶ added in v1.2.0
func (op *EnableInteractiveSerialConsoleOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.EnableInteractiveSerialConsoleResponse, 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.
type EvictLunOperation ¶ added in v1.2.0
type EvictLunOperation struct {
// contains filtered or unexported fields
}
EvictLunOperation manages a long-running operation from EvictLun.
func (*EvictLunOperation) Done ¶ added in v1.2.0
func (op *EvictLunOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*EvictLunOperation) Metadata ¶ added in v1.2.0
func (op *EvictLunOperation) Metadata() (*baremetalsolutionpb.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 (*EvictLunOperation) Name ¶ added in v1.2.0
func (op *EvictLunOperation) 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 (*EvictLunOperation) Poll ¶ added in v1.2.0
func (op *EvictLunOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*EvictLunOperation) Wait ¶ added in v1.2.0
func (op *EvictLunOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type EvictVolumeOperation ¶ added in v1.2.0
type EvictVolumeOperation struct {
// contains filtered or unexported fields
}
EvictVolumeOperation manages a long-running operation from EvictVolume.
func (*EvictVolumeOperation) Done ¶ added in v1.2.0
func (op *EvictVolumeOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*EvictVolumeOperation) Metadata ¶ added in v1.2.0
func (op *EvictVolumeOperation) Metadata() (*baremetalsolutionpb.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 (*EvictVolumeOperation) Name ¶ added in v1.2.0
func (op *EvictVolumeOperation) 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 (*EvictVolumeOperation) Poll ¶ added in v1.2.0
func (op *EvictVolumeOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*EvictVolumeOperation) Wait ¶ added in v1.2.0
func (op *EvictVolumeOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type InstanceIterator ¶
type InstanceIterator 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 []*baremetalsolutionpb.Instance, nextPageToken string, err error) // contains filtered or unexported fields }
InstanceIterator manages a stream of *baremetalsolutionpb.Instance.
func (*InstanceIterator) Next ¶
func (it *InstanceIterator) Next() (*baremetalsolutionpb.Instance, 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 (*InstanceIterator) PageInfo ¶
func (it *InstanceIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type LocationIterator ¶ added in v0.2.0
type LocationIterator 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 []*locationpb.Location, nextPageToken string, err error) // contains filtered or unexported fields }
LocationIterator manages a stream of *locationpb.Location.
func (*LocationIterator) Next ¶ added in v0.2.0
func (it *LocationIterator) Next() (*locationpb.Location, 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 (*LocationIterator) PageInfo ¶ added in v0.2.0
func (it *LocationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type LunIterator ¶
type LunIterator 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 []*baremetalsolutionpb.Lun, nextPageToken string, err error) // contains filtered or unexported fields }
LunIterator manages a stream of *baremetalsolutionpb.Lun.
func (*LunIterator) Next ¶
func (it *LunIterator) Next() (*baremetalsolutionpb.Lun, 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 (*LunIterator) PageInfo ¶
func (it *LunIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type NetworkIterator ¶
type NetworkIterator 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 []*baremetalsolutionpb.Network, nextPageToken string, err error) // contains filtered or unexported fields }
NetworkIterator manages a stream of *baremetalsolutionpb.Network.
func (*NetworkIterator) Next ¶
func (it *NetworkIterator) Next() (*baremetalsolutionpb.Network, 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 (*NetworkIterator) PageInfo ¶
func (it *NetworkIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type NfsShareIterator ¶ added in v0.2.0
type NfsShareIterator struct { // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // 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 []*baremetalsolutionpb.NfsShare, nextPageToken string, err error) // contains filtered or unexported fields }
NfsShareIterator manages a stream of *baremetalsolutionpb.NfsShare.
func (*NfsShareIterator) Next ¶ added in v0.2.0
func (it *NfsShareIterator) Next() (*baremetalsolutionpb.NfsShare, 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 (*NfsShareIterator) PageInfo ¶ added in v0.2.0
func (it *NfsShareIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type OSImageIterator ¶ added in v1.2.0
type OSImageIterator 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 []*baremetalsolutionpb.OSImage, nextPageToken string, err error) // contains filtered or unexported fields }
OSImageIterator manages a stream of *baremetalsolutionpb.OSImage.
func (*OSImageIterator) Next ¶ added in v1.2.0
func (it *OSImageIterator) Next() (*baremetalsolutionpb.OSImage, 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 (*OSImageIterator) PageInfo ¶ added in v1.2.0
func (it *OSImageIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ProvisioningQuotaIterator ¶ added in v1.2.0
type ProvisioningQuotaIterator 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 []*baremetalsolutionpb.ProvisioningQuota, nextPageToken string, err error) // contains filtered or unexported fields }
ProvisioningQuotaIterator manages a stream of *baremetalsolutionpb.ProvisioningQuota.
func (*ProvisioningQuotaIterator) Next ¶ added in v1.2.0
func (it *ProvisioningQuotaIterator) Next() (*baremetalsolutionpb.ProvisioningQuota, 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 (*ProvisioningQuotaIterator) PageInfo ¶ added in v1.2.0
func (it *ProvisioningQuotaIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ResetInstanceOperation ¶
type ResetInstanceOperation struct {
// contains filtered or unexported fields
}
ResetInstanceOperation manages a long-running operation from ResetInstance.
func (*ResetInstanceOperation) Done ¶
func (op *ResetInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ResetInstanceOperation) Metadata ¶
func (op *ResetInstanceOperation) Metadata() (*baremetalsolutionpb.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 (*ResetInstanceOperation) Name ¶
func (op *ResetInstanceOperation) 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 (*ResetInstanceOperation) Poll ¶
func (op *ResetInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.ResetInstanceResponse, 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 (*ResetInstanceOperation) Wait ¶
func (op *ResetInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.ResetInstanceResponse, 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.
type ResizeVolumeOperation ¶ added in v0.2.0
type ResizeVolumeOperation struct {
// contains filtered or unexported fields
}
ResizeVolumeOperation manages a long-running operation from ResizeVolume.
func (*ResizeVolumeOperation) Done ¶ added in v0.2.0
func (op *ResizeVolumeOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ResizeVolumeOperation) Metadata ¶ added in v0.2.0
func (op *ResizeVolumeOperation) Metadata() (*baremetalsolutionpb.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 (*ResizeVolumeOperation) Name ¶ added in v0.2.0
func (op *ResizeVolumeOperation) 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 (*ResizeVolumeOperation) Poll ¶ added in v0.2.0
func (op *ResizeVolumeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Volume, 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 (*ResizeVolumeOperation) Wait ¶ added in v0.2.0
func (op *ResizeVolumeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Volume, 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.
type RestoreVolumeSnapshotOperation ¶
type RestoreVolumeSnapshotOperation struct {
// contains filtered or unexported fields
}
RestoreVolumeSnapshotOperation manages a long-running operation from RestoreVolumeSnapshot.
func (*RestoreVolumeSnapshotOperation) Done ¶
func (op *RestoreVolumeSnapshotOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*RestoreVolumeSnapshotOperation) Metadata ¶
func (op *RestoreVolumeSnapshotOperation) Metadata() (*baremetalsolutionpb.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 (*RestoreVolumeSnapshotOperation) Name ¶
func (op *RestoreVolumeSnapshotOperation) 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 (*RestoreVolumeSnapshotOperation) Poll ¶
func (op *RestoreVolumeSnapshotOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.VolumeSnapshot, 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 (*RestoreVolumeSnapshotOperation) Wait ¶
func (op *RestoreVolumeSnapshotOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.VolumeSnapshot, 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.
type SSHKeyIterator ¶ added in v1.2.0
type SSHKeyIterator 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 []*baremetalsolutionpb.SSHKey, nextPageToken string, err error) // contains filtered or unexported fields }
SSHKeyIterator manages a stream of *baremetalsolutionpb.SSHKey.
func (*SSHKeyIterator) Next ¶ added in v1.2.0
func (it *SSHKeyIterator) Next() (*baremetalsolutionpb.SSHKey, 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 (*SSHKeyIterator) PageInfo ¶ added in v1.2.0
func (it *SSHKeyIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type StartInstanceOperation ¶ added in v0.2.0
type StartInstanceOperation struct {
// contains filtered or unexported fields
}
StartInstanceOperation manages a long-running operation from StartInstance.
func (*StartInstanceOperation) Done ¶ added in v0.2.0
func (op *StartInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*StartInstanceOperation) Metadata ¶ added in v0.2.0
func (op *StartInstanceOperation) Metadata() (*baremetalsolutionpb.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 (*StartInstanceOperation) Name ¶ added in v0.2.0
func (op *StartInstanceOperation) 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 (*StartInstanceOperation) Poll ¶ added in v0.2.0
func (op *StartInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.StartInstanceResponse, 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 (*StartInstanceOperation) Wait ¶ added in v0.2.0
func (op *StartInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.StartInstanceResponse, 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.
type StopInstanceOperation ¶ added in v0.2.0
type StopInstanceOperation struct {
// contains filtered or unexported fields
}
StopInstanceOperation manages a long-running operation from StopInstance.
func (*StopInstanceOperation) Done ¶ added in v0.2.0
func (op *StopInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*StopInstanceOperation) Metadata ¶ added in v0.2.0
func (op *StopInstanceOperation) Metadata() (*baremetalsolutionpb.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 (*StopInstanceOperation) Name ¶ added in v0.2.0
func (op *StopInstanceOperation) 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 (*StopInstanceOperation) Poll ¶ added in v0.2.0
func (op *StopInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.StopInstanceResponse, 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 (*StopInstanceOperation) Wait ¶ added in v0.2.0
func (op *StopInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.StopInstanceResponse, 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.
type UpdateInstanceOperation ¶ added in v0.2.0
type UpdateInstanceOperation struct {
// contains filtered or unexported fields
}
UpdateInstanceOperation manages a long-running operation from UpdateInstance.
func (*UpdateInstanceOperation) Done ¶ added in v0.2.0
func (op *UpdateInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateInstanceOperation) Metadata ¶ added in v0.2.0
func (op *UpdateInstanceOperation) Metadata() (*baremetalsolutionpb.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 (*UpdateInstanceOperation) Name ¶ added in v0.2.0
func (op *UpdateInstanceOperation) 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 (*UpdateInstanceOperation) Poll ¶ added in v0.2.0
func (op *UpdateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Instance, 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 (*UpdateInstanceOperation) Wait ¶ added in v0.2.0
func (op *UpdateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Instance, 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.
type UpdateNetworkOperation ¶ added in v0.2.0
type UpdateNetworkOperation struct {
// contains filtered or unexported fields
}
UpdateNetworkOperation manages a long-running operation from UpdateNetwork.
func (*UpdateNetworkOperation) Done ¶ added in v0.2.0
func (op *UpdateNetworkOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateNetworkOperation) Metadata ¶ added in v0.2.0
func (op *UpdateNetworkOperation) Metadata() (*baremetalsolutionpb.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 (*UpdateNetworkOperation) Name ¶ added in v0.2.0
func (op *UpdateNetworkOperation) 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 (*UpdateNetworkOperation) Poll ¶ added in v0.2.0
func (op *UpdateNetworkOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Network, 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 (*UpdateNetworkOperation) Wait ¶ added in v0.2.0
func (op *UpdateNetworkOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Network, 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.
type UpdateNfsShareOperation ¶ added in v0.2.0
type UpdateNfsShareOperation struct {
// contains filtered or unexported fields
}
UpdateNfsShareOperation manages a long-running operation from UpdateNfsShare.
func (*UpdateNfsShareOperation) Done ¶ added in v0.2.0
func (op *UpdateNfsShareOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateNfsShareOperation) Metadata ¶ added in v0.2.0
func (op *UpdateNfsShareOperation) Metadata() (*baremetalsolutionpb.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 (*UpdateNfsShareOperation) Name ¶ added in v0.2.0
func (op *UpdateNfsShareOperation) 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 (*UpdateNfsShareOperation) Poll ¶ added in v0.2.0
func (op *UpdateNfsShareOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.NfsShare, 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 (*UpdateNfsShareOperation) Wait ¶ added in v0.2.0
func (op *UpdateNfsShareOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.NfsShare, 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.
type UpdateVolumeOperation ¶
type UpdateVolumeOperation struct {
// contains filtered or unexported fields
}
UpdateVolumeOperation manages a long-running operation from UpdateVolume.
func (*UpdateVolumeOperation) Done ¶
func (op *UpdateVolumeOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateVolumeOperation) Metadata ¶
func (op *UpdateVolumeOperation) Metadata() (*baremetalsolutionpb.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 (*UpdateVolumeOperation) Name ¶
func (op *UpdateVolumeOperation) 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 (*UpdateVolumeOperation) Poll ¶
func (op *UpdateVolumeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Volume, 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 (*UpdateVolumeOperation) Wait ¶
func (op *UpdateVolumeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*baremetalsolutionpb.Volume, 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.
type VolumeIterator ¶
type VolumeIterator 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 []*baremetalsolutionpb.Volume, nextPageToken string, err error) // contains filtered or unexported fields }
VolumeIterator manages a stream of *baremetalsolutionpb.Volume.
func (*VolumeIterator) Next ¶
func (it *VolumeIterator) Next() (*baremetalsolutionpb.Volume, 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 (*VolumeIterator) PageInfo ¶
func (it *VolumeIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type VolumeSnapshotIterator ¶
type VolumeSnapshotIterator 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 []*baremetalsolutionpb.VolumeSnapshot, nextPageToken string, err error) // contains filtered or unexported fields }
VolumeSnapshotIterator manages a stream of *baremetalsolutionpb.VolumeSnapshot.
func (*VolumeSnapshotIterator) Next ¶
func (it *VolumeSnapshotIterator) Next() (*baremetalsolutionpb.VolumeSnapshot, 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 (*VolumeSnapshotIterator) PageInfo ¶
func (it *VolumeSnapshotIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.