Package cloud.google.com/go/clouddms/apiv1

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.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

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

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

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

CreateConnectionProfileOperation

type CreateConnectionProfileOperation struct {
	// contains filtered or unexported fields
}

CreateConnectionProfileOperation manages a long-running operation from CreateConnectionProfile.

func (*CreateConnectionProfileOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateConnectionProfileOperation) Metadata

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

func (*CreateConnectionProfileOperation) Name

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

func (*CreateConnectionProfileOperation) Poll

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

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

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

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

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

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

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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.

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 (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := clouddms.NewDataMigrationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

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

CreateConnectionProfile creates a new connection profile in a given project and location.

Example

package main

import (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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
}

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

CreateMigrationJob creates a new migration job in a given project and location.

Example

package main

import (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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
}

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

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 (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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.
	}
}

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

DeleteMigrationJob deletes a single migration job.

Example

package main

import (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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.
	}
}

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

GenerateSshScript generate a SSH configuration script to configure the reverse SSH connectivity.

Example

package main

import (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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
}

func (*DataMigrationClient) GetConnectionProfile

GetConnectionProfile gets details of a single connection profile.

Example

package main

import (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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
}

func (*DataMigrationClient) GetMigrationJob

GetMigrationJob gets details of a single migration job.

Example

package main

import (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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
}

func (*DataMigrationClient) ListConnectionProfiles

ListConnectionProfiles retrieve a list of all connection profiles in a given project and location.

Example

package main

import (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	"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
	}
}

func (*DataMigrationClient) ListMigrationJobs

ListMigrationJobs lists migration jobs in a given project and location.

Example

package main

import (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	"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
	}
}

func (*DataMigrationClient) PromoteMigrationJob

PromoteMigrationJob promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.

Example

package main

import (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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
}

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

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 (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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
}

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

ResumeMigrationJob resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).

Example

package main

import (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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
}

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

StartMigrationJob start an already created migration job.

Example

package main

import (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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
}

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

StopMigrationJob stops a running migration job.

Example

package main

import (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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
}

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

UpdateConnectionProfile update the configuration of a single connection profile.

Example

package main

import (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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
}

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

UpdateMigrationJob updates the parameters of a single migration job.

Example

package main

import (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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
}

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

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 (
	clouddms "cloud.google.com/go/clouddms/apiv1"
	"context"
	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
}

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.

DeleteConnectionProfileOperation

type DeleteConnectionProfileOperation struct {
	// contains filtered or unexported fields
}

DeleteConnectionProfileOperation manages a long-running operation from DeleteConnectionProfile.

func (*DeleteConnectionProfileOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteConnectionProfileOperation) Metadata

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

func (*DeleteConnectionProfileOperation) Name

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

func (*DeleteConnectionProfileOperation) Poll

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

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

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

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

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

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

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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.

PromoteMigrationJobOperation

type PromoteMigrationJobOperation struct {
	// contains filtered or unexported fields
}

PromoteMigrationJobOperation manages a long-running operation from PromoteMigrationJob.

func (*PromoteMigrationJobOperation) Done

Done reports whether the long-running operation has completed.

func (*PromoteMigrationJobOperation) Metadata

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

func (*PromoteMigrationJobOperation) Name

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

func (*PromoteMigrationJobOperation) Poll

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

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

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

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

RestartMigrationJobOperation

type RestartMigrationJobOperation struct {
	// contains filtered or unexported fields
}

RestartMigrationJobOperation manages a long-running operation from RestartMigrationJob.

func (*RestartMigrationJobOperation) Done

Done reports whether the long-running operation has completed.

func (*RestartMigrationJobOperation) Metadata

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

func (*RestartMigrationJobOperation) Name

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

func (*RestartMigrationJobOperation) Poll

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

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

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

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

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

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

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

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

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

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

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

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateConnectionProfileOperation

type UpdateConnectionProfileOperation struct {
	// contains filtered or unexported fields
}

UpdateConnectionProfileOperation manages a long-running operation from UpdateConnectionProfile.

func (*UpdateConnectionProfileOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateConnectionProfileOperation) Metadata

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

func (*UpdateConnectionProfileOperation) Name

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

func (*UpdateConnectionProfileOperation) Poll

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

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

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

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

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

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

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

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

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

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.