Documentation ¶
Overview ¶
Package clouddms is an auto-generated package for the Database Migration API.
Manage Cloud Database Migration Service resources on Google Cloud Platform.
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.
For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go.
Index ¶
- func DefaultAuthScopes() []string
- type ConnectionProfileIterator
- type CreateConnectionProfileOperation
- func (op *CreateConnectionProfileOperation) Done() bool
- func (op *CreateConnectionProfileOperation) Metadata() (*clouddmspb.OperationMetadata, error)
- func (op *CreateConnectionProfileOperation) Name() string
- func (op *CreateConnectionProfileOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.ConnectionProfile, error)
- func (op *CreateConnectionProfileOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.ConnectionProfile, error)
- type CreateMigrationJobOperation
- func (op *CreateMigrationJobOperation) Done() bool
- func (op *CreateMigrationJobOperation) Metadata() (*clouddmspb.OperationMetadata, error)
- func (op *CreateMigrationJobOperation) Name() string
- func (op *CreateMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- func (op *CreateMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- type DataMigrationCallOptions
- type DataMigrationClient
- func (c *DataMigrationClient) Close() error
- func (c *DataMigrationClient) Connection() *grpc.ClientConn
- func (c *DataMigrationClient) CreateConnectionProfile(ctx context.Context, req *clouddmspb.CreateConnectionProfileRequest, ...) (*CreateConnectionProfileOperation, error)
- func (c *DataMigrationClient) CreateConnectionProfileOperation(name string) *CreateConnectionProfileOperation
- func (c *DataMigrationClient) CreateMigrationJob(ctx context.Context, req *clouddmspb.CreateMigrationJobRequest, ...) (*CreateMigrationJobOperation, error)
- func (c *DataMigrationClient) CreateMigrationJobOperation(name string) *CreateMigrationJobOperation
- func (c *DataMigrationClient) DeleteConnectionProfile(ctx context.Context, req *clouddmspb.DeleteConnectionProfileRequest, ...) (*DeleteConnectionProfileOperation, error)
- func (c *DataMigrationClient) DeleteConnectionProfileOperation(name string) *DeleteConnectionProfileOperation
- func (c *DataMigrationClient) DeleteMigrationJob(ctx context.Context, req *clouddmspb.DeleteMigrationJobRequest, ...) (*DeleteMigrationJobOperation, error)
- func (c *DataMigrationClient) DeleteMigrationJobOperation(name string) *DeleteMigrationJobOperation
- func (c *DataMigrationClient) GenerateSshScript(ctx context.Context, req *clouddmspb.GenerateSshScriptRequest, ...) (*clouddmspb.SshScript, error)
- func (c *DataMigrationClient) GetConnectionProfile(ctx context.Context, req *clouddmspb.GetConnectionProfileRequest, ...) (*clouddmspb.ConnectionProfile, error)
- func (c *DataMigrationClient) GetMigrationJob(ctx context.Context, req *clouddmspb.GetMigrationJobRequest, ...) (*clouddmspb.MigrationJob, error)
- func (c *DataMigrationClient) ListConnectionProfiles(ctx context.Context, req *clouddmspb.ListConnectionProfilesRequest, ...) *ConnectionProfileIterator
- func (c *DataMigrationClient) ListMigrationJobs(ctx context.Context, req *clouddmspb.ListMigrationJobsRequest, ...) *MigrationJobIterator
- func (c *DataMigrationClient) PromoteMigrationJob(ctx context.Context, req *clouddmspb.PromoteMigrationJobRequest, ...) (*PromoteMigrationJobOperation, error)
- func (c *DataMigrationClient) PromoteMigrationJobOperation(name string) *PromoteMigrationJobOperation
- func (c *DataMigrationClient) RestartMigrationJob(ctx context.Context, req *clouddmspb.RestartMigrationJobRequest, ...) (*RestartMigrationJobOperation, error)
- func (c *DataMigrationClient) RestartMigrationJobOperation(name string) *RestartMigrationJobOperation
- func (c *DataMigrationClient) ResumeMigrationJob(ctx context.Context, req *clouddmspb.ResumeMigrationJobRequest, ...) (*ResumeMigrationJobOperation, error)
- func (c *DataMigrationClient) ResumeMigrationJobOperation(name string) *ResumeMigrationJobOperation
- func (c *DataMigrationClient) StartMigrationJob(ctx context.Context, req *clouddmspb.StartMigrationJobRequest, ...) (*StartMigrationJobOperation, error)
- func (c *DataMigrationClient) StartMigrationJobOperation(name string) *StartMigrationJobOperation
- func (c *DataMigrationClient) StopMigrationJob(ctx context.Context, req *clouddmspb.StopMigrationJobRequest, ...) (*StopMigrationJobOperation, error)
- func (c *DataMigrationClient) StopMigrationJobOperation(name string) *StopMigrationJobOperation
- func (c *DataMigrationClient) UpdateConnectionProfile(ctx context.Context, req *clouddmspb.UpdateConnectionProfileRequest, ...) (*UpdateConnectionProfileOperation, error)
- func (c *DataMigrationClient) UpdateConnectionProfileOperation(name string) *UpdateConnectionProfileOperation
- func (c *DataMigrationClient) UpdateMigrationJob(ctx context.Context, req *clouddmspb.UpdateMigrationJobRequest, ...) (*UpdateMigrationJobOperation, error)
- func (c *DataMigrationClient) UpdateMigrationJobOperation(name string) *UpdateMigrationJobOperation
- func (c *DataMigrationClient) VerifyMigrationJob(ctx context.Context, req *clouddmspb.VerifyMigrationJobRequest, ...) (*VerifyMigrationJobOperation, error)
- func (c *DataMigrationClient) VerifyMigrationJobOperation(name string) *VerifyMigrationJobOperation
- type DeleteConnectionProfileOperation
- func (op *DeleteConnectionProfileOperation) Done() bool
- func (op *DeleteConnectionProfileOperation) Metadata() (*clouddmspb.OperationMetadata, error)
- func (op *DeleteConnectionProfileOperation) Name() string
- func (op *DeleteConnectionProfileOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteConnectionProfileOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteMigrationJobOperation
- func (op *DeleteMigrationJobOperation) Done() bool
- func (op *DeleteMigrationJobOperation) Metadata() (*clouddmspb.OperationMetadata, error)
- func (op *DeleteMigrationJobOperation) Name() string
- func (op *DeleteMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type MigrationJobIterator
- type PromoteMigrationJobOperation
- func (op *PromoteMigrationJobOperation) Done() bool
- func (op *PromoteMigrationJobOperation) Metadata() (*clouddmspb.OperationMetadata, error)
- func (op *PromoteMigrationJobOperation) Name() string
- func (op *PromoteMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- func (op *PromoteMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- type RestartMigrationJobOperation
- func (op *RestartMigrationJobOperation) Done() bool
- func (op *RestartMigrationJobOperation) Metadata() (*clouddmspb.OperationMetadata, error)
- func (op *RestartMigrationJobOperation) Name() string
- func (op *RestartMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- func (op *RestartMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- type ResumeMigrationJobOperation
- func (op *ResumeMigrationJobOperation) Done() bool
- func (op *ResumeMigrationJobOperation) Metadata() (*clouddmspb.OperationMetadata, error)
- func (op *ResumeMigrationJobOperation) Name() string
- func (op *ResumeMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- func (op *ResumeMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- type StartMigrationJobOperation
- func (op *StartMigrationJobOperation) Done() bool
- func (op *StartMigrationJobOperation) Metadata() (*clouddmspb.OperationMetadata, error)
- func (op *StartMigrationJobOperation) Name() string
- func (op *StartMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- func (op *StartMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- type StopMigrationJobOperation
- func (op *StopMigrationJobOperation) Done() bool
- func (op *StopMigrationJobOperation) Metadata() (*clouddmspb.OperationMetadata, error)
- func (op *StopMigrationJobOperation) Name() string
- func (op *StopMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- func (op *StopMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- type UpdateConnectionProfileOperation
- func (op *UpdateConnectionProfileOperation) Done() bool
- func (op *UpdateConnectionProfileOperation) Metadata() (*clouddmspb.OperationMetadata, error)
- func (op *UpdateConnectionProfileOperation) Name() string
- func (op *UpdateConnectionProfileOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.ConnectionProfile, error)
- func (op *UpdateConnectionProfileOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.ConnectionProfile, error)
- type UpdateMigrationJobOperation
- func (op *UpdateMigrationJobOperation) Done() bool
- func (op *UpdateMigrationJobOperation) Metadata() (*clouddmspb.OperationMetadata, error)
- func (op *UpdateMigrationJobOperation) Name() string
- func (op *UpdateMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- func (op *UpdateMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- type VerifyMigrationJobOperation
- func (op *VerifyMigrationJobOperation) Done() bool
- func (op *VerifyMigrationJobOperation) Metadata() (*clouddmspb.OperationMetadata, error)
- func (op *VerifyMigrationJobOperation) Name() string
- func (op *VerifyMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
- func (op *VerifyMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
Examples ¶
- DataMigrationClient.CreateConnectionProfile
- DataMigrationClient.CreateMigrationJob
- DataMigrationClient.DeleteConnectionProfile
- DataMigrationClient.DeleteMigrationJob
- DataMigrationClient.GenerateSshScript
- DataMigrationClient.GetConnectionProfile
- DataMigrationClient.GetMigrationJob
- DataMigrationClient.ListConnectionProfiles
- DataMigrationClient.ListMigrationJobs
- DataMigrationClient.PromoteMigrationJob
- DataMigrationClient.RestartMigrationJob
- DataMigrationClient.ResumeMigrationJob
- DataMigrationClient.StartMigrationJob
- DataMigrationClient.StopMigrationJob
- DataMigrationClient.UpdateConnectionProfile
- DataMigrationClient.UpdateMigrationJob
- DataMigrationClient.VerifyMigrationJob
- NewDataMigrationClient
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 ConnectionProfileIterator ¶
type ConnectionProfileIterator 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 []*clouddmspb.ConnectionProfile, nextPageToken string, err error) // contains filtered or unexported fields }
ConnectionProfileIterator manages a stream of *clouddmspb.ConnectionProfile.
func (*ConnectionProfileIterator) Next ¶
func (it *ConnectionProfileIterator) Next() (*clouddmspb.ConnectionProfile, 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 (*ConnectionProfileIterator) PageInfo ¶
func (it *ConnectionProfileIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CreateConnectionProfileOperation ¶
type CreateConnectionProfileOperation struct {
// contains filtered or unexported fields
}
CreateConnectionProfileOperation manages a long-running operation from CreateConnectionProfile.
func (*CreateConnectionProfileOperation) Done ¶
func (op *CreateConnectionProfileOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateConnectionProfileOperation) Metadata ¶
func (op *CreateConnectionProfileOperation) Metadata() (*clouddmspb.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 (*CreateConnectionProfileOperation) Name ¶
func (op *CreateConnectionProfileOperation) 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 (*CreateConnectionProfileOperation) Poll ¶
func (op *CreateConnectionProfileOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.ConnectionProfile, 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 (*CreateConnectionProfileOperation) Wait ¶
func (op *CreateConnectionProfileOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.ConnectionProfile, 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 CreateMigrationJobOperation ¶
type CreateMigrationJobOperation struct {
// contains filtered or unexported fields
}
CreateMigrationJobOperation manages a long-running operation from CreateMigrationJob.
func (*CreateMigrationJobOperation) Done ¶
func (op *CreateMigrationJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateMigrationJobOperation) Metadata ¶
func (op *CreateMigrationJobOperation) Metadata() (*clouddmspb.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 (*CreateMigrationJobOperation) Name ¶
func (op *CreateMigrationJobOperation) 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 (*CreateMigrationJobOperation) Poll ¶
func (op *CreateMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 (*CreateMigrationJobOperation) Wait ¶
func (op *CreateMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 DataMigrationCallOptions ¶
type DataMigrationCallOptions struct { ListMigrationJobs []gax.CallOption GetMigrationJob []gax.CallOption CreateMigrationJob []gax.CallOption UpdateMigrationJob []gax.CallOption DeleteMigrationJob []gax.CallOption StartMigrationJob []gax.CallOption StopMigrationJob []gax.CallOption ResumeMigrationJob []gax.CallOption PromoteMigrationJob []gax.CallOption VerifyMigrationJob []gax.CallOption RestartMigrationJob []gax.CallOption GenerateSshScript []gax.CallOption ListConnectionProfiles []gax.CallOption GetConnectionProfile []gax.CallOption CreateConnectionProfile []gax.CallOption UpdateConnectionProfile []gax.CallOption DeleteConnectionProfile []gax.CallOption }
DataMigrationCallOptions contains the retry settings for each method of DataMigrationClient.
type DataMigrationClient ¶
type DataMigrationClient struct { // The call options for this service. CallOptions *DataMigrationCallOptions // 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 }
DataMigrationClient is a client for interacting with Database Migration API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Database Migration service
func NewDataMigrationClient ¶
func NewDataMigrationClient(ctx context.Context, opts ...option.ClientOption) (*DataMigrationClient, error)
NewDataMigrationClient creates a new data migration service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Database Migration service
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*DataMigrationClient) Close ¶
func (c *DataMigrationClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DataMigrationClient) Connection ¶
func (c *DataMigrationClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*DataMigrationClient) CreateConnectionProfile ¶
func (c *DataMigrationClient) CreateConnectionProfile(ctx context.Context, req *clouddmspb.CreateConnectionProfileRequest, opts ...gax.CallOption) (*CreateConnectionProfileOperation, error)
CreateConnectionProfile creates a new connection profile in a given project and location.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.CreateConnectionProfileRequest{ // TODO: Fill request struct fields. } op, err := c.CreateConnectionProfile(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 (*DataMigrationClient) CreateConnectionProfileOperation ¶
func (c *DataMigrationClient) CreateConnectionProfileOperation(name string) *CreateConnectionProfileOperation
CreateConnectionProfileOperation returns a new CreateConnectionProfileOperation from a given name. The name must be that of a previously created CreateConnectionProfileOperation, possibly from a different process.
func (*DataMigrationClient) CreateMigrationJob ¶
func (c *DataMigrationClient) CreateMigrationJob(ctx context.Context, req *clouddmspb.CreateMigrationJobRequest, opts ...gax.CallOption) (*CreateMigrationJobOperation, error)
CreateMigrationJob creates a new migration job in a given project and location.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.CreateMigrationJobRequest{ // TODO: Fill request struct fields. } op, err := c.CreateMigrationJob(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 (*DataMigrationClient) CreateMigrationJobOperation ¶
func (c *DataMigrationClient) CreateMigrationJobOperation(name string) *CreateMigrationJobOperation
CreateMigrationJobOperation returns a new CreateMigrationJobOperation from a given name. The name must be that of a previously created CreateMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) DeleteConnectionProfile ¶
func (c *DataMigrationClient) DeleteConnectionProfile(ctx context.Context, req *clouddmspb.DeleteConnectionProfileRequest, opts ...gax.CallOption) (*DeleteConnectionProfileOperation, error)
DeleteConnectionProfile deletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.DeleteConnectionProfileRequest{ // TODO: Fill request struct fields. } op, err := c.DeleteConnectionProfile(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*DataMigrationClient) DeleteConnectionProfileOperation ¶
func (c *DataMigrationClient) DeleteConnectionProfileOperation(name string) *DeleteConnectionProfileOperation
DeleteConnectionProfileOperation returns a new DeleteConnectionProfileOperation from a given name. The name must be that of a previously created DeleteConnectionProfileOperation, possibly from a different process.
func (*DataMigrationClient) DeleteMigrationJob ¶
func (c *DataMigrationClient) DeleteMigrationJob(ctx context.Context, req *clouddmspb.DeleteMigrationJobRequest, opts ...gax.CallOption) (*DeleteMigrationJobOperation, error)
DeleteMigrationJob deletes a single migration job.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.DeleteMigrationJobRequest{ // TODO: Fill request struct fields. } op, err := c.DeleteMigrationJob(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*DataMigrationClient) DeleteMigrationJobOperation ¶
func (c *DataMigrationClient) DeleteMigrationJobOperation(name string) *DeleteMigrationJobOperation
DeleteMigrationJobOperation returns a new DeleteMigrationJobOperation from a given name. The name must be that of a previously created DeleteMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) GenerateSshScript ¶
func (c *DataMigrationClient) GenerateSshScript(ctx context.Context, req *clouddmspb.GenerateSshScriptRequest, opts ...gax.CallOption) (*clouddmspb.SshScript, error)
GenerateSshScript generate a SSH configuration script to configure the reverse SSH connectivity.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.GenerateSshScriptRequest{ // TODO: Fill request struct fields. } resp, err := c.GenerateSshScript(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DataMigrationClient) GetConnectionProfile ¶
func (c *DataMigrationClient) GetConnectionProfile(ctx context.Context, req *clouddmspb.GetConnectionProfileRequest, opts ...gax.CallOption) (*clouddmspb.ConnectionProfile, error)
GetConnectionProfile gets details of a single connection profile.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.GetConnectionProfileRequest{ // TODO: Fill request struct fields. } resp, err := c.GetConnectionProfile(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DataMigrationClient) GetMigrationJob ¶
func (c *DataMigrationClient) GetMigrationJob(ctx context.Context, req *clouddmspb.GetMigrationJobRequest, opts ...gax.CallOption) (*clouddmspb.MigrationJob, error)
GetMigrationJob gets details of a single migration job.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.GetMigrationJobRequest{ // TODO: Fill request struct fields. } resp, err := c.GetMigrationJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DataMigrationClient) ListConnectionProfiles ¶
func (c *DataMigrationClient) ListConnectionProfiles(ctx context.Context, req *clouddmspb.ListConnectionProfilesRequest, opts ...gax.CallOption) *ConnectionProfileIterator
ListConnectionProfiles retrieve a list of all connection profiles in a given project and location.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" "google.golang.org/api/iterator" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.ListConnectionProfilesRequest{ // TODO: Fill request struct fields. } it := c.ListConnectionProfiles(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*DataMigrationClient) ListMigrationJobs ¶
func (c *DataMigrationClient) ListMigrationJobs(ctx context.Context, req *clouddmspb.ListMigrationJobsRequest, opts ...gax.CallOption) *MigrationJobIterator
ListMigrationJobs lists migration jobs in a given project and location.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" "google.golang.org/api/iterator" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.ListMigrationJobsRequest{ // TODO: Fill request struct fields. } it := c.ListMigrationJobs(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*DataMigrationClient) PromoteMigrationJob ¶
func (c *DataMigrationClient) PromoteMigrationJob(ctx context.Context, req *clouddmspb.PromoteMigrationJobRequest, opts ...gax.CallOption) (*PromoteMigrationJobOperation, error)
PromoteMigrationJob promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.PromoteMigrationJobRequest{ // TODO: Fill request struct fields. } op, err := c.PromoteMigrationJob(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 (*DataMigrationClient) PromoteMigrationJobOperation ¶
func (c *DataMigrationClient) PromoteMigrationJobOperation(name string) *PromoteMigrationJobOperation
PromoteMigrationJobOperation returns a new PromoteMigrationJobOperation from a given name. The name must be that of a previously created PromoteMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) RestartMigrationJob ¶
func (c *DataMigrationClient) RestartMigrationJob(ctx context.Context, req *clouddmspb.RestartMigrationJobRequest, opts ...gax.CallOption) (*RestartMigrationJobOperation, error)
RestartMigrationJob restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.RestartMigrationJobRequest{ // TODO: Fill request struct fields. } op, err := c.RestartMigrationJob(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 (*DataMigrationClient) RestartMigrationJobOperation ¶
func (c *DataMigrationClient) RestartMigrationJobOperation(name string) *RestartMigrationJobOperation
RestartMigrationJobOperation returns a new RestartMigrationJobOperation from a given name. The name must be that of a previously created RestartMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) ResumeMigrationJob ¶
func (c *DataMigrationClient) ResumeMigrationJob(ctx context.Context, req *clouddmspb.ResumeMigrationJobRequest, opts ...gax.CallOption) (*ResumeMigrationJobOperation, error)
ResumeMigrationJob resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.ResumeMigrationJobRequest{ // TODO: Fill request struct fields. } op, err := c.ResumeMigrationJob(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 (*DataMigrationClient) ResumeMigrationJobOperation ¶
func (c *DataMigrationClient) ResumeMigrationJobOperation(name string) *ResumeMigrationJobOperation
ResumeMigrationJobOperation returns a new ResumeMigrationJobOperation from a given name. The name must be that of a previously created ResumeMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) StartMigrationJob ¶
func (c *DataMigrationClient) StartMigrationJob(ctx context.Context, req *clouddmspb.StartMigrationJobRequest, opts ...gax.CallOption) (*StartMigrationJobOperation, error)
StartMigrationJob start an already created migration job.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.StartMigrationJobRequest{ // TODO: Fill request struct fields. } op, err := c.StartMigrationJob(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 (*DataMigrationClient) StartMigrationJobOperation ¶
func (c *DataMigrationClient) StartMigrationJobOperation(name string) *StartMigrationJobOperation
StartMigrationJobOperation returns a new StartMigrationJobOperation from a given name. The name must be that of a previously created StartMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) StopMigrationJob ¶
func (c *DataMigrationClient) StopMigrationJob(ctx context.Context, req *clouddmspb.StopMigrationJobRequest, opts ...gax.CallOption) (*StopMigrationJobOperation, error)
StopMigrationJob stops a running migration job.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.StopMigrationJobRequest{ // TODO: Fill request struct fields. } op, err := c.StopMigrationJob(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 (*DataMigrationClient) StopMigrationJobOperation ¶
func (c *DataMigrationClient) StopMigrationJobOperation(name string) *StopMigrationJobOperation
StopMigrationJobOperation returns a new StopMigrationJobOperation from a given name. The name must be that of a previously created StopMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) UpdateConnectionProfile ¶
func (c *DataMigrationClient) UpdateConnectionProfile(ctx context.Context, req *clouddmspb.UpdateConnectionProfileRequest, opts ...gax.CallOption) (*UpdateConnectionProfileOperation, error)
UpdateConnectionProfile update the configuration of a single connection profile.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.UpdateConnectionProfileRequest{ // TODO: Fill request struct fields. } op, err := c.UpdateConnectionProfile(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 (*DataMigrationClient) UpdateConnectionProfileOperation ¶
func (c *DataMigrationClient) UpdateConnectionProfileOperation(name string) *UpdateConnectionProfileOperation
UpdateConnectionProfileOperation returns a new UpdateConnectionProfileOperation from a given name. The name must be that of a previously created UpdateConnectionProfileOperation, possibly from a different process.
func (*DataMigrationClient) UpdateMigrationJob ¶
func (c *DataMigrationClient) UpdateMigrationJob(ctx context.Context, req *clouddmspb.UpdateMigrationJobRequest, opts ...gax.CallOption) (*UpdateMigrationJobOperation, error)
UpdateMigrationJob updates the parameters of a single migration job.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.UpdateMigrationJobRequest{ // TODO: Fill request struct fields. } op, err := c.UpdateMigrationJob(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 (*DataMigrationClient) UpdateMigrationJobOperation ¶
func (c *DataMigrationClient) UpdateMigrationJobOperation(name string) *UpdateMigrationJobOperation
UpdateMigrationJobOperation returns a new UpdateMigrationJobOperation from a given name. The name must be that of a previously created UpdateMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) VerifyMigrationJob ¶
func (c *DataMigrationClient) VerifyMigrationJob(ctx context.Context, req *clouddmspb.VerifyMigrationJobRequest, opts ...gax.CallOption) (*VerifyMigrationJobOperation, error)
VerifyMigrationJob verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.
Example ¶
package main import ( "context" clouddms "cloud.google.com/go/clouddms/apiv1" clouddmspb "google.golang.org/genproto/googleapis/cloud/clouddms/v1" ) func main() { ctx := context.Background() c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &clouddmspb.VerifyMigrationJobRequest{ // TODO: Fill request struct fields. } op, err := c.VerifyMigrationJob(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 (*DataMigrationClient) VerifyMigrationJobOperation ¶
func (c *DataMigrationClient) VerifyMigrationJobOperation(name string) *VerifyMigrationJobOperation
VerifyMigrationJobOperation returns a new VerifyMigrationJobOperation from a given name. The name must be that of a previously created VerifyMigrationJobOperation, possibly from a different process.
type DeleteConnectionProfileOperation ¶
type DeleteConnectionProfileOperation struct {
// contains filtered or unexported fields
}
DeleteConnectionProfileOperation manages a long-running operation from DeleteConnectionProfile.
func (*DeleteConnectionProfileOperation) Done ¶
func (op *DeleteConnectionProfileOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteConnectionProfileOperation) Metadata ¶
func (op *DeleteConnectionProfileOperation) Metadata() (*clouddmspb.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 (*DeleteConnectionProfileOperation) Name ¶
func (op *DeleteConnectionProfileOperation) 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 (*DeleteConnectionProfileOperation) Poll ¶
func (op *DeleteConnectionProfileOperation) 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 (*DeleteConnectionProfileOperation) Wait ¶
func (op *DeleteConnectionProfileOperation) 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 DeleteMigrationJobOperation ¶
type DeleteMigrationJobOperation struct {
// contains filtered or unexported fields
}
DeleteMigrationJobOperation manages a long-running operation from DeleteMigrationJob.
func (*DeleteMigrationJobOperation) Done ¶
func (op *DeleteMigrationJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteMigrationJobOperation) Metadata ¶
func (op *DeleteMigrationJobOperation) Metadata() (*clouddmspb.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 (*DeleteMigrationJobOperation) Name ¶
func (op *DeleteMigrationJobOperation) 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 (*DeleteMigrationJobOperation) Poll ¶
func (op *DeleteMigrationJobOperation) 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 (*DeleteMigrationJobOperation) Wait ¶
func (op *DeleteMigrationJobOperation) 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 MigrationJobIterator ¶
type MigrationJobIterator 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 []*clouddmspb.MigrationJob, nextPageToken string, err error) // contains filtered or unexported fields }
MigrationJobIterator manages a stream of *clouddmspb.MigrationJob.
func (*MigrationJobIterator) Next ¶
func (it *MigrationJobIterator) Next() (*clouddmspb.MigrationJob, 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 (*MigrationJobIterator) PageInfo ¶
func (it *MigrationJobIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type PromoteMigrationJobOperation ¶
type PromoteMigrationJobOperation struct {
// contains filtered or unexported fields
}
PromoteMigrationJobOperation manages a long-running operation from PromoteMigrationJob.
func (*PromoteMigrationJobOperation) Done ¶
func (op *PromoteMigrationJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*PromoteMigrationJobOperation) Metadata ¶
func (op *PromoteMigrationJobOperation) Metadata() (*clouddmspb.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 (*PromoteMigrationJobOperation) Name ¶
func (op *PromoteMigrationJobOperation) 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 (*PromoteMigrationJobOperation) Poll ¶
func (op *PromoteMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 (*PromoteMigrationJobOperation) Wait ¶
func (op *PromoteMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 RestartMigrationJobOperation ¶
type RestartMigrationJobOperation struct {
// contains filtered or unexported fields
}
RestartMigrationJobOperation manages a long-running operation from RestartMigrationJob.
func (*RestartMigrationJobOperation) Done ¶
func (op *RestartMigrationJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*RestartMigrationJobOperation) Metadata ¶
func (op *RestartMigrationJobOperation) Metadata() (*clouddmspb.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 (*RestartMigrationJobOperation) Name ¶
func (op *RestartMigrationJobOperation) 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 (*RestartMigrationJobOperation) Poll ¶
func (op *RestartMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 (*RestartMigrationJobOperation) Wait ¶
func (op *RestartMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 ResumeMigrationJobOperation ¶
type ResumeMigrationJobOperation struct {
// contains filtered or unexported fields
}
ResumeMigrationJobOperation manages a long-running operation from ResumeMigrationJob.
func (*ResumeMigrationJobOperation) Done ¶
func (op *ResumeMigrationJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ResumeMigrationJobOperation) Metadata ¶
func (op *ResumeMigrationJobOperation) Metadata() (*clouddmspb.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 (*ResumeMigrationJobOperation) Name ¶
func (op *ResumeMigrationJobOperation) 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 (*ResumeMigrationJobOperation) Poll ¶
func (op *ResumeMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 (*ResumeMigrationJobOperation) Wait ¶
func (op *ResumeMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 StartMigrationJobOperation ¶
type StartMigrationJobOperation struct {
// contains filtered or unexported fields
}
StartMigrationJobOperation manages a long-running operation from StartMigrationJob.
func (*StartMigrationJobOperation) Done ¶
func (op *StartMigrationJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*StartMigrationJobOperation) Metadata ¶
func (op *StartMigrationJobOperation) Metadata() (*clouddmspb.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 (*StartMigrationJobOperation) Name ¶
func (op *StartMigrationJobOperation) 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 (*StartMigrationJobOperation) Poll ¶
func (op *StartMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 (*StartMigrationJobOperation) Wait ¶
func (op *StartMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 StopMigrationJobOperation ¶
type StopMigrationJobOperation struct {
// contains filtered or unexported fields
}
StopMigrationJobOperation manages a long-running operation from StopMigrationJob.
func (*StopMigrationJobOperation) Done ¶
func (op *StopMigrationJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*StopMigrationJobOperation) Metadata ¶
func (op *StopMigrationJobOperation) Metadata() (*clouddmspb.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 (*StopMigrationJobOperation) Name ¶
func (op *StopMigrationJobOperation) 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 (*StopMigrationJobOperation) Poll ¶
func (op *StopMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 (*StopMigrationJobOperation) Wait ¶
func (op *StopMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 UpdateConnectionProfileOperation ¶
type UpdateConnectionProfileOperation struct {
// contains filtered or unexported fields
}
UpdateConnectionProfileOperation manages a long-running operation from UpdateConnectionProfile.
func (*UpdateConnectionProfileOperation) Done ¶
func (op *UpdateConnectionProfileOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateConnectionProfileOperation) Metadata ¶
func (op *UpdateConnectionProfileOperation) Metadata() (*clouddmspb.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 (*UpdateConnectionProfileOperation) Name ¶
func (op *UpdateConnectionProfileOperation) 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 (*UpdateConnectionProfileOperation) Poll ¶
func (op *UpdateConnectionProfileOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.ConnectionProfile, 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 (*UpdateConnectionProfileOperation) Wait ¶
func (op *UpdateConnectionProfileOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.ConnectionProfile, 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 UpdateMigrationJobOperation ¶
type UpdateMigrationJobOperation struct {
// contains filtered or unexported fields
}
UpdateMigrationJobOperation manages a long-running operation from UpdateMigrationJob.
func (*UpdateMigrationJobOperation) Done ¶
func (op *UpdateMigrationJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateMigrationJobOperation) Metadata ¶
func (op *UpdateMigrationJobOperation) Metadata() (*clouddmspb.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 (*UpdateMigrationJobOperation) Name ¶
func (op *UpdateMigrationJobOperation) 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 (*UpdateMigrationJobOperation) Poll ¶
func (op *UpdateMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 (*UpdateMigrationJobOperation) Wait ¶
func (op *UpdateMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 VerifyMigrationJobOperation ¶
type VerifyMigrationJobOperation struct {
// contains filtered or unexported fields
}
VerifyMigrationJobOperation manages a long-running operation from VerifyMigrationJob.
func (*VerifyMigrationJobOperation) Done ¶
func (op *VerifyMigrationJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*VerifyMigrationJobOperation) Metadata ¶
func (op *VerifyMigrationJobOperation) Metadata() (*clouddmspb.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 (*VerifyMigrationJobOperation) Name ¶
func (op *VerifyMigrationJobOperation) 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 (*VerifyMigrationJobOperation) Poll ¶
func (op *VerifyMigrationJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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 (*VerifyMigrationJobOperation) Wait ¶
func (op *VerifyMigrationJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clouddmspb.MigrationJob, 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.