Documentation ¶
Overview ¶
Package vmmigration is an auto-generated package for the VM Migration API.
Use the Migrate to Virtual Machines API to programmatically migrate workloads.
General documentation ¶
For information that is relevant for all client libraries please reference https://pkg.go.dev/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.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client ¶
The following is an example of making an API call with the newly created client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.AddGroupMigrationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#AddGroupMigrationRequest. } op, err := c.AddGroupMigration(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 AddGroupMigrationOperation
- func (op *AddGroupMigrationOperation) Done() bool
- func (op *AddGroupMigrationOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *AddGroupMigrationOperation) Name() string
- func (op *AddGroupMigrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.AddGroupMigrationResponse, error)
- func (op *AddGroupMigrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.AddGroupMigrationResponse, error)
- type CallOptions
- type CancelCloneJobOperation
- func (op *CancelCloneJobOperation) Done() bool
- func (op *CancelCloneJobOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *CancelCloneJobOperation) Name() string
- func (op *CancelCloneJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CancelCloneJobResponse, error)
- func (op *CancelCloneJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CancelCloneJobResponse, error)
- type CancelCutoverJobOperation
- func (op *CancelCutoverJobOperation) Done() bool
- func (op *CancelCutoverJobOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *CancelCutoverJobOperation) Name() string
- func (op *CancelCutoverJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CancelCutoverJobResponse, error)
- func (op *CancelCutoverJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CancelCutoverJobResponse, error)
- type Client
- func (c *Client) AddGroupMigration(ctx context.Context, req *vmmigrationpb.AddGroupMigrationRequest, ...) (*AddGroupMigrationOperation, error)
- func (c *Client) AddGroupMigrationOperation(name string) *AddGroupMigrationOperation
- func (c *Client) CancelCloneJob(ctx context.Context, req *vmmigrationpb.CancelCloneJobRequest, ...) (*CancelCloneJobOperation, error)
- func (c *Client) CancelCloneJobOperation(name string) *CancelCloneJobOperation
- func (c *Client) CancelCutoverJob(ctx context.Context, req *vmmigrationpb.CancelCutoverJobRequest, ...) (*CancelCutoverJobOperation, error)
- func (c *Client) CancelCutoverJobOperation(name string) *CancelCutoverJobOperation
- func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *Client) Close() error
- func (c *Client) Connection() *grpc.ClientConndeprecated
- func (c *Client) CreateCloneJob(ctx context.Context, req *vmmigrationpb.CreateCloneJobRequest, ...) (*CreateCloneJobOperation, error)
- func (c *Client) CreateCloneJobOperation(name string) *CreateCloneJobOperation
- func (c *Client) CreateCutoverJob(ctx context.Context, req *vmmigrationpb.CreateCutoverJobRequest, ...) (*CreateCutoverJobOperation, error)
- func (c *Client) CreateCutoverJobOperation(name string) *CreateCutoverJobOperation
- func (c *Client) CreateDatacenterConnector(ctx context.Context, req *vmmigrationpb.CreateDatacenterConnectorRequest, ...) (*CreateDatacenterConnectorOperation, error)
- func (c *Client) CreateDatacenterConnectorOperation(name string) *CreateDatacenterConnectorOperation
- func (c *Client) CreateGroup(ctx context.Context, req *vmmigrationpb.CreateGroupRequest, ...) (*CreateGroupOperation, error)
- func (c *Client) CreateGroupOperation(name string) *CreateGroupOperation
- func (c *Client) CreateMigratingVm(ctx context.Context, req *vmmigrationpb.CreateMigratingVmRequest, ...) (*CreateMigratingVmOperation, error)
- func (c *Client) CreateMigratingVmOperation(name string) *CreateMigratingVmOperation
- func (c *Client) CreateSource(ctx context.Context, req *vmmigrationpb.CreateSourceRequest, ...) (*CreateSourceOperation, error)
- func (c *Client) CreateSourceOperation(name string) *CreateSourceOperation
- func (c *Client) CreateTargetProject(ctx context.Context, req *vmmigrationpb.CreateTargetProjectRequest, ...) (*CreateTargetProjectOperation, error)
- func (c *Client) CreateTargetProjectOperation(name string) *CreateTargetProjectOperation
- func (c *Client) CreateUtilizationReport(ctx context.Context, req *vmmigrationpb.CreateUtilizationReportRequest, ...) (*CreateUtilizationReportOperation, error)
- func (c *Client) CreateUtilizationReportOperation(name string) *CreateUtilizationReportOperation
- func (c *Client) DeleteDatacenterConnector(ctx context.Context, req *vmmigrationpb.DeleteDatacenterConnectorRequest, ...) (*DeleteDatacenterConnectorOperation, error)
- func (c *Client) DeleteDatacenterConnectorOperation(name string) *DeleteDatacenterConnectorOperation
- func (c *Client) DeleteGroup(ctx context.Context, req *vmmigrationpb.DeleteGroupRequest, ...) (*DeleteGroupOperation, error)
- func (c *Client) DeleteGroupOperation(name string) *DeleteGroupOperation
- func (c *Client) DeleteMigratingVm(ctx context.Context, req *vmmigrationpb.DeleteMigratingVmRequest, ...) (*DeleteMigratingVmOperation, error)
- func (c *Client) DeleteMigratingVmOperation(name string) *DeleteMigratingVmOperation
- func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *Client) DeleteSource(ctx context.Context, req *vmmigrationpb.DeleteSourceRequest, ...) (*DeleteSourceOperation, error)
- func (c *Client) DeleteSourceOperation(name string) *DeleteSourceOperation
- func (c *Client) DeleteTargetProject(ctx context.Context, req *vmmigrationpb.DeleteTargetProjectRequest, ...) (*DeleteTargetProjectOperation, error)
- func (c *Client) DeleteTargetProjectOperation(name string) *DeleteTargetProjectOperation
- func (c *Client) DeleteUtilizationReport(ctx context.Context, req *vmmigrationpb.DeleteUtilizationReportRequest, ...) (*DeleteUtilizationReportOperation, error)
- func (c *Client) DeleteUtilizationReportOperation(name string) *DeleteUtilizationReportOperation
- func (c *Client) FetchInventory(ctx context.Context, req *vmmigrationpb.FetchInventoryRequest, ...) (*vmmigrationpb.FetchInventoryResponse, error)
- func (c *Client) FinalizeMigration(ctx context.Context, req *vmmigrationpb.FinalizeMigrationRequest, ...) (*FinalizeMigrationOperation, error)
- func (c *Client) FinalizeMigrationOperation(name string) *FinalizeMigrationOperation
- func (c *Client) GetCloneJob(ctx context.Context, req *vmmigrationpb.GetCloneJobRequest, ...) (*vmmigrationpb.CloneJob, error)
- func (c *Client) GetCutoverJob(ctx context.Context, req *vmmigrationpb.GetCutoverJobRequest, ...) (*vmmigrationpb.CutoverJob, error)
- func (c *Client) GetDatacenterConnector(ctx context.Context, req *vmmigrationpb.GetDatacenterConnectorRequest, ...) (*vmmigrationpb.DatacenterConnector, error)
- func (c *Client) GetGroup(ctx context.Context, req *vmmigrationpb.GetGroupRequest, ...) (*vmmigrationpb.Group, error)
- func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *Client) GetMigratingVm(ctx context.Context, req *vmmigrationpb.GetMigratingVmRequest, ...) (*vmmigrationpb.MigratingVm, error)
- func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *Client) GetReplicationCycle(ctx context.Context, req *vmmigrationpb.GetReplicationCycleRequest, ...) (*vmmigrationpb.ReplicationCycle, error)
- func (c *Client) GetSource(ctx context.Context, req *vmmigrationpb.GetSourceRequest, ...) (*vmmigrationpb.Source, error)
- func (c *Client) GetTargetProject(ctx context.Context, req *vmmigrationpb.GetTargetProjectRequest, ...) (*vmmigrationpb.TargetProject, error)
- func (c *Client) GetUtilizationReport(ctx context.Context, req *vmmigrationpb.GetUtilizationReportRequest, ...) (*vmmigrationpb.UtilizationReport, error)
- func (c *Client) ListCloneJobs(ctx context.Context, req *vmmigrationpb.ListCloneJobsRequest, ...) *CloneJobIterator
- func (c *Client) ListCutoverJobs(ctx context.Context, req *vmmigrationpb.ListCutoverJobsRequest, ...) *CutoverJobIterator
- func (c *Client) ListDatacenterConnectors(ctx context.Context, req *vmmigrationpb.ListDatacenterConnectorsRequest, ...) *DatacenterConnectorIterator
- func (c *Client) ListGroups(ctx context.Context, req *vmmigrationpb.ListGroupsRequest, ...) *GroupIterator
- func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *Client) ListMigratingVms(ctx context.Context, req *vmmigrationpb.ListMigratingVmsRequest, ...) *MigratingVmIterator
- func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *Client) ListReplicationCycles(ctx context.Context, req *vmmigrationpb.ListReplicationCyclesRequest, ...) *ReplicationCycleIterator
- func (c *Client) ListSources(ctx context.Context, req *vmmigrationpb.ListSourcesRequest, ...) *SourceIterator
- func (c *Client) ListTargetProjects(ctx context.Context, req *vmmigrationpb.ListTargetProjectsRequest, ...) *TargetProjectIterator
- func (c *Client) ListUtilizationReports(ctx context.Context, req *vmmigrationpb.ListUtilizationReportsRequest, ...) *UtilizationReportIterator
- func (c *Client) PauseMigration(ctx context.Context, req *vmmigrationpb.PauseMigrationRequest, ...) (*PauseMigrationOperation, error)
- func (c *Client) PauseMigrationOperation(name string) *PauseMigrationOperation
- func (c *Client) RemoveGroupMigration(ctx context.Context, req *vmmigrationpb.RemoveGroupMigrationRequest, ...) (*RemoveGroupMigrationOperation, error)
- func (c *Client) RemoveGroupMigrationOperation(name string) *RemoveGroupMigrationOperation
- func (c *Client) ResumeMigration(ctx context.Context, req *vmmigrationpb.ResumeMigrationRequest, ...) (*ResumeMigrationOperation, error)
- func (c *Client) ResumeMigrationOperation(name string) *ResumeMigrationOperation
- func (c *Client) StartMigration(ctx context.Context, req *vmmigrationpb.StartMigrationRequest, ...) (*StartMigrationOperation, error)
- func (c *Client) StartMigrationOperation(name string) *StartMigrationOperation
- func (c *Client) UpdateGroup(ctx context.Context, req *vmmigrationpb.UpdateGroupRequest, ...) (*UpdateGroupOperation, error)
- func (c *Client) UpdateGroupOperation(name string) *UpdateGroupOperation
- func (c *Client) UpdateMigratingVm(ctx context.Context, req *vmmigrationpb.UpdateMigratingVmRequest, ...) (*UpdateMigratingVmOperation, error)
- func (c *Client) UpdateMigratingVmOperation(name string) *UpdateMigratingVmOperation
- func (c *Client) UpdateSource(ctx context.Context, req *vmmigrationpb.UpdateSourceRequest, ...) (*UpdateSourceOperation, error)
- func (c *Client) UpdateSourceOperation(name string) *UpdateSourceOperation
- func (c *Client) UpdateTargetProject(ctx context.Context, req *vmmigrationpb.UpdateTargetProjectRequest, ...) (*UpdateTargetProjectOperation, error)
- func (c *Client) UpdateTargetProjectOperation(name string) *UpdateTargetProjectOperation
- func (c *Client) UpgradeAppliance(ctx context.Context, req *vmmigrationpb.UpgradeApplianceRequest, ...) (*UpgradeApplianceOperation, error)
- func (c *Client) UpgradeApplianceOperation(name string) *UpgradeApplianceOperation
- type CloneJobIterator
- type CreateCloneJobOperation
- func (op *CreateCloneJobOperation) Done() bool
- func (op *CreateCloneJobOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *CreateCloneJobOperation) Name() string
- func (op *CreateCloneJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CloneJob, error)
- func (op *CreateCloneJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CloneJob, error)
- type CreateCutoverJobOperation
- func (op *CreateCutoverJobOperation) Done() bool
- func (op *CreateCutoverJobOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *CreateCutoverJobOperation) Name() string
- func (op *CreateCutoverJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CutoverJob, error)
- func (op *CreateCutoverJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CutoverJob, error)
- type CreateDatacenterConnectorOperation
- func (op *CreateDatacenterConnectorOperation) Done() bool
- func (op *CreateDatacenterConnectorOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *CreateDatacenterConnectorOperation) Name() string
- func (op *CreateDatacenterConnectorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.DatacenterConnector, error)
- func (op *CreateDatacenterConnectorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.DatacenterConnector, error)
- type CreateGroupOperation
- func (op *CreateGroupOperation) Done() bool
- func (op *CreateGroupOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *CreateGroupOperation) Name() string
- func (op *CreateGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Group, error)
- func (op *CreateGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Group, error)
- type CreateMigratingVmOperation
- func (op *CreateMigratingVmOperation) Done() bool
- func (op *CreateMigratingVmOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *CreateMigratingVmOperation) Name() string
- func (op *CreateMigratingVmOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.MigratingVm, error)
- func (op *CreateMigratingVmOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.MigratingVm, error)
- type CreateSourceOperation
- func (op *CreateSourceOperation) Done() bool
- func (op *CreateSourceOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *CreateSourceOperation) Name() string
- func (op *CreateSourceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Source, error)
- func (op *CreateSourceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Source, error)
- type CreateTargetProjectOperation
- func (op *CreateTargetProjectOperation) Done() bool
- func (op *CreateTargetProjectOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *CreateTargetProjectOperation) Name() string
- func (op *CreateTargetProjectOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.TargetProject, error)
- func (op *CreateTargetProjectOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.TargetProject, error)
- type CreateUtilizationReportOperation
- func (op *CreateUtilizationReportOperation) Done() bool
- func (op *CreateUtilizationReportOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *CreateUtilizationReportOperation) Name() string
- func (op *CreateUtilizationReportOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.UtilizationReport, error)
- func (op *CreateUtilizationReportOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.UtilizationReport, error)
- type CutoverJobIterator
- type DatacenterConnectorIterator
- type DeleteDatacenterConnectorOperation
- func (op *DeleteDatacenterConnectorOperation) Done() bool
- func (op *DeleteDatacenterConnectorOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *DeleteDatacenterConnectorOperation) Name() string
- func (op *DeleteDatacenterConnectorOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteDatacenterConnectorOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteGroupOperation
- func (op *DeleteGroupOperation) Done() bool
- func (op *DeleteGroupOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *DeleteGroupOperation) Name() string
- func (op *DeleteGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteMigratingVmOperation
- func (op *DeleteMigratingVmOperation) Done() bool
- func (op *DeleteMigratingVmOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *DeleteMigratingVmOperation) Name() string
- func (op *DeleteMigratingVmOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteMigratingVmOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteSourceOperation
- func (op *DeleteSourceOperation) Done() bool
- func (op *DeleteSourceOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *DeleteSourceOperation) Name() string
- func (op *DeleteSourceOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteSourceOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteTargetProjectOperation
- func (op *DeleteTargetProjectOperation) Done() bool
- func (op *DeleteTargetProjectOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *DeleteTargetProjectOperation) Name() string
- func (op *DeleteTargetProjectOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteTargetProjectOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteUtilizationReportOperation
- func (op *DeleteUtilizationReportOperation) Done() bool
- func (op *DeleteUtilizationReportOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *DeleteUtilizationReportOperation) Name() string
- func (op *DeleteUtilizationReportOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteUtilizationReportOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type FinalizeMigrationOperation
- func (op *FinalizeMigrationOperation) Done() bool
- func (op *FinalizeMigrationOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *FinalizeMigrationOperation) Name() string
- func (op *FinalizeMigrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.FinalizeMigrationResponse, error)
- func (op *FinalizeMigrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.FinalizeMigrationResponse, error)
- type GroupIterator
- type IamPolicyCallOptions
- type IamPolicyClient
- func (c *IamPolicyClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *IamPolicyClient) Close() error
- func (c *IamPolicyClient) Connection() *grpc.ClientConndeprecated
- func (c *IamPolicyClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *IamPolicyClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *IamPolicyClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *IamPolicyClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *IamPolicyClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *IamPolicyClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *IamPolicyClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *IamPolicyClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, ...) (*iampb.TestIamPermissionsResponse, error)
- type LocationIterator
- type MigratingVmIterator
- type OperationIterator
- type PauseMigrationOperation
- func (op *PauseMigrationOperation) Done() bool
- func (op *PauseMigrationOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *PauseMigrationOperation) Name() string
- func (op *PauseMigrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.PauseMigrationResponse, error)
- func (op *PauseMigrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.PauseMigrationResponse, error)
- type RemoveGroupMigrationOperation
- func (op *RemoveGroupMigrationOperation) Done() bool
- func (op *RemoveGroupMigrationOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *RemoveGroupMigrationOperation) Name() string
- func (op *RemoveGroupMigrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.RemoveGroupMigrationResponse, error)
- func (op *RemoveGroupMigrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.RemoveGroupMigrationResponse, error)
- type ReplicationCycleIterator
- type ResumeMigrationOperation
- func (op *ResumeMigrationOperation) Done() bool
- func (op *ResumeMigrationOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *ResumeMigrationOperation) Name() string
- func (op *ResumeMigrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.ResumeMigrationResponse, error)
- func (op *ResumeMigrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.ResumeMigrationResponse, error)
- type SourceIterator
- type StartMigrationOperation
- func (op *StartMigrationOperation) Done() bool
- func (op *StartMigrationOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *StartMigrationOperation) Name() string
- func (op *StartMigrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.StartMigrationResponse, error)
- func (op *StartMigrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.StartMigrationResponse, error)
- type TargetProjectIterator
- type UpdateGroupOperation
- func (op *UpdateGroupOperation) Done() bool
- func (op *UpdateGroupOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *UpdateGroupOperation) Name() string
- func (op *UpdateGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Group, error)
- func (op *UpdateGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Group, error)
- type UpdateMigratingVmOperation
- func (op *UpdateMigratingVmOperation) Done() bool
- func (op *UpdateMigratingVmOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *UpdateMigratingVmOperation) Name() string
- func (op *UpdateMigratingVmOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.MigratingVm, error)
- func (op *UpdateMigratingVmOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.MigratingVm, error)
- type UpdateSourceOperation
- func (op *UpdateSourceOperation) Done() bool
- func (op *UpdateSourceOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *UpdateSourceOperation) Name() string
- func (op *UpdateSourceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Source, error)
- func (op *UpdateSourceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Source, error)
- type UpdateTargetProjectOperation
- func (op *UpdateTargetProjectOperation) Done() bool
- func (op *UpdateTargetProjectOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *UpdateTargetProjectOperation) Name() string
- func (op *UpdateTargetProjectOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.TargetProject, error)
- func (op *UpdateTargetProjectOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.TargetProject, error)
- type UpgradeApplianceOperation
- func (op *UpgradeApplianceOperation) Done() bool
- func (op *UpgradeApplianceOperation) Metadata() (*vmmigrationpb.OperationMetadata, error)
- func (op *UpgradeApplianceOperation) Name() string
- func (op *UpgradeApplianceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.UpgradeApplianceResponse, error)
- func (op *UpgradeApplianceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.UpgradeApplianceResponse, error)
- type UtilizationReportIterator
Examples ¶
- Client.AddGroupMigration
- Client.CancelCloneJob
- Client.CancelCutoverJob
- Client.CancelOperation
- Client.CreateCloneJob
- Client.CreateCutoverJob
- Client.CreateDatacenterConnector
- Client.CreateGroup
- Client.CreateMigratingVm
- Client.CreateSource
- Client.CreateTargetProject
- Client.CreateUtilizationReport
- Client.DeleteDatacenterConnector
- Client.DeleteGroup
- Client.DeleteMigratingVm
- Client.DeleteOperation
- Client.DeleteSource
- Client.DeleteTargetProject
- Client.DeleteUtilizationReport
- Client.FetchInventory
- Client.FinalizeMigration
- Client.GetCloneJob
- Client.GetCutoverJob
- Client.GetDatacenterConnector
- Client.GetGroup
- Client.GetLocation
- Client.GetMigratingVm
- Client.GetOperation
- Client.GetReplicationCycle
- Client.GetSource
- Client.GetTargetProject
- Client.GetUtilizationReport
- Client.ListCloneJobs
- Client.ListCloneJobs (All)
- Client.ListCutoverJobs
- Client.ListCutoverJobs (All)
- Client.ListDatacenterConnectors
- Client.ListDatacenterConnectors (All)
- Client.ListGroups
- Client.ListGroups (All)
- Client.ListLocations
- Client.ListLocations (All)
- Client.ListMigratingVms
- Client.ListMigratingVms (All)
- Client.ListOperations
- Client.ListOperations (All)
- Client.ListReplicationCycles
- Client.ListReplicationCycles (All)
- Client.ListSources
- Client.ListSources (All)
- Client.ListTargetProjects
- Client.ListTargetProjects (All)
- Client.ListUtilizationReports
- Client.ListUtilizationReports (All)
- Client.PauseMigration
- Client.RemoveGroupMigration
- Client.ResumeMigration
- Client.StartMigration
- Client.UpdateGroup
- Client.UpdateMigratingVm
- Client.UpdateSource
- Client.UpdateTargetProject
- Client.UpgradeAppliance
- 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 AddGroupMigrationOperation ¶
type AddGroupMigrationOperation struct {
// contains filtered or unexported fields
}
AddGroupMigrationOperation manages a long-running operation from AddGroupMigration.
func (*AddGroupMigrationOperation) Done ¶
func (op *AddGroupMigrationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*AddGroupMigrationOperation) Metadata ¶
func (op *AddGroupMigrationOperation) Metadata() (*vmmigrationpb.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 (*AddGroupMigrationOperation) Name ¶
func (op *AddGroupMigrationOperation) 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 (*AddGroupMigrationOperation) Poll ¶
func (op *AddGroupMigrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.AddGroupMigrationResponse, 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 (*AddGroupMigrationOperation) Wait ¶
func (op *AddGroupMigrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.AddGroupMigrationResponse, 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 CallOptions ¶
type CallOptions struct { ListSources []gax.CallOption GetSource []gax.CallOption CreateSource []gax.CallOption UpdateSource []gax.CallOption DeleteSource []gax.CallOption FetchInventory []gax.CallOption ListUtilizationReports []gax.CallOption GetUtilizationReport []gax.CallOption CreateUtilizationReport []gax.CallOption DeleteUtilizationReport []gax.CallOption ListDatacenterConnectors []gax.CallOption GetDatacenterConnector []gax.CallOption CreateDatacenterConnector []gax.CallOption DeleteDatacenterConnector []gax.CallOption UpgradeAppliance []gax.CallOption CreateMigratingVm []gax.CallOption ListMigratingVms []gax.CallOption GetMigratingVm []gax.CallOption UpdateMigratingVm []gax.CallOption DeleteMigratingVm []gax.CallOption StartMigration []gax.CallOption ResumeMigration []gax.CallOption PauseMigration []gax.CallOption FinalizeMigration []gax.CallOption CreateCloneJob []gax.CallOption CancelCloneJob []gax.CallOption ListCloneJobs []gax.CallOption GetCloneJob []gax.CallOption CreateCutoverJob []gax.CallOption CancelCutoverJob []gax.CallOption ListCutoverJobs []gax.CallOption GetCutoverJob []gax.CallOption ListGroups []gax.CallOption GetGroup []gax.CallOption CreateGroup []gax.CallOption UpdateGroup []gax.CallOption DeleteGroup []gax.CallOption AddGroupMigration []gax.CallOption RemoveGroupMigration []gax.CallOption ListTargetProjects []gax.CallOption GetTargetProject []gax.CallOption CreateTargetProject []gax.CallOption UpdateTargetProject []gax.CallOption DeleteTargetProject []gax.CallOption ListReplicationCycles []gax.CallOption GetReplicationCycle []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption CancelOperation []gax.CallOption DeleteOperation []gax.CallOption GetOperation []gax.CallOption ListOperations []gax.CallOption }
CallOptions contains the retry settings for each method of Client.
type CancelCloneJobOperation ¶
type CancelCloneJobOperation struct {
// contains filtered or unexported fields
}
CancelCloneJobOperation manages a long-running operation from CancelCloneJob.
func (*CancelCloneJobOperation) Done ¶
func (op *CancelCloneJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CancelCloneJobOperation) Metadata ¶
func (op *CancelCloneJobOperation) Metadata() (*vmmigrationpb.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 (*CancelCloneJobOperation) Name ¶
func (op *CancelCloneJobOperation) 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 (*CancelCloneJobOperation) Poll ¶
func (op *CancelCloneJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CancelCloneJobResponse, 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 (*CancelCloneJobOperation) Wait ¶
func (op *CancelCloneJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CancelCloneJobResponse, 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 CancelCutoverJobOperation ¶
type CancelCutoverJobOperation struct {
// contains filtered or unexported fields
}
CancelCutoverJobOperation manages a long-running operation from CancelCutoverJob.
func (*CancelCutoverJobOperation) Done ¶
func (op *CancelCutoverJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CancelCutoverJobOperation) Metadata ¶
func (op *CancelCutoverJobOperation) Metadata() (*vmmigrationpb.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 (*CancelCutoverJobOperation) Name ¶
func (op *CancelCutoverJobOperation) 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 (*CancelCutoverJobOperation) Poll ¶
func (op *CancelCutoverJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CancelCutoverJobResponse, 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 (*CancelCutoverJobOperation) Wait ¶
func (op *CancelCutoverJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CancelCutoverJobResponse, 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 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 VM Migration API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
VM Migration Service
func NewClient ¶
NewClient creates a new vm migration client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
VM Migration Service
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewRESTClient ¶ added in v1.4.0
NewRESTClient creates a new vm migration rest client.
VM Migration Service
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*Client) AddGroupMigration ¶
func (c *Client) AddGroupMigration(ctx context.Context, req *vmmigrationpb.AddGroupMigrationRequest, opts ...gax.CallOption) (*AddGroupMigrationOperation, error)
AddGroupMigration adds a MigratingVm to a Group.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.AddGroupMigrationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#AddGroupMigrationRequest. } op, err := c.AddGroupMigration(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) AddGroupMigrationOperation ¶
func (c *Client) AddGroupMigrationOperation(name string) *AddGroupMigrationOperation
AddGroupMigrationOperation returns a new AddGroupMigrationOperation from a given name. The name must be that of a previously created AddGroupMigrationOperation, possibly from a different process.
func (*Client) CancelCloneJob ¶
func (c *Client) CancelCloneJob(ctx context.Context, req *vmmigrationpb.CancelCloneJobRequest, opts ...gax.CallOption) (*CancelCloneJobOperation, error)
CancelCloneJob initiates the cancellation of a running clone job.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.CancelCloneJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#CancelCloneJobRequest. } op, err := c.CancelCloneJob(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) CancelCloneJobOperation ¶
func (c *Client) CancelCloneJobOperation(name string) *CancelCloneJobOperation
CancelCloneJobOperation returns a new CancelCloneJobOperation from a given name. The name must be that of a previously created CancelCloneJobOperation, possibly from a different process.
func (*Client) CancelCutoverJob ¶
func (c *Client) CancelCutoverJob(ctx context.Context, req *vmmigrationpb.CancelCutoverJobRequest, opts ...gax.CallOption) (*CancelCutoverJobOperation, error)
CancelCutoverJob initiates the cancellation of a running cutover job.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.CancelCutoverJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#CancelCutoverJobRequest. } op, err := c.CancelCutoverJob(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) CancelCutoverJobOperation ¶
func (c *Client) CancelCutoverJobOperation(name string) *CancelCutoverJobOperation
CancelCutoverJobOperation returns a new CancelCutoverJobOperation from a given name. The name must be that of a previously created CancelCutoverJobOperation, possibly from a different process.
func (*Client) CancelOperation ¶ added in v1.5.0
func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" vmmigration "cloud.google.com/go/vmmigration/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } }
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) CreateCloneJob ¶
func (c *Client) CreateCloneJob(ctx context.Context, req *vmmigrationpb.CreateCloneJobRequest, opts ...gax.CallOption) (*CreateCloneJobOperation, error)
CreateCloneJob initiates a Clone of a specific migrating VM.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.CreateCloneJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#CreateCloneJobRequest. } op, err := c.CreateCloneJob(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) CreateCloneJobOperation ¶
func (c *Client) CreateCloneJobOperation(name string) *CreateCloneJobOperation
CreateCloneJobOperation returns a new CreateCloneJobOperation from a given name. The name must be that of a previously created CreateCloneJobOperation, possibly from a different process.
func (*Client) CreateCutoverJob ¶
func (c *Client) CreateCutoverJob(ctx context.Context, req *vmmigrationpb.CreateCutoverJobRequest, opts ...gax.CallOption) (*CreateCutoverJobOperation, error)
CreateCutoverJob initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover job resource is created and the job is initiated.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.CreateCutoverJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#CreateCutoverJobRequest. } op, err := c.CreateCutoverJob(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) CreateCutoverJobOperation ¶
func (c *Client) CreateCutoverJobOperation(name string) *CreateCutoverJobOperation
CreateCutoverJobOperation returns a new CreateCutoverJobOperation from a given name. The name must be that of a previously created CreateCutoverJobOperation, possibly from a different process.
func (*Client) CreateDatacenterConnector ¶
func (c *Client) CreateDatacenterConnector(ctx context.Context, req *vmmigrationpb.CreateDatacenterConnectorRequest, opts ...gax.CallOption) (*CreateDatacenterConnectorOperation, error)
CreateDatacenterConnector creates a new DatacenterConnector in a given Source.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.CreateDatacenterConnectorRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#CreateDatacenterConnectorRequest. } op, err := c.CreateDatacenterConnector(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) CreateDatacenterConnectorOperation ¶
func (c *Client) CreateDatacenterConnectorOperation(name string) *CreateDatacenterConnectorOperation
CreateDatacenterConnectorOperation returns a new CreateDatacenterConnectorOperation from a given name. The name must be that of a previously created CreateDatacenterConnectorOperation, possibly from a different process.
func (*Client) CreateGroup ¶
func (c *Client) CreateGroup(ctx context.Context, req *vmmigrationpb.CreateGroupRequest, opts ...gax.CallOption) (*CreateGroupOperation, error)
CreateGroup creates a new Group in a given project and location.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.CreateGroupRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#CreateGroupRequest. } op, err := c.CreateGroup(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) CreateGroupOperation ¶
func (c *Client) CreateGroupOperation(name string) *CreateGroupOperation
CreateGroupOperation returns a new CreateGroupOperation from a given name. The name must be that of a previously created CreateGroupOperation, possibly from a different process.
func (*Client) CreateMigratingVm ¶
func (c *Client) CreateMigratingVm(ctx context.Context, req *vmmigrationpb.CreateMigratingVmRequest, opts ...gax.CallOption) (*CreateMigratingVmOperation, error)
CreateMigratingVm creates a new MigratingVm in a given Source.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.CreateMigratingVmRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#CreateMigratingVmRequest. } op, err := c.CreateMigratingVm(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) CreateMigratingVmOperation ¶
func (c *Client) CreateMigratingVmOperation(name string) *CreateMigratingVmOperation
CreateMigratingVmOperation returns a new CreateMigratingVmOperation from a given name. The name must be that of a previously created CreateMigratingVmOperation, possibly from a different process.
func (*Client) CreateSource ¶
func (c *Client) CreateSource(ctx context.Context, req *vmmigrationpb.CreateSourceRequest, opts ...gax.CallOption) (*CreateSourceOperation, error)
CreateSource creates a new Source in a given project and location.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.CreateSourceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#CreateSourceRequest. } op, err := c.CreateSource(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) CreateSourceOperation ¶
func (c *Client) CreateSourceOperation(name string) *CreateSourceOperation
CreateSourceOperation returns a new CreateSourceOperation from a given name. The name must be that of a previously created CreateSourceOperation, possibly from a different process.
func (*Client) CreateTargetProject ¶
func (c *Client) CreateTargetProject(ctx context.Context, req *vmmigrationpb.CreateTargetProjectRequest, opts ...gax.CallOption) (*CreateTargetProjectOperation, error)
CreateTargetProject creates a new TargetProject in a given project.
NOTE: TargetProject is a global resource; hence the only supported value for location is global.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.CreateTargetProjectRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#CreateTargetProjectRequest. } op, err := c.CreateTargetProject(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) CreateTargetProjectOperation ¶
func (c *Client) CreateTargetProjectOperation(name string) *CreateTargetProjectOperation
CreateTargetProjectOperation returns a new CreateTargetProjectOperation from a given name. The name must be that of a previously created CreateTargetProjectOperation, possibly from a different process.
func (*Client) CreateUtilizationReport ¶
func (c *Client) CreateUtilizationReport(ctx context.Context, req *vmmigrationpb.CreateUtilizationReportRequest, opts ...gax.CallOption) (*CreateUtilizationReportOperation, error)
CreateUtilizationReport creates a new UtilizationReport.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.CreateUtilizationReportRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#CreateUtilizationReportRequest. } op, err := c.CreateUtilizationReport(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) CreateUtilizationReportOperation ¶
func (c *Client) CreateUtilizationReportOperation(name string) *CreateUtilizationReportOperation
CreateUtilizationReportOperation returns a new CreateUtilizationReportOperation from a given name. The name must be that of a previously created CreateUtilizationReportOperation, possibly from a different process.
func (*Client) DeleteDatacenterConnector ¶
func (c *Client) DeleteDatacenterConnector(ctx context.Context, req *vmmigrationpb.DeleteDatacenterConnectorRequest, opts ...gax.CallOption) (*DeleteDatacenterConnectorOperation, error)
DeleteDatacenterConnector deletes a single DatacenterConnector.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.DeleteDatacenterConnectorRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#DeleteDatacenterConnectorRequest. } op, err := c.DeleteDatacenterConnector(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DeleteDatacenterConnectorOperation ¶
func (c *Client) DeleteDatacenterConnectorOperation(name string) *DeleteDatacenterConnectorOperation
DeleteDatacenterConnectorOperation returns a new DeleteDatacenterConnectorOperation from a given name. The name must be that of a previously created DeleteDatacenterConnectorOperation, possibly from a different process.
func (*Client) DeleteGroup ¶
func (c *Client) DeleteGroup(ctx context.Context, req *vmmigrationpb.DeleteGroupRequest, opts ...gax.CallOption) (*DeleteGroupOperation, error)
DeleteGroup deletes a single Group.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.DeleteGroupRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#DeleteGroupRequest. } op, err := c.DeleteGroup(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DeleteGroupOperation ¶
func (c *Client) DeleteGroupOperation(name string) *DeleteGroupOperation
DeleteGroupOperation returns a new DeleteGroupOperation from a given name. The name must be that of a previously created DeleteGroupOperation, possibly from a different process.
func (*Client) DeleteMigratingVm ¶
func (c *Client) DeleteMigratingVm(ctx context.Context, req *vmmigrationpb.DeleteMigratingVmRequest, opts ...gax.CallOption) (*DeleteMigratingVmOperation, error)
DeleteMigratingVm deletes a single MigratingVm.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.DeleteMigratingVmRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#DeleteMigratingVmRequest. } op, err := c.DeleteMigratingVm(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DeleteMigratingVmOperation ¶
func (c *Client) DeleteMigratingVmOperation(name string) *DeleteMigratingVmOperation
DeleteMigratingVmOperation returns a new DeleteMigratingVmOperation from a given name. The name must be that of a previously created DeleteMigratingVmOperation, possibly from a different process.
func (*Client) DeleteOperation ¶ added in v1.5.0
func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" vmmigration "cloud.google.com/go/vmmigration/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.DeleteOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. } err = c.DeleteOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DeleteSource ¶
func (c *Client) DeleteSource(ctx context.Context, req *vmmigrationpb.DeleteSourceRequest, opts ...gax.CallOption) (*DeleteSourceOperation, error)
DeleteSource deletes a single Source.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.DeleteSourceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#DeleteSourceRequest. } op, err := c.DeleteSource(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DeleteSourceOperation ¶
func (c *Client) DeleteSourceOperation(name string) *DeleteSourceOperation
DeleteSourceOperation returns a new DeleteSourceOperation from a given name. The name must be that of a previously created DeleteSourceOperation, possibly from a different process.
func (*Client) DeleteTargetProject ¶
func (c *Client) DeleteTargetProject(ctx context.Context, req *vmmigrationpb.DeleteTargetProjectRequest, opts ...gax.CallOption) (*DeleteTargetProjectOperation, error)
DeleteTargetProject deletes a single TargetProject.
NOTE: TargetProject is a global resource; hence the only supported value for location is global.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.DeleteTargetProjectRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#DeleteTargetProjectRequest. } op, err := c.DeleteTargetProject(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DeleteTargetProjectOperation ¶
func (c *Client) DeleteTargetProjectOperation(name string) *DeleteTargetProjectOperation
DeleteTargetProjectOperation returns a new DeleteTargetProjectOperation from a given name. The name must be that of a previously created DeleteTargetProjectOperation, possibly from a different process.
func (*Client) DeleteUtilizationReport ¶
func (c *Client) DeleteUtilizationReport(ctx context.Context, req *vmmigrationpb.DeleteUtilizationReportRequest, opts ...gax.CallOption) (*DeleteUtilizationReportOperation, error)
DeleteUtilizationReport deletes a single Utilization Report.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.DeleteUtilizationReportRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#DeleteUtilizationReportRequest. } op, err := c.DeleteUtilizationReport(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DeleteUtilizationReportOperation ¶
func (c *Client) DeleteUtilizationReportOperation(name string) *DeleteUtilizationReportOperation
DeleteUtilizationReportOperation returns a new DeleteUtilizationReportOperation from a given name. The name must be that of a previously created DeleteUtilizationReportOperation, possibly from a different process.
func (*Client) FetchInventory ¶
func (c *Client) FetchInventory(ctx context.Context, req *vmmigrationpb.FetchInventoryRequest, opts ...gax.CallOption) (*vmmigrationpb.FetchInventoryResponse, error)
FetchInventory list remote source’s inventory of VMs. The remote source is the onprem vCenter (remote in the sense it’s not in Compute Engine). The inventory describes the list of existing VMs in that source. Note that this operation lists the VMs on the remote source, as opposed to listing the MigratingVms resources in the vmmigration service.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.FetchInventoryRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#FetchInventoryRequest. } resp, err := c.FetchInventory(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) FinalizeMigration ¶
func (c *Client) FinalizeMigration(ctx context.Context, req *vmmigrationpb.FinalizeMigrationRequest, opts ...gax.CallOption) (*FinalizeMigrationOperation, error)
FinalizeMigration marks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.FinalizeMigrationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#FinalizeMigrationRequest. } op, err := c.FinalizeMigration(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) FinalizeMigrationOperation ¶
func (c *Client) FinalizeMigrationOperation(name string) *FinalizeMigrationOperation
FinalizeMigrationOperation returns a new FinalizeMigrationOperation from a given name. The name must be that of a previously created FinalizeMigrationOperation, possibly from a different process.
func (*Client) GetCloneJob ¶
func (c *Client) GetCloneJob(ctx context.Context, req *vmmigrationpb.GetCloneJobRequest, opts ...gax.CallOption) (*vmmigrationpb.CloneJob, error)
GetCloneJob gets details of a single CloneJob.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.GetCloneJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#GetCloneJobRequest. } resp, err := c.GetCloneJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetCutoverJob ¶
func (c *Client) GetCutoverJob(ctx context.Context, req *vmmigrationpb.GetCutoverJobRequest, opts ...gax.CallOption) (*vmmigrationpb.CutoverJob, error)
GetCutoverJob gets details of a single CutoverJob.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.GetCutoverJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#GetCutoverJobRequest. } resp, err := c.GetCutoverJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetDatacenterConnector ¶
func (c *Client) GetDatacenterConnector(ctx context.Context, req *vmmigrationpb.GetDatacenterConnectorRequest, opts ...gax.CallOption) (*vmmigrationpb.DatacenterConnector, error)
GetDatacenterConnector gets details of a single DatacenterConnector.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.GetDatacenterConnectorRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#GetDatacenterConnectorRequest. } resp, err := c.GetDatacenterConnector(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetGroup ¶
func (c *Client) GetGroup(ctx context.Context, req *vmmigrationpb.GetGroupRequest, opts ...gax.CallOption) (*vmmigrationpb.Group, error)
GetGroup gets details of a single Group.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.GetGroupRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#GetGroupRequest. } resp, err := c.GetGroup(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetLocation ¶ added in v1.5.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" vmmigration "cloud.google.com/go/vmmigration/apiv1" 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.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.GetLocationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/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) GetMigratingVm ¶
func (c *Client) GetMigratingVm(ctx context.Context, req *vmmigrationpb.GetMigratingVmRequest, opts ...gax.CallOption) (*vmmigrationpb.MigratingVm, error)
GetMigratingVm gets details of a single MigratingVm.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.GetMigratingVmRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#GetMigratingVmRequest. } resp, err := c.GetMigratingVm(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetOperation ¶ added in v1.5.0
func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" vmmigration "cloud.google.com/go/vmmigration/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetReplicationCycle ¶ added in v1.5.0
func (c *Client) GetReplicationCycle(ctx context.Context, req *vmmigrationpb.GetReplicationCycleRequest, opts ...gax.CallOption) (*vmmigrationpb.ReplicationCycle, error)
GetReplicationCycle gets details of a single ReplicationCycle.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.GetReplicationCycleRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#GetReplicationCycleRequest. } resp, err := c.GetReplicationCycle(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetSource ¶
func (c *Client) GetSource(ctx context.Context, req *vmmigrationpb.GetSourceRequest, opts ...gax.CallOption) (*vmmigrationpb.Source, error)
GetSource gets details of a single Source.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.GetSourceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#GetSourceRequest. } resp, err := c.GetSource(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetTargetProject ¶
func (c *Client) GetTargetProject(ctx context.Context, req *vmmigrationpb.GetTargetProjectRequest, opts ...gax.CallOption) (*vmmigrationpb.TargetProject, error)
GetTargetProject gets details of a single TargetProject.
NOTE: TargetProject is a global resource; hence the only supported value for location is global.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.GetTargetProjectRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#GetTargetProjectRequest. } resp, err := c.GetTargetProject(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetUtilizationReport ¶
func (c *Client) GetUtilizationReport(ctx context.Context, req *vmmigrationpb.GetUtilizationReportRequest, opts ...gax.CallOption) (*vmmigrationpb.UtilizationReport, error)
GetUtilizationReport gets a single Utilization Report.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.GetUtilizationReportRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#GetUtilizationReportRequest. } resp, err := c.GetUtilizationReport(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) ListCloneJobs ¶
func (c *Client) ListCloneJobs(ctx context.Context, req *vmmigrationpb.ListCloneJobsRequest, opts ...gax.CallOption) *CloneJobIterator
ListCloneJobs lists CloneJobs of a given migrating VM.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListCloneJobsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListCloneJobsRequest. } it := c.ListCloneJobs(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*vmmigrationpb.ListCloneJobsResponse) } }
Output:
Example (All) ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListCloneJobsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListCloneJobsRequest. } for resp, err := range c.ListCloneJobs(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListCutoverJobs ¶
func (c *Client) ListCutoverJobs(ctx context.Context, req *vmmigrationpb.ListCutoverJobsRequest, opts ...gax.CallOption) *CutoverJobIterator
ListCutoverJobs lists CutoverJobs of a given migrating VM.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListCutoverJobsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListCutoverJobsRequest. } it := c.ListCutoverJobs(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*vmmigrationpb.ListCutoverJobsResponse) } }
Output:
Example (All) ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListCutoverJobsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListCutoverJobsRequest. } for resp, err := range c.ListCutoverJobs(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListDatacenterConnectors ¶
func (c *Client) ListDatacenterConnectors(ctx context.Context, req *vmmigrationpb.ListDatacenterConnectorsRequest, opts ...gax.CallOption) *DatacenterConnectorIterator
ListDatacenterConnectors lists DatacenterConnectors in a given Source.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListDatacenterConnectorsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListDatacenterConnectorsRequest. } it := c.ListDatacenterConnectors(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*vmmigrationpb.ListDatacenterConnectorsResponse) } }
Output:
Example (All) ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListDatacenterConnectorsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListDatacenterConnectorsRequest. } for resp, err := range c.ListDatacenterConnectors(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListGroups ¶
func (c *Client) ListGroups(ctx context.Context, req *vmmigrationpb.ListGroupsRequest, opts ...gax.CallOption) *GroupIterator
ListGroups lists Groups in a given project and location.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListGroupsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListGroupsRequest. } it := c.ListGroups(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*vmmigrationpb.ListGroupsResponse) } }
Output:
Example (All) ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListGroupsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListGroupsRequest. } for resp, err := range c.ListGroups(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListLocations ¶ added in v1.5.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" vmmigration "cloud.google.com/go/vmmigration/apiv1" "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.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.ListLocationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*locationpb.ListLocationsResponse) } }
Output:
Example (All) ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" 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.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.ListLocationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListMigratingVms ¶
func (c *Client) ListMigratingVms(ctx context.Context, req *vmmigrationpb.ListMigratingVmsRequest, opts ...gax.CallOption) *MigratingVmIterator
ListMigratingVms lists MigratingVms in a given Source.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListMigratingVmsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListMigratingVmsRequest. } it := c.ListMigratingVms(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*vmmigrationpb.ListMigratingVmsResponse) } }
Output:
Example (All) ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListMigratingVmsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListMigratingVmsRequest. } for resp, err := range c.ListMigratingVms(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListOperations ¶ added in v1.5.0
func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" vmmigration "cloud.google.com/go/vmmigration/apiv1" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*longrunningpb.ListOperationsResponse) } }
Output:
Example (All) ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" vmmigration "cloud.google.com/go/vmmigration/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListReplicationCycles ¶ added in v1.5.0
func (c *Client) ListReplicationCycles(ctx context.Context, req *vmmigrationpb.ListReplicationCyclesRequest, opts ...gax.CallOption) *ReplicationCycleIterator
ListReplicationCycles lists ReplicationCycles in a given MigratingVM.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListReplicationCyclesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListReplicationCyclesRequest. } it := c.ListReplicationCycles(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*vmmigrationpb.ListReplicationCyclesResponse) } }
Output:
Example (All) ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListReplicationCyclesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListReplicationCyclesRequest. } for resp, err := range c.ListReplicationCycles(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListSources ¶
func (c *Client) ListSources(ctx context.Context, req *vmmigrationpb.ListSourcesRequest, opts ...gax.CallOption) *SourceIterator
ListSources lists Sources in a given project and location.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListSourcesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListSourcesRequest. } it := c.ListSources(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*vmmigrationpb.ListSourcesResponse) } }
Output:
Example (All) ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListSourcesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListSourcesRequest. } for resp, err := range c.ListSources(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListTargetProjects ¶
func (c *Client) ListTargetProjects(ctx context.Context, req *vmmigrationpb.ListTargetProjectsRequest, opts ...gax.CallOption) *TargetProjectIterator
ListTargetProjects lists TargetProjects in a given project.
NOTE: TargetProject is a global resource; hence the only supported value for location is global.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListTargetProjectsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListTargetProjectsRequest. } it := c.ListTargetProjects(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*vmmigrationpb.ListTargetProjectsResponse) } }
Output:
Example (All) ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListTargetProjectsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListTargetProjectsRequest. } for resp, err := range c.ListTargetProjects(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListUtilizationReports ¶
func (c *Client) ListUtilizationReports(ctx context.Context, req *vmmigrationpb.ListUtilizationReportsRequest, opts ...gax.CallOption) *UtilizationReportIterator
ListUtilizationReports lists Utilization Reports of the given Source.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListUtilizationReportsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListUtilizationReportsRequest. } it := c.ListUtilizationReports(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*vmmigrationpb.ListUtilizationReportsResponse) } }
Output:
Example (All) ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ListUtilizationReportsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ListUtilizationReportsRequest. } for resp, err := range c.ListUtilizationReports(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) PauseMigration ¶
func (c *Client) PauseMigration(ctx context.Context, req *vmmigrationpb.PauseMigrationRequest, opts ...gax.CallOption) (*PauseMigrationOperation, error)
PauseMigration pauses a migration for a VM. If cycle tasks are running they will be cancelled, preserving source task data. Further replication cycles will not be triggered while the VM is paused.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.PauseMigrationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#PauseMigrationRequest. } op, err := c.PauseMigration(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) PauseMigrationOperation ¶
func (c *Client) PauseMigrationOperation(name string) *PauseMigrationOperation
PauseMigrationOperation returns a new PauseMigrationOperation from a given name. The name must be that of a previously created PauseMigrationOperation, possibly from a different process.
func (*Client) RemoveGroupMigration ¶
func (c *Client) RemoveGroupMigration(ctx context.Context, req *vmmigrationpb.RemoveGroupMigrationRequest, opts ...gax.CallOption) (*RemoveGroupMigrationOperation, error)
RemoveGroupMigration removes a MigratingVm from a Group.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.RemoveGroupMigrationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#RemoveGroupMigrationRequest. } op, err := c.RemoveGroupMigration(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) RemoveGroupMigrationOperation ¶
func (c *Client) RemoveGroupMigrationOperation(name string) *RemoveGroupMigrationOperation
RemoveGroupMigrationOperation returns a new RemoveGroupMigrationOperation from a given name. The name must be that of a previously created RemoveGroupMigrationOperation, possibly from a different process.
func (*Client) ResumeMigration ¶
func (c *Client) ResumeMigration(ctx context.Context, req *vmmigrationpb.ResumeMigrationRequest, opts ...gax.CallOption) (*ResumeMigrationOperation, error)
ResumeMigration resumes a migration for a VM. When called on a paused migration, will start the process of uploading data and creating snapshots; when called on a completed cut-over migration, will update the migration to active state and start the process of uploading data and creating snapshots.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.ResumeMigrationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#ResumeMigrationRequest. } op, err := c.ResumeMigration(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) ResumeMigrationOperation ¶
func (c *Client) ResumeMigrationOperation(name string) *ResumeMigrationOperation
ResumeMigrationOperation returns a new ResumeMigrationOperation from a given name. The name must be that of a previously created ResumeMigrationOperation, possibly from a different process.
func (*Client) StartMigration ¶
func (c *Client) StartMigration(ctx context.Context, req *vmmigrationpb.StartMigrationRequest, opts ...gax.CallOption) (*StartMigrationOperation, error)
StartMigration starts migration for a VM. Starts the process of uploading data and creating snapshots, in replication cycles scheduled by the policy.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.StartMigrationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#StartMigrationRequest. } op, err := c.StartMigration(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) StartMigrationOperation ¶
func (c *Client) StartMigrationOperation(name string) *StartMigrationOperation
StartMigrationOperation returns a new StartMigrationOperation from a given name. The name must be that of a previously created StartMigrationOperation, possibly from a different process.
func (*Client) UpdateGroup ¶
func (c *Client) UpdateGroup(ctx context.Context, req *vmmigrationpb.UpdateGroupRequest, opts ...gax.CallOption) (*UpdateGroupOperation, error)
UpdateGroup updates the parameters of a single Group.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.UpdateGroupRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#UpdateGroupRequest. } op, err := c.UpdateGroup(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) UpdateGroupOperation ¶
func (c *Client) UpdateGroupOperation(name string) *UpdateGroupOperation
UpdateGroupOperation returns a new UpdateGroupOperation from a given name. The name must be that of a previously created UpdateGroupOperation, possibly from a different process.
func (*Client) UpdateMigratingVm ¶
func (c *Client) UpdateMigratingVm(ctx context.Context, req *vmmigrationpb.UpdateMigratingVmRequest, opts ...gax.CallOption) (*UpdateMigratingVmOperation, error)
UpdateMigratingVm updates the parameters of a single MigratingVm.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.UpdateMigratingVmRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#UpdateMigratingVmRequest. } op, err := c.UpdateMigratingVm(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) UpdateMigratingVmOperation ¶
func (c *Client) UpdateMigratingVmOperation(name string) *UpdateMigratingVmOperation
UpdateMigratingVmOperation returns a new UpdateMigratingVmOperation from a given name. The name must be that of a previously created UpdateMigratingVmOperation, possibly from a different process.
func (*Client) UpdateSource ¶
func (c *Client) UpdateSource(ctx context.Context, req *vmmigrationpb.UpdateSourceRequest, opts ...gax.CallOption) (*UpdateSourceOperation, error)
UpdateSource updates the parameters of a single Source.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.UpdateSourceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#UpdateSourceRequest. } op, err := c.UpdateSource(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) UpdateSourceOperation ¶
func (c *Client) UpdateSourceOperation(name string) *UpdateSourceOperation
UpdateSourceOperation returns a new UpdateSourceOperation from a given name. The name must be that of a previously created UpdateSourceOperation, possibly from a different process.
func (*Client) UpdateTargetProject ¶
func (c *Client) UpdateTargetProject(ctx context.Context, req *vmmigrationpb.UpdateTargetProjectRequest, opts ...gax.CallOption) (*UpdateTargetProjectOperation, error)
UpdateTargetProject updates the parameters of a single TargetProject.
NOTE: TargetProject is a global resource; hence the only supported value for location is global.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.UpdateTargetProjectRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#UpdateTargetProjectRequest. } op, err := c.UpdateTargetProject(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) UpdateTargetProjectOperation ¶
func (c *Client) UpdateTargetProjectOperation(name string) *UpdateTargetProjectOperation
UpdateTargetProjectOperation returns a new UpdateTargetProjectOperation from a given name. The name must be that of a previously created UpdateTargetProjectOperation, possibly from a different process.
func (*Client) UpgradeAppliance ¶ added in v1.1.0
func (c *Client) UpgradeAppliance(ctx context.Context, req *vmmigrationpb.UpgradeApplianceRequest, opts ...gax.CallOption) (*UpgradeApplianceOperation, error)
UpgradeAppliance upgrades the appliance relate to this DatacenterConnector to the in-place updateable version.
Example ¶
package main import ( "context" vmmigration "cloud.google.com/go/vmmigration/apiv1" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := vmmigration.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &vmmigrationpb.UpgradeApplianceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/vmmigration/apiv1/vmmigrationpb#UpgradeApplianceRequest. } op, err := c.UpgradeAppliance(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) UpgradeApplianceOperation ¶ added in v1.1.0
func (c *Client) UpgradeApplianceOperation(name string) *UpgradeApplianceOperation
UpgradeApplianceOperation returns a new UpgradeApplianceOperation from a given name. The name must be that of a previously created UpgradeApplianceOperation, possibly from a different process.
type CloneJobIterator ¶
type CloneJobIterator 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 []*vmmigrationpb.CloneJob, nextPageToken string, err error) // contains filtered or unexported fields }
CloneJobIterator manages a stream of *vmmigrationpb.CloneJob.
func (*CloneJobIterator) All ¶ added in v1.8.1
func (it *CloneJobIterator) All() iter.Seq2[*vmmigrationpb.CloneJob, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*CloneJobIterator) Next ¶
func (it *CloneJobIterator) Next() (*vmmigrationpb.CloneJob, 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 (*CloneJobIterator) PageInfo ¶
func (it *CloneJobIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CreateCloneJobOperation ¶
type CreateCloneJobOperation struct {
// contains filtered or unexported fields
}
CreateCloneJobOperation manages a long-running operation from CreateCloneJob.
func (*CreateCloneJobOperation) Done ¶
func (op *CreateCloneJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateCloneJobOperation) Metadata ¶
func (op *CreateCloneJobOperation) Metadata() (*vmmigrationpb.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 (*CreateCloneJobOperation) Name ¶
func (op *CreateCloneJobOperation) 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 (*CreateCloneJobOperation) Poll ¶
func (op *CreateCloneJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CloneJob, 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 (*CreateCloneJobOperation) Wait ¶
func (op *CreateCloneJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CloneJob, 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 CreateCutoverJobOperation ¶
type CreateCutoverJobOperation struct {
// contains filtered or unexported fields
}
CreateCutoverJobOperation manages a long-running operation from CreateCutoverJob.
func (*CreateCutoverJobOperation) Done ¶
func (op *CreateCutoverJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateCutoverJobOperation) Metadata ¶
func (op *CreateCutoverJobOperation) Metadata() (*vmmigrationpb.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 (*CreateCutoverJobOperation) Name ¶
func (op *CreateCutoverJobOperation) 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 (*CreateCutoverJobOperation) Poll ¶
func (op *CreateCutoverJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CutoverJob, 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 (*CreateCutoverJobOperation) Wait ¶
func (op *CreateCutoverJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.CutoverJob, 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 CreateDatacenterConnectorOperation ¶
type CreateDatacenterConnectorOperation struct {
// contains filtered or unexported fields
}
CreateDatacenterConnectorOperation manages a long-running operation from CreateDatacenterConnector.
func (*CreateDatacenterConnectorOperation) Done ¶
func (op *CreateDatacenterConnectorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateDatacenterConnectorOperation) Metadata ¶
func (op *CreateDatacenterConnectorOperation) Metadata() (*vmmigrationpb.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 (*CreateDatacenterConnectorOperation) Name ¶
func (op *CreateDatacenterConnectorOperation) 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 (*CreateDatacenterConnectorOperation) Poll ¶
func (op *CreateDatacenterConnectorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.DatacenterConnector, 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 (*CreateDatacenterConnectorOperation) Wait ¶
func (op *CreateDatacenterConnectorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.DatacenterConnector, 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 CreateGroupOperation ¶
type CreateGroupOperation struct {
// contains filtered or unexported fields
}
CreateGroupOperation manages a long-running operation from CreateGroup.
func (*CreateGroupOperation) Done ¶
func (op *CreateGroupOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateGroupOperation) Metadata ¶
func (op *CreateGroupOperation) Metadata() (*vmmigrationpb.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 (*CreateGroupOperation) Name ¶
func (op *CreateGroupOperation) 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 (*CreateGroupOperation) Poll ¶
func (op *CreateGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Group, 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 (*CreateGroupOperation) Wait ¶
func (op *CreateGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Group, 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 CreateMigratingVmOperation ¶
type CreateMigratingVmOperation struct {
// contains filtered or unexported fields
}
CreateMigratingVmOperation manages a long-running operation from CreateMigratingVm.
func (*CreateMigratingVmOperation) Done ¶
func (op *CreateMigratingVmOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateMigratingVmOperation) Metadata ¶
func (op *CreateMigratingVmOperation) Metadata() (*vmmigrationpb.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 (*CreateMigratingVmOperation) Name ¶
func (op *CreateMigratingVmOperation) 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 (*CreateMigratingVmOperation) Poll ¶
func (op *CreateMigratingVmOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.MigratingVm, 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 (*CreateMigratingVmOperation) Wait ¶
func (op *CreateMigratingVmOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.MigratingVm, 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 CreateSourceOperation ¶
type CreateSourceOperation struct {
// contains filtered or unexported fields
}
CreateSourceOperation manages a long-running operation from CreateSource.
func (*CreateSourceOperation) Done ¶
func (op *CreateSourceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateSourceOperation) Metadata ¶
func (op *CreateSourceOperation) Metadata() (*vmmigrationpb.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 (*CreateSourceOperation) Name ¶
func (op *CreateSourceOperation) 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 (*CreateSourceOperation) Poll ¶
func (op *CreateSourceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Source, 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 (*CreateSourceOperation) Wait ¶
func (op *CreateSourceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Source, 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 CreateTargetProjectOperation ¶
type CreateTargetProjectOperation struct {
// contains filtered or unexported fields
}
CreateTargetProjectOperation manages a long-running operation from CreateTargetProject.
func (*CreateTargetProjectOperation) Done ¶
func (op *CreateTargetProjectOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateTargetProjectOperation) Metadata ¶
func (op *CreateTargetProjectOperation) Metadata() (*vmmigrationpb.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 (*CreateTargetProjectOperation) Name ¶
func (op *CreateTargetProjectOperation) 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 (*CreateTargetProjectOperation) Poll ¶
func (op *CreateTargetProjectOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.TargetProject, 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 (*CreateTargetProjectOperation) Wait ¶
func (op *CreateTargetProjectOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.TargetProject, 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 CreateUtilizationReportOperation ¶
type CreateUtilizationReportOperation struct {
// contains filtered or unexported fields
}
CreateUtilizationReportOperation manages a long-running operation from CreateUtilizationReport.
func (*CreateUtilizationReportOperation) Done ¶
func (op *CreateUtilizationReportOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateUtilizationReportOperation) Metadata ¶
func (op *CreateUtilizationReportOperation) Metadata() (*vmmigrationpb.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 (*CreateUtilizationReportOperation) Name ¶
func (op *CreateUtilizationReportOperation) 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 (*CreateUtilizationReportOperation) Poll ¶
func (op *CreateUtilizationReportOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.UtilizationReport, 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 (*CreateUtilizationReportOperation) Wait ¶
func (op *CreateUtilizationReportOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.UtilizationReport, 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 CutoverJobIterator ¶
type CutoverJobIterator 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 []*vmmigrationpb.CutoverJob, nextPageToken string, err error) // contains filtered or unexported fields }
CutoverJobIterator manages a stream of *vmmigrationpb.CutoverJob.
func (*CutoverJobIterator) All ¶ added in v1.8.1
func (it *CutoverJobIterator) All() iter.Seq2[*vmmigrationpb.CutoverJob, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*CutoverJobIterator) Next ¶
func (it *CutoverJobIterator) Next() (*vmmigrationpb.CutoverJob, 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 (*CutoverJobIterator) PageInfo ¶
func (it *CutoverJobIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type DatacenterConnectorIterator ¶
type DatacenterConnectorIterator 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 []*vmmigrationpb.DatacenterConnector, nextPageToken string, err error) // contains filtered or unexported fields }
DatacenterConnectorIterator manages a stream of *vmmigrationpb.DatacenterConnector.
func (*DatacenterConnectorIterator) All ¶ added in v1.8.1
func (it *DatacenterConnectorIterator) All() iter.Seq2[*vmmigrationpb.DatacenterConnector, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*DatacenterConnectorIterator) Next ¶
func (it *DatacenterConnectorIterator) Next() (*vmmigrationpb.DatacenterConnector, 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 (*DatacenterConnectorIterator) PageInfo ¶
func (it *DatacenterConnectorIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type DeleteDatacenterConnectorOperation ¶
type DeleteDatacenterConnectorOperation struct {
// contains filtered or unexported fields
}
DeleteDatacenterConnectorOperation manages a long-running operation from DeleteDatacenterConnector.
func (*DeleteDatacenterConnectorOperation) Done ¶
func (op *DeleteDatacenterConnectorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteDatacenterConnectorOperation) Metadata ¶
func (op *DeleteDatacenterConnectorOperation) Metadata() (*vmmigrationpb.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 (*DeleteDatacenterConnectorOperation) Name ¶
func (op *DeleteDatacenterConnectorOperation) 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 (*DeleteDatacenterConnectorOperation) Poll ¶
func (op *DeleteDatacenterConnectorOperation) 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 (*DeleteDatacenterConnectorOperation) Wait ¶
func (op *DeleteDatacenterConnectorOperation) 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 DeleteGroupOperation ¶
type DeleteGroupOperation struct {
// contains filtered or unexported fields
}
DeleteGroupOperation manages a long-running operation from DeleteGroup.
func (*DeleteGroupOperation) Done ¶
func (op *DeleteGroupOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteGroupOperation) Metadata ¶
func (op *DeleteGroupOperation) Metadata() (*vmmigrationpb.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 (*DeleteGroupOperation) Name ¶
func (op *DeleteGroupOperation) 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 (*DeleteGroupOperation) Poll ¶
func (op *DeleteGroupOperation) 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 (*DeleteGroupOperation) Wait ¶
func (op *DeleteGroupOperation) 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 DeleteMigratingVmOperation ¶
type DeleteMigratingVmOperation struct {
// contains filtered or unexported fields
}
DeleteMigratingVmOperation manages a long-running operation from DeleteMigratingVm.
func (*DeleteMigratingVmOperation) Done ¶
func (op *DeleteMigratingVmOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteMigratingVmOperation) Metadata ¶
func (op *DeleteMigratingVmOperation) Metadata() (*vmmigrationpb.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 (*DeleteMigratingVmOperation) Name ¶
func (op *DeleteMigratingVmOperation) 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 (*DeleteMigratingVmOperation) Poll ¶
func (op *DeleteMigratingVmOperation) 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 (*DeleteMigratingVmOperation) Wait ¶
func (op *DeleteMigratingVmOperation) 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 DeleteSourceOperation ¶
type DeleteSourceOperation struct {
// contains filtered or unexported fields
}
DeleteSourceOperation manages a long-running operation from DeleteSource.
func (*DeleteSourceOperation) Done ¶
func (op *DeleteSourceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteSourceOperation) Metadata ¶
func (op *DeleteSourceOperation) Metadata() (*vmmigrationpb.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 (*DeleteSourceOperation) Name ¶
func (op *DeleteSourceOperation) 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 (*DeleteSourceOperation) Poll ¶
func (op *DeleteSourceOperation) 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 (*DeleteSourceOperation) Wait ¶
func (op *DeleteSourceOperation) 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 DeleteTargetProjectOperation ¶
type DeleteTargetProjectOperation struct {
// contains filtered or unexported fields
}
DeleteTargetProjectOperation manages a long-running operation from DeleteTargetProject.
func (*DeleteTargetProjectOperation) Done ¶
func (op *DeleteTargetProjectOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteTargetProjectOperation) Metadata ¶
func (op *DeleteTargetProjectOperation) Metadata() (*vmmigrationpb.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 (*DeleteTargetProjectOperation) Name ¶
func (op *DeleteTargetProjectOperation) 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 (*DeleteTargetProjectOperation) Poll ¶
func (op *DeleteTargetProjectOperation) 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 (*DeleteTargetProjectOperation) Wait ¶
func (op *DeleteTargetProjectOperation) 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 DeleteUtilizationReportOperation ¶
type DeleteUtilizationReportOperation struct {
// contains filtered or unexported fields
}
DeleteUtilizationReportOperation manages a long-running operation from DeleteUtilizationReport.
func (*DeleteUtilizationReportOperation) Done ¶
func (op *DeleteUtilizationReportOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteUtilizationReportOperation) Metadata ¶
func (op *DeleteUtilizationReportOperation) Metadata() (*vmmigrationpb.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 (*DeleteUtilizationReportOperation) Name ¶
func (op *DeleteUtilizationReportOperation) 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 (*DeleteUtilizationReportOperation) Poll ¶
func (op *DeleteUtilizationReportOperation) 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 (*DeleteUtilizationReportOperation) Wait ¶
func (op *DeleteUtilizationReportOperation) 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 FinalizeMigrationOperation ¶
type FinalizeMigrationOperation struct {
// contains filtered or unexported fields
}
FinalizeMigrationOperation manages a long-running operation from FinalizeMigration.
func (*FinalizeMigrationOperation) Done ¶
func (op *FinalizeMigrationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*FinalizeMigrationOperation) Metadata ¶
func (op *FinalizeMigrationOperation) Metadata() (*vmmigrationpb.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 (*FinalizeMigrationOperation) Name ¶
func (op *FinalizeMigrationOperation) 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 (*FinalizeMigrationOperation) Poll ¶
func (op *FinalizeMigrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.FinalizeMigrationResponse, 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 (*FinalizeMigrationOperation) Wait ¶
func (op *FinalizeMigrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.FinalizeMigrationResponse, 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 GroupIterator ¶
type GroupIterator 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 []*vmmigrationpb.Group, nextPageToken string, err error) // contains filtered or unexported fields }
GroupIterator manages a stream of *vmmigrationpb.Group.
func (*GroupIterator) All ¶ added in v1.8.1
func (it *GroupIterator) All() iter.Seq2[*vmmigrationpb.Group, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*GroupIterator) Next ¶
func (it *GroupIterator) Next() (*vmmigrationpb.Group, 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 (*GroupIterator) PageInfo ¶
func (it *GroupIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type IamPolicyCallOptions ¶ added in v1.6.0
type IamPolicyCallOptions struct { SetIamPolicy []gax.CallOption GetIamPolicy []gax.CallOption TestIamPermissions []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption CancelOperation []gax.CallOption DeleteOperation []gax.CallOption GetOperation []gax.CallOption ListOperations []gax.CallOption }
IamPolicyCallOptions contains the retry settings for each method of IamPolicyClient.
type IamPolicyClient ¶ added in v1.6.0
type IamPolicyClient struct { // The call options for this service. CallOptions *IamPolicyCallOptions // contains filtered or unexported fields }
IamPolicyClient is a client for interacting with Batch API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
API Overview ¶
Manages Identity and Access Management (IAM) policies.
Any implementation of an API that offers access control features implements the google.iam.v1.IAMPolicy interface.
Data modelAccess control is applied when a principal (user or service account), takes some action on a resource exposed by a service. Resources, identified by URI-like names, are the unit of access control specification. Service implementations can choose the granularity of access control and the supported permissions for their resources. For example one database service may allow access control to be specified only at the Table level, whereas another might allow access control to also be specified at the Column level.
Policy StructureSee google.iam.v1.Policy ¶
This is intentionally not a CRUD style API because access control policies are created and deleted implicitly with the resources to which they are attached.
func NewIamPolicyClient ¶ added in v1.6.0
func NewIamPolicyClient(ctx context.Context, opts ...option.ClientOption) (*IamPolicyClient, error)
NewIamPolicyClient creates a new iam policy client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
API Overview ¶
Manages Identity and Access Management (IAM) policies.
Any implementation of an API that offers access control features implements the google.iam.v1.IAMPolicy interface.
Data modelAccess control is applied when a principal (user or service account), takes some action on a resource exposed by a service. Resources, identified by URI-like names, are the unit of access control specification. Service implementations can choose the granularity of access control and the supported permissions for their resources. For example one database service may allow access control to be specified only at the Table level, whereas another might allow access control to also be specified at the Column level.
Policy StructureSee google.iam.v1.Policy ¶
This is intentionally not a CRUD style API because access control policies are created and deleted implicitly with the resources to which they are attached.
func NewIamPolicyRESTClient ¶ added in v1.6.0
func NewIamPolicyRESTClient(ctx context.Context, opts ...option.ClientOption) (*IamPolicyClient, error)
NewIamPolicyRESTClient creates a new iam policy rest client.
API Overview ¶
Manages Identity and Access Management (IAM) policies.
Any implementation of an API that offers access control features implements the google.iam.v1.IAMPolicy interface.
Data modelAccess control is applied when a principal (user or service account), takes some action on a resource exposed by a service. Resources, identified by URI-like names, are the unit of access control specification. Service implementations can choose the granularity of access control and the supported permissions for their resources. For example one database service may allow access control to be specified only at the Table level, whereas another might allow access control to also be specified at the Column level.
Policy StructureSee google.iam.v1.Policy ¶
This is intentionally not a CRUD style API because access control policies are created and deleted implicitly with the resources to which they are attached.
func (*IamPolicyClient) CancelOperation ¶ added in v1.6.0
func (c *IamPolicyClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
func (*IamPolicyClient) Close ¶ added in v1.6.0
func (c *IamPolicyClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*IamPolicyClient) Connection
deprecated
added in
v1.6.0
func (c *IamPolicyClient) 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 (*IamPolicyClient) DeleteOperation ¶ added in v1.6.0
func (c *IamPolicyClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
func (*IamPolicyClient) GetIamPolicy ¶ added in v1.6.0
func (c *IamPolicyClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
func (*IamPolicyClient) GetLocation ¶ added in v1.6.0
func (c *IamPolicyClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
func (*IamPolicyClient) GetOperation ¶ added in v1.6.0
func (c *IamPolicyClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
func (*IamPolicyClient) ListLocations ¶ added in v1.6.0
func (c *IamPolicyClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
func (*IamPolicyClient) ListOperations ¶ added in v1.6.0
func (c *IamPolicyClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
func (*IamPolicyClient) SetIamPolicy ¶ added in v1.6.0
func (c *IamPolicyClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
func (*IamPolicyClient) TestIamPermissions ¶ added in v1.6.0
func (c *IamPolicyClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
type LocationIterator ¶ added in v1.5.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) All ¶ added in v1.8.1
func (it *LocationIterator) All() iter.Seq2[*locationpb.Location, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*LocationIterator) Next ¶ added in v1.5.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 v1.5.0
func (it *LocationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type MigratingVmIterator ¶
type MigratingVmIterator 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 []*vmmigrationpb.MigratingVm, nextPageToken string, err error) // contains filtered or unexported fields }
MigratingVmIterator manages a stream of *vmmigrationpb.MigratingVm.
func (*MigratingVmIterator) All ¶ added in v1.8.1
func (it *MigratingVmIterator) All() iter.Seq2[*vmmigrationpb.MigratingVm, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*MigratingVmIterator) Next ¶
func (it *MigratingVmIterator) Next() (*vmmigrationpb.MigratingVm, 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 (*MigratingVmIterator) PageInfo ¶
func (it *MigratingVmIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type OperationIterator ¶ added in v1.5.0
type OperationIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) // contains filtered or unexported fields }
OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All ¶ added in v1.8.1
func (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*OperationIterator) Next ¶ added in v1.5.0
func (it *OperationIterator) Next() (*longrunningpb.Operation, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*OperationIterator) PageInfo ¶ added in v1.5.0
func (it *OperationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type PauseMigrationOperation ¶
type PauseMigrationOperation struct {
// contains filtered or unexported fields
}
PauseMigrationOperation manages a long-running operation from PauseMigration.
func (*PauseMigrationOperation) Done ¶
func (op *PauseMigrationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*PauseMigrationOperation) Metadata ¶
func (op *PauseMigrationOperation) Metadata() (*vmmigrationpb.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 (*PauseMigrationOperation) Name ¶
func (op *PauseMigrationOperation) 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 (*PauseMigrationOperation) Poll ¶
func (op *PauseMigrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.PauseMigrationResponse, 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 (*PauseMigrationOperation) Wait ¶
func (op *PauseMigrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.PauseMigrationResponse, 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 RemoveGroupMigrationOperation ¶
type RemoveGroupMigrationOperation struct {
// contains filtered or unexported fields
}
RemoveGroupMigrationOperation manages a long-running operation from RemoveGroupMigration.
func (*RemoveGroupMigrationOperation) Done ¶
func (op *RemoveGroupMigrationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*RemoveGroupMigrationOperation) Metadata ¶
func (op *RemoveGroupMigrationOperation) Metadata() (*vmmigrationpb.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 (*RemoveGroupMigrationOperation) Name ¶
func (op *RemoveGroupMigrationOperation) 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 (*RemoveGroupMigrationOperation) Poll ¶
func (op *RemoveGroupMigrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.RemoveGroupMigrationResponse, 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 (*RemoveGroupMigrationOperation) Wait ¶
func (op *RemoveGroupMigrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.RemoveGroupMigrationResponse, 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 ReplicationCycleIterator ¶ added in v1.5.0
type ReplicationCycleIterator 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 []*vmmigrationpb.ReplicationCycle, nextPageToken string, err error) // contains filtered or unexported fields }
ReplicationCycleIterator manages a stream of *vmmigrationpb.ReplicationCycle.
func (*ReplicationCycleIterator) All ¶ added in v1.8.1
func (it *ReplicationCycleIterator) All() iter.Seq2[*vmmigrationpb.ReplicationCycle, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ReplicationCycleIterator) Next ¶ added in v1.5.0
func (it *ReplicationCycleIterator) Next() (*vmmigrationpb.ReplicationCycle, 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 (*ReplicationCycleIterator) PageInfo ¶ added in v1.5.0
func (it *ReplicationCycleIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ResumeMigrationOperation ¶
type ResumeMigrationOperation struct {
// contains filtered or unexported fields
}
ResumeMigrationOperation manages a long-running operation from ResumeMigration.
func (*ResumeMigrationOperation) Done ¶
func (op *ResumeMigrationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ResumeMigrationOperation) Metadata ¶
func (op *ResumeMigrationOperation) Metadata() (*vmmigrationpb.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 (*ResumeMigrationOperation) Name ¶
func (op *ResumeMigrationOperation) 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 (*ResumeMigrationOperation) Poll ¶
func (op *ResumeMigrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.ResumeMigrationResponse, 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 (*ResumeMigrationOperation) Wait ¶
func (op *ResumeMigrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.ResumeMigrationResponse, 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 SourceIterator ¶
type SourceIterator 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 []*vmmigrationpb.Source, nextPageToken string, err error) // contains filtered or unexported fields }
SourceIterator manages a stream of *vmmigrationpb.Source.
func (*SourceIterator) All ¶ added in v1.8.1
func (it *SourceIterator) All() iter.Seq2[*vmmigrationpb.Source, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*SourceIterator) Next ¶
func (it *SourceIterator) Next() (*vmmigrationpb.Source, 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 (*SourceIterator) PageInfo ¶
func (it *SourceIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type StartMigrationOperation ¶
type StartMigrationOperation struct {
// contains filtered or unexported fields
}
StartMigrationOperation manages a long-running operation from StartMigration.
func (*StartMigrationOperation) Done ¶
func (op *StartMigrationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*StartMigrationOperation) Metadata ¶
func (op *StartMigrationOperation) Metadata() (*vmmigrationpb.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 (*StartMigrationOperation) Name ¶
func (op *StartMigrationOperation) 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 (*StartMigrationOperation) Poll ¶
func (op *StartMigrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.StartMigrationResponse, 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 (*StartMigrationOperation) Wait ¶
func (op *StartMigrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.StartMigrationResponse, 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 TargetProjectIterator ¶
type TargetProjectIterator 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 []*vmmigrationpb.TargetProject, nextPageToken string, err error) // contains filtered or unexported fields }
TargetProjectIterator manages a stream of *vmmigrationpb.TargetProject.
func (*TargetProjectIterator) All ¶ added in v1.8.1
func (it *TargetProjectIterator) All() iter.Seq2[*vmmigrationpb.TargetProject, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*TargetProjectIterator) Next ¶
func (it *TargetProjectIterator) Next() (*vmmigrationpb.TargetProject, 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 (*TargetProjectIterator) PageInfo ¶
func (it *TargetProjectIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type UpdateGroupOperation ¶
type UpdateGroupOperation struct {
// contains filtered or unexported fields
}
UpdateGroupOperation manages a long-running operation from UpdateGroup.
func (*UpdateGroupOperation) Done ¶
func (op *UpdateGroupOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateGroupOperation) Metadata ¶
func (op *UpdateGroupOperation) Metadata() (*vmmigrationpb.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 (*UpdateGroupOperation) Name ¶
func (op *UpdateGroupOperation) 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 (*UpdateGroupOperation) Poll ¶
func (op *UpdateGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Group, 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 (*UpdateGroupOperation) Wait ¶
func (op *UpdateGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Group, 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 UpdateMigratingVmOperation ¶
type UpdateMigratingVmOperation struct {
// contains filtered or unexported fields
}
UpdateMigratingVmOperation manages a long-running operation from UpdateMigratingVm.
func (*UpdateMigratingVmOperation) Done ¶
func (op *UpdateMigratingVmOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateMigratingVmOperation) Metadata ¶
func (op *UpdateMigratingVmOperation) Metadata() (*vmmigrationpb.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 (*UpdateMigratingVmOperation) Name ¶
func (op *UpdateMigratingVmOperation) 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 (*UpdateMigratingVmOperation) Poll ¶
func (op *UpdateMigratingVmOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.MigratingVm, 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 (*UpdateMigratingVmOperation) Wait ¶
func (op *UpdateMigratingVmOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.MigratingVm, 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 UpdateSourceOperation ¶
type UpdateSourceOperation struct {
// contains filtered or unexported fields
}
UpdateSourceOperation manages a long-running operation from UpdateSource.
func (*UpdateSourceOperation) Done ¶
func (op *UpdateSourceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateSourceOperation) Metadata ¶
func (op *UpdateSourceOperation) Metadata() (*vmmigrationpb.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 (*UpdateSourceOperation) Name ¶
func (op *UpdateSourceOperation) 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 (*UpdateSourceOperation) Poll ¶
func (op *UpdateSourceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Source, 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 (*UpdateSourceOperation) Wait ¶
func (op *UpdateSourceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.Source, 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 UpdateTargetProjectOperation ¶
type UpdateTargetProjectOperation struct {
// contains filtered or unexported fields
}
UpdateTargetProjectOperation manages a long-running operation from UpdateTargetProject.
func (*UpdateTargetProjectOperation) Done ¶
func (op *UpdateTargetProjectOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateTargetProjectOperation) Metadata ¶
func (op *UpdateTargetProjectOperation) Metadata() (*vmmigrationpb.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 (*UpdateTargetProjectOperation) Name ¶
func (op *UpdateTargetProjectOperation) 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 (*UpdateTargetProjectOperation) Poll ¶
func (op *UpdateTargetProjectOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.TargetProject, 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 (*UpdateTargetProjectOperation) Wait ¶
func (op *UpdateTargetProjectOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.TargetProject, 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 UpgradeApplianceOperation ¶ added in v1.1.0
type UpgradeApplianceOperation struct {
// contains filtered or unexported fields
}
UpgradeApplianceOperation manages a long-running operation from UpgradeAppliance.
func (*UpgradeApplianceOperation) Done ¶ added in v1.1.0
func (op *UpgradeApplianceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpgradeApplianceOperation) Metadata ¶ added in v1.1.0
func (op *UpgradeApplianceOperation) Metadata() (*vmmigrationpb.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 (*UpgradeApplianceOperation) Name ¶ added in v1.1.0
func (op *UpgradeApplianceOperation) 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 (*UpgradeApplianceOperation) Poll ¶ added in v1.1.0
func (op *UpgradeApplianceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.UpgradeApplianceResponse, 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 (*UpgradeApplianceOperation) Wait ¶ added in v1.1.0
func (op *UpgradeApplianceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vmmigrationpb.UpgradeApplianceResponse, 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 UtilizationReportIterator ¶
type UtilizationReportIterator 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 []*vmmigrationpb.UtilizationReport, nextPageToken string, err error) // contains filtered or unexported fields }
UtilizationReportIterator manages a stream of *vmmigrationpb.UtilizationReport.
func (*UtilizationReportIterator) All ¶ added in v1.8.1
func (it *UtilizationReportIterator) All() iter.Seq2[*vmmigrationpb.UtilizationReport, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*UtilizationReportIterator) Next ¶
func (it *UtilizationReportIterator) Next() (*vmmigrationpb.UtilizationReport, 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 (*UtilizationReportIterator) PageInfo ¶
func (it *UtilizationReportIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.