Database Migration API v1 - Package cloud.google.com/go/clouddms/apiv1 (v1.8.8) Stay organized with collections Save and categorize content based on your preferences.
Package clouddms is an auto-generated package for theDatabase Migration API.
Manage Cloud Database Migration Service resources on Google CloudPlatform.
General documentation
For information that is relevant for all client libraries please referencehttps://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on thispage includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage
To get started with this package, create a client.
// go get cloud.google.com/go/clouddms/apiv1@latestctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed.The methods of Client are safe for concurrent use by multiple goroutines.The returned client must be Closed when it is done being used.
Using the Client
The following is an example of making an API call with the newly created client, mentioned above.
req:=&clouddmspb.ApplyConversionWorkspaceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ApplyConversionWorkspaceRequest.}op,err:=c.ApplyConversionWorkspace(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp
Use of Context
The ctx passed to NewDataMigrationClient is used for authentication requests andfor creating the underlying connection, but is not used for subsequent calls.Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Functions
func DefaultAuthScopes
funcDefaultAuthScopes()[]stringDefaultAuthScopes reports the default set of authentication scopes to use with this package.
ApplyConversionWorkspaceOperation
typeApplyConversionWorkspaceOperationstruct{// contains filtered or unexported fields}ApplyConversionWorkspaceOperation manages a long-running operation from ApplyConversionWorkspace.
func (*ApplyConversionWorkspaceOperation) Done
func(op*ApplyConversionWorkspaceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*ApplyConversionWorkspaceOperation) Metadata
func(op*ApplyConversionWorkspaceOperation)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 (*ApplyConversionWorkspaceOperation) Name
func(op*ApplyConversionWorkspaceOperation)Name()stringName 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 (*ApplyConversionWorkspaceOperation) Poll
func(op*ApplyConversionWorkspaceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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 andthe 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 (*ApplyConversionWorkspaceOperation) Wait
func(op*ApplyConversionWorkspaceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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.
CommitConversionWorkspaceOperation
typeCommitConversionWorkspaceOperationstruct{// contains filtered or unexported fields}CommitConversionWorkspaceOperation manages a long-running operation from CommitConversionWorkspace.
func (*CommitConversionWorkspaceOperation) Done
func(op*CommitConversionWorkspaceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CommitConversionWorkspaceOperation) Metadata
func(op*CommitConversionWorkspaceOperation)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 (*CommitConversionWorkspaceOperation) Name
func(op*CommitConversionWorkspaceOperation)Name()stringName 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 (*CommitConversionWorkspaceOperation) Poll
func(op*CommitConversionWorkspaceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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 andthe 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 (*CommitConversionWorkspaceOperation) Wait
func(op*CommitConversionWorkspaceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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.
ConnectionProfileIterator
typeConnectionProfileIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*clouddmspb.ConnectionProfile,nextPageTokenstring,errerror)// contains filtered or unexported fields}ConnectionProfileIterator manages a stream of *clouddmspb.ConnectionProfile.
func (*ConnectionProfileIterator) All
func(it*ConnectionProfileIterator)All()iter.Seq2[*clouddmspb.ConnectionProfile,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ConnectionProfileIterator) PageInfo
func(it*ConnectionProfileIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ConversionWorkspaceIterator
typeConversionWorkspaceIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*clouddmspb.ConversionWorkspace,nextPageTokenstring,errerror)// contains filtered or unexported fields}ConversionWorkspaceIterator manages a stream of *clouddmspb.ConversionWorkspace.
func (*ConversionWorkspaceIterator) All
func(it*ConversionWorkspaceIterator)All()iter.Seq2[*clouddmspb.ConversionWorkspace,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ConversionWorkspaceIterator) Next
func(it*ConversionWorkspaceIterator)Next()(*clouddmspb.ConversionWorkspace,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ConversionWorkspaceIterator) PageInfo
func(it*ConversionWorkspaceIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ConvertConversionWorkspaceOperation
typeConvertConversionWorkspaceOperationstruct{// contains filtered or unexported fields}ConvertConversionWorkspaceOperation manages a long-running operation from ConvertConversionWorkspace.
func (*ConvertConversionWorkspaceOperation) Done
func(op*ConvertConversionWorkspaceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*ConvertConversionWorkspaceOperation) Metadata
func(op*ConvertConversionWorkspaceOperation)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 (*ConvertConversionWorkspaceOperation) Name
func(op*ConvertConversionWorkspaceOperation)Name()stringName 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 (*ConvertConversionWorkspaceOperation) Poll
func(op*ConvertConversionWorkspaceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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 andthe 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 (*ConvertConversionWorkspaceOperation) Wait
func(op*ConvertConversionWorkspaceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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.
CreateConnectionProfileOperation
typeCreateConnectionProfileOperationstruct{// contains filtered or unexported fields}CreateConnectionProfileOperation manages a long-running operation from CreateConnectionProfile.
func (*CreateConnectionProfileOperation) Done
func(op*CreateConnectionProfileOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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.
CreateConversionWorkspaceOperation
typeCreateConversionWorkspaceOperationstruct{// contains filtered or unexported fields}CreateConversionWorkspaceOperation manages a long-running operation from CreateConversionWorkspace.
func (*CreateConversionWorkspaceOperation) Done
func(op*CreateConversionWorkspaceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateConversionWorkspaceOperation) Metadata
func(op*CreateConversionWorkspaceOperation)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 (*CreateConversionWorkspaceOperation) Name
func(op*CreateConversionWorkspaceOperation)Name()stringName 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 (*CreateConversionWorkspaceOperation) Poll
func(op*CreateConversionWorkspaceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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 andthe 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 (*CreateConversionWorkspaceOperation) Wait
func(op*CreateConversionWorkspaceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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.
CreateMigrationJobOperation
typeCreateMigrationJobOperationstruct{// contains filtered or unexported fields}CreateMigrationJobOperation manages a long-running operation from CreateMigrationJob.
func (*CreateMigrationJobOperation) Done
func(op*CreateMigrationJobOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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.
CreatePrivateConnectionOperation
typeCreatePrivateConnectionOperationstruct{// contains filtered or unexported fields}CreatePrivateConnectionOperation manages a long-running operation from CreatePrivateConnection.
func (*CreatePrivateConnectionOperation) Done
func(op*CreatePrivateConnectionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreatePrivateConnectionOperation) Metadata
func(op*CreatePrivateConnectionOperation)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 (*CreatePrivateConnectionOperation) Name
func(op*CreatePrivateConnectionOperation)Name()stringName 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 (*CreatePrivateConnectionOperation) Poll
func(op*CreatePrivateConnectionOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.PrivateConnection,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 andthe 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 (*CreatePrivateConnectionOperation) Wait
func(op*CreatePrivateConnectionOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.PrivateConnection,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.
DataMigrationCallOptions
typeDataMigrationCallOptionsstruct{ListMigrationJobs[]gax.CallOptionGetMigrationJob[]gax.CallOptionCreateMigrationJob[]gax.CallOptionUpdateMigrationJob[]gax.CallOptionDeleteMigrationJob[]gax.CallOptionStartMigrationJob[]gax.CallOptionStopMigrationJob[]gax.CallOptionResumeMigrationJob[]gax.CallOptionPromoteMigrationJob[]gax.CallOptionVerifyMigrationJob[]gax.CallOptionRestartMigrationJob[]gax.CallOptionGenerateSshScript[]gax.CallOptionGenerateTcpProxyScript[]gax.CallOptionListConnectionProfiles[]gax.CallOptionGetConnectionProfile[]gax.CallOptionCreateConnectionProfile[]gax.CallOptionUpdateConnectionProfile[]gax.CallOptionDeleteConnectionProfile[]gax.CallOptionCreatePrivateConnection[]gax.CallOptionGetPrivateConnection[]gax.CallOptionListPrivateConnections[]gax.CallOptionDeletePrivateConnection[]gax.CallOptionGetConversionWorkspace[]gax.CallOptionListConversionWorkspaces[]gax.CallOptionCreateConversionWorkspace[]gax.CallOptionUpdateConversionWorkspace[]gax.CallOptionDeleteConversionWorkspace[]gax.CallOptionCreateMappingRule[]gax.CallOptionDeleteMappingRule[]gax.CallOptionListMappingRules[]gax.CallOptionGetMappingRule[]gax.CallOptionSeedConversionWorkspace[]gax.CallOptionImportMappingRules[]gax.CallOptionConvertConversionWorkspace[]gax.CallOptionCommitConversionWorkspace[]gax.CallOptionRollbackConversionWorkspace[]gax.CallOptionApplyConversionWorkspace[]gax.CallOptionDescribeDatabaseEntities[]gax.CallOptionSearchBackgroundJobs[]gax.CallOptionDescribeConversionWorkspaceRevisions[]gax.CallOptionFetchStaticIps[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOption}DataMigrationCallOptions contains the retry settings for each method of DataMigrationClient.
DataMigrationClient
typeDataMigrationClientstruct{// 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
funcNewDataMigrationClient(ctxcontext.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
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*DataMigrationClient) ApplyConversionWorkspace
func(c*DataMigrationClient)ApplyConversionWorkspace(ctxcontext.Context,req*clouddmspb.ApplyConversionWorkspaceRequest,opts...gax.CallOption)(*ApplyConversionWorkspaceOperation,error)ApplyConversionWorkspace applies draft tree onto a specific destination database.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.ApplyConversionWorkspaceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ApplyConversionWorkspaceRequest.}op,err:=c.ApplyConversionWorkspace(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) ApplyConversionWorkspaceOperation
func(c*DataMigrationClient)ApplyConversionWorkspaceOperation(namestring)*ApplyConversionWorkspaceOperationApplyConversionWorkspaceOperation returns a new ApplyConversionWorkspaceOperation from a given name.The name must be that of a previously created ApplyConversionWorkspaceOperation, possibly from a different process.
func (*DataMigrationClient) CancelOperation
func(c*DataMigrationClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.CancelOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.}err=c.CancelOperation(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*DataMigrationClient) Close
func(c*DataMigrationClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*DataMigrationClient) CommitConversionWorkspace
func(c*DataMigrationClient)CommitConversionWorkspace(ctxcontext.Context,req*clouddmspb.CommitConversionWorkspaceRequest,opts...gax.CallOption)(*CommitConversionWorkspaceOperation,error)CommitConversionWorkspace marks all the data in the conversion workspace as committed.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.CommitConversionWorkspaceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#CommitConversionWorkspaceRequest.}op,err:=c.CommitConversionWorkspace(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) CommitConversionWorkspaceOperation
func(c*DataMigrationClient)CommitConversionWorkspaceOperation(namestring)*CommitConversionWorkspaceOperationCommitConversionWorkspaceOperation returns a new CommitConversionWorkspaceOperation from a given name.The name must be that of a previously created CommitConversionWorkspaceOperation, possibly from a different process.
func (*DataMigrationClient) Connection (deprecated)
func(c*DataMigrationClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*DataMigrationClient) ConvertConversionWorkspace
func(c*DataMigrationClient)ConvertConversionWorkspace(ctxcontext.Context,req*clouddmspb.ConvertConversionWorkspaceRequest,opts...gax.CallOption)(*ConvertConversionWorkspaceOperation,error)ConvertConversionWorkspace creates a draft tree schema for the destination database.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.ConvertConversionWorkspaceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ConvertConversionWorkspaceRequest.}op,err:=c.ConvertConversionWorkspace(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) ConvertConversionWorkspaceOperation
func(c*DataMigrationClient)ConvertConversionWorkspaceOperation(namestring)*ConvertConversionWorkspaceOperationConvertConversionWorkspaceOperation returns a new ConvertConversionWorkspaceOperation from a given name.The name must be that of a previously created ConvertConversionWorkspaceOperation, possibly from a different process.
func (*DataMigrationClient) CreateConnectionProfile
func(c*DataMigrationClient)CreateConnectionProfile(ctxcontext.Context,req*clouddmspb.CreateConnectionProfileRequest,opts...gax.CallOption)(*CreateConnectionProfileOperation,error)CreateConnectionProfile creates a new connection profile in a given project and location.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.CreateConnectionProfileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#CreateConnectionProfileRequest.}op,err:=c.CreateConnectionProfile(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) CreateConnectionProfileOperation
func(c*DataMigrationClient)CreateConnectionProfileOperation(namestring)*CreateConnectionProfileOperationCreateConnectionProfileOperation 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) CreateConversionWorkspace
func(c*DataMigrationClient)CreateConversionWorkspace(ctxcontext.Context,req*clouddmspb.CreateConversionWorkspaceRequest,opts...gax.CallOption)(*CreateConversionWorkspaceOperation,error)CreateConversionWorkspace creates a new conversion workspace in a given project and location.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.CreateConversionWorkspaceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#CreateConversionWorkspaceRequest.}op,err:=c.CreateConversionWorkspace(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) CreateConversionWorkspaceOperation
func(c*DataMigrationClient)CreateConversionWorkspaceOperation(namestring)*CreateConversionWorkspaceOperationCreateConversionWorkspaceOperation returns a new CreateConversionWorkspaceOperation from a given name.The name must be that of a previously created CreateConversionWorkspaceOperation, possibly from a different process.
func (*DataMigrationClient) CreateMappingRule
func(c*DataMigrationClient)CreateMappingRule(ctxcontext.Context,req*clouddmspb.CreateMappingRuleRequest,opts...gax.CallOption)(*clouddmspb.MappingRule,error)CreateMappingRule creates a new mapping rule for a given conversion workspace.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.CreateMappingRuleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#CreateMappingRuleRequest.}resp,err:=c.CreateMappingRule(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) CreateMigrationJob
func(c*DataMigrationClient)CreateMigrationJob(ctxcontext.Context,req*clouddmspb.CreateMigrationJobRequest,opts...gax.CallOption)(*CreateMigrationJobOperation,error)CreateMigrationJob creates a new migration job in a given project and location.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.CreateMigrationJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#CreateMigrationJobRequest.}op,err:=c.CreateMigrationJob(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) CreateMigrationJobOperation
func(c*DataMigrationClient)CreateMigrationJobOperation(namestring)*CreateMigrationJobOperationCreateMigrationJobOperation 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) CreatePrivateConnection
func(c*DataMigrationClient)CreatePrivateConnection(ctxcontext.Context,req*clouddmspb.CreatePrivateConnectionRequest,opts...gax.CallOption)(*CreatePrivateConnectionOperation,error)CreatePrivateConnection creates a new private connection in a given project and location.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.CreatePrivateConnectionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#CreatePrivateConnectionRequest.}op,err:=c.CreatePrivateConnection(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) CreatePrivateConnectionOperation
func(c*DataMigrationClient)CreatePrivateConnectionOperation(namestring)*CreatePrivateConnectionOperationCreatePrivateConnectionOperation returns a new CreatePrivateConnectionOperation from a given name.The name must be that of a previously created CreatePrivateConnectionOperation, possibly from a different process.
func (*DataMigrationClient) DeleteConnectionProfile
func(c*DataMigrationClient)DeleteConnectionProfile(ctxcontext.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 anyactive migration jobs.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.DeleteConnectionProfileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#DeleteConnectionProfileRequest.}op,err:=c.DeleteConnectionProfile(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*DataMigrationClient) DeleteConnectionProfileOperation
func(c*DataMigrationClient)DeleteConnectionProfileOperation(namestring)*DeleteConnectionProfileOperationDeleteConnectionProfileOperation 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) DeleteConversionWorkspace
func(c*DataMigrationClient)DeleteConversionWorkspace(ctxcontext.Context,req*clouddmspb.DeleteConversionWorkspaceRequest,opts...gax.CallOption)(*DeleteConversionWorkspaceOperation,error)DeleteConversionWorkspace deletes a single conversion workspace.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.DeleteConversionWorkspaceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#DeleteConversionWorkspaceRequest.}op,err:=c.DeleteConversionWorkspace(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*DataMigrationClient) DeleteConversionWorkspaceOperation
func(c*DataMigrationClient)DeleteConversionWorkspaceOperation(namestring)*DeleteConversionWorkspaceOperationDeleteConversionWorkspaceOperation returns a new DeleteConversionWorkspaceOperation from a given name.The name must be that of a previously created DeleteConversionWorkspaceOperation, possibly from a different process.
func (*DataMigrationClient) DeleteMappingRule
func(c*DataMigrationClient)DeleteMappingRule(ctxcontext.Context,req*clouddmspb.DeleteMappingRuleRequest,opts...gax.CallOption)errorDeleteMappingRule deletes a single mapping rule.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.DeleteMappingRuleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#DeleteMappingRuleRequest.}err=c.DeleteMappingRule(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*DataMigrationClient) DeleteMigrationJob
func(c*DataMigrationClient)DeleteMigrationJob(ctxcontext.Context,req*clouddmspb.DeleteMigrationJobRequest,opts...gax.CallOption)(*DeleteMigrationJobOperation,error)DeleteMigrationJob deletes a single migration job.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.DeleteMigrationJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#DeleteMigrationJobRequest.}op,err:=c.DeleteMigrationJob(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*DataMigrationClient) DeleteMigrationJobOperation
func(c*DataMigrationClient)DeleteMigrationJobOperation(namestring)*DeleteMigrationJobOperationDeleteMigrationJobOperation 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) DeleteOperation
func(c*DataMigrationClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.DeleteOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.}err=c.DeleteOperation(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*DataMigrationClient) DeletePrivateConnection
func(c*DataMigrationClient)DeletePrivateConnection(ctxcontext.Context,req*clouddmspb.DeletePrivateConnectionRequest,opts...gax.CallOption)(*DeletePrivateConnectionOperation,error)DeletePrivateConnection deletes a single Database Migration Service private connection.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.DeletePrivateConnectionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#DeletePrivateConnectionRequest.}op,err:=c.DeletePrivateConnection(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*DataMigrationClient) DeletePrivateConnectionOperation
func(c*DataMigrationClient)DeletePrivateConnectionOperation(namestring)*DeletePrivateConnectionOperationDeletePrivateConnectionOperation returns a new DeletePrivateConnectionOperation from a given name.The name must be that of a previously created DeletePrivateConnectionOperation, possibly from a different process.
func (*DataMigrationClient) DescribeConversionWorkspaceRevisions
func(c*DataMigrationClient)DescribeConversionWorkspaceRevisions(ctxcontext.Context,req*clouddmspb.DescribeConversionWorkspaceRevisionsRequest,opts...gax.CallOption)(*clouddmspb.DescribeConversionWorkspaceRevisionsResponse,error)DescribeConversionWorkspaceRevisions retrieves a list of committed revisions of a specific conversionworkspace.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.DescribeConversionWorkspaceRevisionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#DescribeConversionWorkspaceRevisionsRequest.}resp,err:=c.DescribeConversionWorkspaceRevisions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) DescribeDatabaseEntities
func(c*DataMigrationClient)DescribeDatabaseEntities(ctxcontext.Context,req*clouddmspb.DescribeDatabaseEntitiesRequest,opts...gax.CallOption)*DatabaseEntityIteratorDescribeDatabaseEntities describes the database entities tree for a specific conversion workspaceand a specific tree type.
Database entities are not resources like conversion workspaces or mappingrules, and they can’t be created, updated or deleted. Instead, they aresimple data objects describing the structure of the client database.
Examples
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.DescribeDatabaseEntitiesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#DescribeDatabaseEntitiesRequest.}it:=c.DescribeDatabaseEntities(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*clouddmspb.DescribeDatabaseEntitiesResponse)}}all
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.DescribeDatabaseEntitiesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#DescribeDatabaseEntitiesRequest.}forresp,err:=rangec.DescribeDatabaseEntities(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DataMigrationClient) FetchStaticIps
func(c*DataMigrationClient)FetchStaticIps(ctxcontext.Context,req*clouddmspb.FetchStaticIpsRequest,opts...gax.CallOption)*StringIteratorFetchStaticIps fetches a set of static IP addresses that need to be allowlisted by thecustomer when using the static-IP connectivity method.
Examples
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.FetchStaticIpsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#FetchStaticIpsRequest.}it:=c.FetchStaticIps(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*clouddmspb.FetchStaticIpsResponse)}}all
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.FetchStaticIpsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#FetchStaticIpsRequest.}forresp,err:=rangec.FetchStaticIps(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DataMigrationClient) GenerateSshScript
func(c*DataMigrationClient)GenerateSshScript(ctxcontext.Context,req*clouddmspb.GenerateSshScriptRequest,opts...gax.CallOption)(*clouddmspb.SshScript,error)GenerateSshScript generate a SSH configuration script to configure the reverse SSHconnectivity.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.GenerateSshScriptRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#GenerateSshScriptRequest.}resp,err:=c.GenerateSshScript(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) GenerateTcpProxyScript
func(c*DataMigrationClient)GenerateTcpProxyScript(ctxcontext.Context,req*clouddmspb.GenerateTcpProxyScriptRequest,opts...gax.CallOption)(*clouddmspb.TcpProxyScript,error)GenerateTcpProxyScript generate a TCP Proxy configuration script to configure a cloud-hosted VMrunning a TCP Proxy.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.GenerateTcpProxyScriptRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#GenerateTcpProxyScriptRequest.}resp,err:=c.GenerateTcpProxyScript(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) GetConnectionProfile
func(c*DataMigrationClient)GetConnectionProfile(ctxcontext.Context,req*clouddmspb.GetConnectionProfileRequest,opts...gax.CallOption)(*clouddmspb.ConnectionProfile,error)GetConnectionProfile gets details of a single connection profile.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.GetConnectionProfileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#GetConnectionProfileRequest.}resp,err:=c.GetConnectionProfile(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) GetConversionWorkspace
func(c*DataMigrationClient)GetConversionWorkspace(ctxcontext.Context,req*clouddmspb.GetConversionWorkspaceRequest,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,error)GetConversionWorkspace gets details of a single conversion workspace.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.GetConversionWorkspaceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#GetConversionWorkspaceRequest.}resp,err:=c.GetConversionWorkspace(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) GetIamPolicy
func(c*DataMigrationClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) GetLocation
func(c*DataMigrationClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.GetLocationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.}resp,err:=c.GetLocation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) GetMappingRule
func(c*DataMigrationClient)GetMappingRule(ctxcontext.Context,req*clouddmspb.GetMappingRuleRequest,opts...gax.CallOption)(*clouddmspb.MappingRule,error)GetMappingRule gets the details of a mapping rule.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.GetMappingRuleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#GetMappingRuleRequest.}resp,err:=c.GetMappingRule(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) GetMigrationJob
func(c*DataMigrationClient)GetMigrationJob(ctxcontext.Context,req*clouddmspb.GetMigrationJobRequest,opts...gax.CallOption)(*clouddmspb.MigrationJob,error)GetMigrationJob gets details of a single migration job.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.GetMigrationJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#GetMigrationJobRequest.}resp,err:=c.GetMigrationJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) GetOperation
func(c*DataMigrationClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.GetOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.}resp,err:=c.GetOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) GetPrivateConnection
func(c*DataMigrationClient)GetPrivateConnection(ctxcontext.Context,req*clouddmspb.GetPrivateConnectionRequest,opts...gax.CallOption)(*clouddmspb.PrivateConnection,error)GetPrivateConnection gets details of a single private connection.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.GetPrivateConnectionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#GetPrivateConnectionRequest.}resp,err:=c.GetPrivateConnection(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) ImportMappingRules
func(c*DataMigrationClient)ImportMappingRules(ctxcontext.Context,req*clouddmspb.ImportMappingRulesRequest,opts...gax.CallOption)(*ImportMappingRulesOperation,error)ImportMappingRules imports the mapping rules for a given conversion workspace.Supports various formats of external rules files.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.ImportMappingRulesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ImportMappingRulesRequest.}op,err:=c.ImportMappingRules(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) ImportMappingRulesOperation
func(c*DataMigrationClient)ImportMappingRulesOperation(namestring)*ImportMappingRulesOperationImportMappingRulesOperation returns a new ImportMappingRulesOperation from a given name.The name must be that of a previously created ImportMappingRulesOperation, possibly from a different process.
func (*DataMigrationClient) ListConnectionProfiles
func(c*DataMigrationClient)ListConnectionProfiles(ctxcontext.Context,req*clouddmspb.ListConnectionProfilesRequest,opts...gax.CallOption)*ConnectionProfileIteratorListConnectionProfiles retrieves a list of all connection profiles in a given project andlocation.
Examples
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.ListConnectionProfilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ListConnectionProfilesRequest.}it:=c.ListConnectionProfiles(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*clouddmspb.ListConnectionProfilesResponse)}}all
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.ListConnectionProfilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ListConnectionProfilesRequest.}forresp,err:=rangec.ListConnectionProfiles(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DataMigrationClient) ListConversionWorkspaces
func(c*DataMigrationClient)ListConversionWorkspaces(ctxcontext.Context,req*clouddmspb.ListConversionWorkspacesRequest,opts...gax.CallOption)*ConversionWorkspaceIteratorListConversionWorkspaces lists conversion workspaces in a given project and location.
Examples
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.ListConversionWorkspacesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ListConversionWorkspacesRequest.}it:=c.ListConversionWorkspaces(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*clouddmspb.ListConversionWorkspacesResponse)}}all
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.ListConversionWorkspacesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ListConversionWorkspacesRequest.}forresp,err:=rangec.ListConversionWorkspaces(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DataMigrationClient) ListLocations
func(c*DataMigrationClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1""google.golang.org/api/iterator"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.ListLocationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.}it:=c.ListLocations(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*locationpb.ListLocationsResponse)}}all
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.ListLocationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.}forresp,err:=rangec.ListLocations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DataMigrationClient) ListMappingRules
func(c*DataMigrationClient)ListMappingRules(ctxcontext.Context,req*clouddmspb.ListMappingRulesRequest,opts...gax.CallOption)*MappingRuleIteratorListMappingRules lists the mapping rules for a specific conversion workspace.
Examples
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.ListMappingRulesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ListMappingRulesRequest.}it:=c.ListMappingRules(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*clouddmspb.ListMappingRulesResponse)}}all
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.ListMappingRulesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ListMappingRulesRequest.}forresp,err:=rangec.ListMappingRules(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DataMigrationClient) ListMigrationJobs
func(c*DataMigrationClient)ListMigrationJobs(ctxcontext.Context,req*clouddmspb.ListMigrationJobsRequest,opts...gax.CallOption)*MigrationJobIteratorListMigrationJobs lists migration jobs in a given project and location.
Examples
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.ListMigrationJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ListMigrationJobsRequest.}it:=c.ListMigrationJobs(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*clouddmspb.ListMigrationJobsResponse)}}all
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.ListMigrationJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ListMigrationJobsRequest.}forresp,err:=rangec.ListMigrationJobs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DataMigrationClient) ListOperations
func(c*DataMigrationClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}it:=c.ListOperations(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*longrunningpb.ListOperationsResponse)}}all
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}forresp,err:=rangec.ListOperations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DataMigrationClient) ListPrivateConnections
func(c*DataMigrationClient)ListPrivateConnections(ctxcontext.Context,req*clouddmspb.ListPrivateConnectionsRequest,opts...gax.CallOption)*PrivateConnectionIteratorListPrivateConnections retrieves a list of private connections in a given project and location.
Examples
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.ListPrivateConnectionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ListPrivateConnectionsRequest.}it:=c.ListPrivateConnections(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*clouddmspb.ListPrivateConnectionsResponse)}}all
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.ListPrivateConnectionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ListPrivateConnectionsRequest.}forresp,err:=rangec.ListPrivateConnections(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DataMigrationClient) PromoteMigrationJob
func(c*DataMigrationClient)PromoteMigrationJob(ctxcontext.Context,req*clouddmspb.PromoteMigrationJobRequest,opts...gax.CallOption)(*PromoteMigrationJobOperation,error)PromoteMigrationJob promote a migration job, stopping replication to the destination andpromoting the destination to be a standalone database.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.PromoteMigrationJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#PromoteMigrationJobRequest.}op,err:=c.PromoteMigrationJob(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) PromoteMigrationJobOperation
func(c*DataMigrationClient)PromoteMigrationJobOperation(namestring)*PromoteMigrationJobOperationPromoteMigrationJobOperation 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(ctxcontext.Context,req*clouddmspb.RestartMigrationJobRequest,opts...gax.CallOption)(*RestartMigrationJobOperation,error)RestartMigrationJob restart a stopped or failed migration job, resetting the destinationinstance to its original state and starting the migration process fromscratch.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.RestartMigrationJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#RestartMigrationJobRequest.}op,err:=c.RestartMigrationJob(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) RestartMigrationJobOperation
func(c*DataMigrationClient)RestartMigrationJobOperation(namestring)*RestartMigrationJobOperationRestartMigrationJobOperation 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(ctxcontext.Context,req*clouddmspb.ResumeMigrationJobRequest,opts...gax.CallOption)(*ResumeMigrationJobOperation,error)ResumeMigrationJob resume a migration job that is currently stopped and is resumable (wasstopped during CDC phase).
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.ResumeMigrationJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#ResumeMigrationJobRequest.}op,err:=c.ResumeMigrationJob(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) ResumeMigrationJobOperation
func(c*DataMigrationClient)ResumeMigrationJobOperation(namestring)*ResumeMigrationJobOperationResumeMigrationJobOperation 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) RollbackConversionWorkspace
func(c*DataMigrationClient)RollbackConversionWorkspace(ctxcontext.Context,req*clouddmspb.RollbackConversionWorkspaceRequest,opts...gax.CallOption)(*RollbackConversionWorkspaceOperation,error)RollbackConversionWorkspace rolls back a conversion workspace to the last committed snapshot.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.RollbackConversionWorkspaceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#RollbackConversionWorkspaceRequest.}op,err:=c.RollbackConversionWorkspace(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) RollbackConversionWorkspaceOperation
func(c*DataMigrationClient)RollbackConversionWorkspaceOperation(namestring)*RollbackConversionWorkspaceOperationRollbackConversionWorkspaceOperation returns a new RollbackConversionWorkspaceOperation from a given name.The name must be that of a previously created RollbackConversionWorkspaceOperation, possibly from a different process.
func (*DataMigrationClient) SearchBackgroundJobs
func(c*DataMigrationClient)SearchBackgroundJobs(ctxcontext.Context,req*clouddmspb.SearchBackgroundJobsRequest,opts...gax.CallOption)(*clouddmspb.SearchBackgroundJobsResponse,error)SearchBackgroundJobs searches/lists the background jobs for a specificconversion workspace.
The background jobs are not resources like conversion workspaces ormapping rules, and they can’t be created, updated or deleted.Instead, they are a way to expose the data plane jobs log.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.SearchBackgroundJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#SearchBackgroundJobsRequest.}resp,err:=c.SearchBackgroundJobs(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) SeedConversionWorkspace
func(c*DataMigrationClient)SeedConversionWorkspace(ctxcontext.Context,req*clouddmspb.SeedConversionWorkspaceRequest,opts...gax.CallOption)(*SeedConversionWorkspaceOperation,error)SeedConversionWorkspace imports a snapshot of the source database into theconversion workspace.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.SeedConversionWorkspaceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#SeedConversionWorkspaceRequest.}op,err:=c.SeedConversionWorkspace(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) SeedConversionWorkspaceOperation
func(c*DataMigrationClient)SeedConversionWorkspaceOperation(namestring)*SeedConversionWorkspaceOperationSeedConversionWorkspaceOperation returns a new SeedConversionWorkspaceOperation from a given name.The name must be that of a previously created SeedConversionWorkspaceOperation, possibly from a different process.
func (*DataMigrationClient) SetIamPolicy
func(c*DataMigrationClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) StartMigrationJob
func(c*DataMigrationClient)StartMigrationJob(ctxcontext.Context,req*clouddmspb.StartMigrationJobRequest,opts...gax.CallOption)(*StartMigrationJobOperation,error)StartMigrationJob start an already created migration job.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.StartMigrationJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#StartMigrationJobRequest.}op,err:=c.StartMigrationJob(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) StartMigrationJobOperation
func(c*DataMigrationClient)StartMigrationJobOperation(namestring)*StartMigrationJobOperationStartMigrationJobOperation 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(ctxcontext.Context,req*clouddmspb.StopMigrationJobRequest,opts...gax.CallOption)(*StopMigrationJobOperation,error)StopMigrationJob stops a running migration job.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.StopMigrationJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#StopMigrationJobRequest.}op,err:=c.StopMigrationJob(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) StopMigrationJobOperation
func(c*DataMigrationClient)StopMigrationJobOperation(namestring)*StopMigrationJobOperationStopMigrationJobOperation 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) TestIamPermissions
func(c*DataMigrationClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) UpdateConnectionProfile
func(c*DataMigrationClient)UpdateConnectionProfile(ctxcontext.Context,req*clouddmspb.UpdateConnectionProfileRequest,opts...gax.CallOption)(*UpdateConnectionProfileOperation,error)UpdateConnectionProfile update the configuration of a single connection profile.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.UpdateConnectionProfileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#UpdateConnectionProfileRequest.}op,err:=c.UpdateConnectionProfile(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) UpdateConnectionProfileOperation
func(c*DataMigrationClient)UpdateConnectionProfileOperation(namestring)*UpdateConnectionProfileOperationUpdateConnectionProfileOperation 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) UpdateConversionWorkspace
func(c*DataMigrationClient)UpdateConversionWorkspace(ctxcontext.Context,req*clouddmspb.UpdateConversionWorkspaceRequest,opts...gax.CallOption)(*UpdateConversionWorkspaceOperation,error)UpdateConversionWorkspace updates the parameters of a single conversion workspace.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.UpdateConversionWorkspaceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#UpdateConversionWorkspaceRequest.}op,err:=c.UpdateConversionWorkspace(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) UpdateConversionWorkspaceOperation
func(c*DataMigrationClient)UpdateConversionWorkspaceOperation(namestring)*UpdateConversionWorkspaceOperationUpdateConversionWorkspaceOperation returns a new UpdateConversionWorkspaceOperation from a given name.The name must be that of a previously created UpdateConversionWorkspaceOperation, possibly from a different process.
func (*DataMigrationClient) UpdateMigrationJob
func(c*DataMigrationClient)UpdateMigrationJob(ctxcontext.Context,req*clouddmspb.UpdateMigrationJobRequest,opts...gax.CallOption)(*UpdateMigrationJobOperation,error)UpdateMigrationJob updates the parameters of a single migration job.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.UpdateMigrationJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#UpdateMigrationJobRequest.}op,err:=c.UpdateMigrationJob(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) UpdateMigrationJobOperation
func(c*DataMigrationClient)UpdateMigrationJobOperation(namestring)*UpdateMigrationJobOperationUpdateMigrationJobOperation 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(ctxcontext.Context,req*clouddmspb.VerifyMigrationJobRequest,opts...gax.CallOption)(*VerifyMigrationJobOperation,error)VerifyMigrationJob verify a migration job, making sure the destination can reach the sourceand that all configuration and prerequisites are met.
Example
packagemainimport("context"clouddms"cloud.google.com/go/clouddms/apiv1"clouddmspb"cloud.google.com/go/clouddms/apiv1/clouddmspb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=clouddms.NewDataMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&clouddmspb.VerifyMigrationJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/clouddms/apiv1/clouddmspb#VerifyMigrationJobRequest.}op,err:=c.VerifyMigrationJob(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataMigrationClient) VerifyMigrationJobOperation
func(c*DataMigrationClient)VerifyMigrationJobOperation(namestring)*VerifyMigrationJobOperationVerifyMigrationJobOperation returns a new VerifyMigrationJobOperation from a given name.The name must be that of a previously created VerifyMigrationJobOperation, possibly from a different process.
DatabaseEntityIterator
typeDatabaseEntityIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*clouddmspb.DatabaseEntity,nextPageTokenstring,errerror)// contains filtered or unexported fields}DatabaseEntityIterator manages a stream of *clouddmspb.DatabaseEntity.
func (*DatabaseEntityIterator) All
func(it*DatabaseEntityIterator)All()iter.Seq2[*clouddmspb.DatabaseEntity,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DatabaseEntityIterator) Next
func(it*DatabaseEntityIterator)Next()(*clouddmspb.DatabaseEntity,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DatabaseEntityIterator) PageInfo
func(it*DatabaseEntityIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DeleteConnectionProfileOperation
typeDeleteConnectionProfileOperationstruct{// contains filtered or unexported fields}DeleteConnectionProfileOperation manages a long-running operation from DeleteConnectionProfile.
func (*DeleteConnectionProfileOperation) Done
func(op*DeleteConnectionProfileOperation)Done()boolDone 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()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteConversionWorkspaceOperation
typeDeleteConversionWorkspaceOperationstruct{// contains filtered or unexported fields}DeleteConversionWorkspaceOperation manages a long-running operation from DeleteConversionWorkspace.
func (*DeleteConversionWorkspaceOperation) Done
func(op*DeleteConversionWorkspaceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteConversionWorkspaceOperation) Metadata
func(op*DeleteConversionWorkspaceOperation)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 (*DeleteConversionWorkspaceOperation) Name
func(op*DeleteConversionWorkspaceOperation)Name()stringName 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 (*DeleteConversionWorkspaceOperation) Poll
func(op*DeleteConversionWorkspaceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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 (*DeleteConversionWorkspaceOperation) Wait
func(op*DeleteConversionWorkspaceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteMigrationJobOperation
typeDeleteMigrationJobOperationstruct{// contains filtered or unexported fields}DeleteMigrationJobOperation manages a long-running operation from DeleteMigrationJob.
func (*DeleteMigrationJobOperation) Done
func(op*DeleteMigrationJobOperation)Done()boolDone 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()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeletePrivateConnectionOperation
typeDeletePrivateConnectionOperationstruct{// contains filtered or unexported fields}DeletePrivateConnectionOperation manages a long-running operation from DeletePrivateConnection.
func (*DeletePrivateConnectionOperation) Done
func(op*DeletePrivateConnectionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeletePrivateConnectionOperation) Metadata
func(op*DeletePrivateConnectionOperation)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 (*DeletePrivateConnectionOperation) Name
func(op*DeletePrivateConnectionOperation)Name()stringName 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 (*DeletePrivateConnectionOperation) Poll
func(op*DeletePrivateConnectionOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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 (*DeletePrivateConnectionOperation) Wait
func(op*DeletePrivateConnectionOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
ImportMappingRulesOperation
typeImportMappingRulesOperationstruct{// contains filtered or unexported fields}ImportMappingRulesOperation manages a long-running operation from ImportMappingRules.
func (*ImportMappingRulesOperation) Done
func(op*ImportMappingRulesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*ImportMappingRulesOperation) Metadata
func(op*ImportMappingRulesOperation)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 (*ImportMappingRulesOperation) Name
func(op*ImportMappingRulesOperation)Name()stringName 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 (*ImportMappingRulesOperation) Poll
func(op*ImportMappingRulesOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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 andthe 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 (*ImportMappingRulesOperation) Wait
func(op*ImportMappingRulesOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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.
LocationIterator
typeLocationIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*locationpb.Location,nextPageTokenstring,errerror)// contains filtered or unexported fields}LocationIterator manages a stream of *locationpb.Location.
func (*LocationIterator) All
func(it*LocationIterator)All()iter.Seq2[*locationpb.Location,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*LocationIterator) Next
func(it*LocationIterator)Next()(*locationpb.Location,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*LocationIterator) PageInfo
func(it*LocationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
MappingRuleIterator
typeMappingRuleIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*clouddmspb.MappingRule,nextPageTokenstring,errerror)// contains filtered or unexported fields}MappingRuleIterator manages a stream of *clouddmspb.MappingRule.
func (*MappingRuleIterator) All
func(it*MappingRuleIterator)All()iter.Seq2[*clouddmspb.MappingRule,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*MappingRuleIterator) Next
func(it*MappingRuleIterator)Next()(*clouddmspb.MappingRule,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*MappingRuleIterator) PageInfo
func(it*MappingRuleIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
MigrationJobIterator
typeMigrationJobIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*clouddmspb.MigrationJob,nextPageTokenstring,errerror)// contains filtered or unexported fields}MigrationJobIterator manages a stream of *clouddmspb.MigrationJob.
func (*MigrationJobIterator) All
func(it*MigrationJobIterator)All()iter.Seq2[*clouddmspb.MigrationJob,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*MigrationJobIterator) PageInfo
func(it*MigrationJobIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
OperationIterator
typeOperationIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*longrunningpb.Operation,nextPageTokenstring,errerror)// contains filtered or unexported fields}OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All
func(it*OperationIterator)All()iter.Seq2[*longrunningpb.Operation,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*OperationIterator) Next
func(it*OperationIterator)Next()(*longrunningpb.Operation,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*OperationIterator) PageInfo
func(it*OperationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
PrivateConnectionIterator
typePrivateConnectionIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*clouddmspb.PrivateConnection,nextPageTokenstring,errerror)// contains filtered or unexported fields}PrivateConnectionIterator manages a stream of *clouddmspb.PrivateConnection.
func (*PrivateConnectionIterator) All
func(it*PrivateConnectionIterator)All()iter.Seq2[*clouddmspb.PrivateConnection,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*PrivateConnectionIterator) Next
func(it*PrivateConnectionIterator)Next()(*clouddmspb.PrivateConnection,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*PrivateConnectionIterator) PageInfo
func(it*PrivateConnectionIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
PromoteMigrationJobOperation
typePromoteMigrationJobOperationstruct{// contains filtered or unexported fields}PromoteMigrationJobOperation manages a long-running operation from PromoteMigrationJob.
func (*PromoteMigrationJobOperation) Done
func(op*PromoteMigrationJobOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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.
RestartMigrationJobOperation
typeRestartMigrationJobOperationstruct{// contains filtered or unexported fields}RestartMigrationJobOperation manages a long-running operation from RestartMigrationJob.
func (*RestartMigrationJobOperation) Done
func(op*RestartMigrationJobOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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.
ResumeMigrationJobOperation
typeResumeMigrationJobOperationstruct{// contains filtered or unexported fields}ResumeMigrationJobOperation manages a long-running operation from ResumeMigrationJob.
func (*ResumeMigrationJobOperation) Done
func(op*ResumeMigrationJobOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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.
RollbackConversionWorkspaceOperation
typeRollbackConversionWorkspaceOperationstruct{// contains filtered or unexported fields}RollbackConversionWorkspaceOperation manages a long-running operation from RollbackConversionWorkspace.
func (*RollbackConversionWorkspaceOperation) Done
func(op*RollbackConversionWorkspaceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*RollbackConversionWorkspaceOperation) Metadata
func(op*RollbackConversionWorkspaceOperation)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 (*RollbackConversionWorkspaceOperation) Name
func(op*RollbackConversionWorkspaceOperation)Name()stringName 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 (*RollbackConversionWorkspaceOperation) Poll
func(op*RollbackConversionWorkspaceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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 andthe 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 (*RollbackConversionWorkspaceOperation) Wait
func(op*RollbackConversionWorkspaceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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.
SeedConversionWorkspaceOperation
typeSeedConversionWorkspaceOperationstruct{// contains filtered or unexported fields}SeedConversionWorkspaceOperation manages a long-running operation from SeedConversionWorkspace.
func (*SeedConversionWorkspaceOperation) Done
func(op*SeedConversionWorkspaceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*SeedConversionWorkspaceOperation) Metadata
func(op*SeedConversionWorkspaceOperation)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 (*SeedConversionWorkspaceOperation) Name
func(op*SeedConversionWorkspaceOperation)Name()stringName 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 (*SeedConversionWorkspaceOperation) Poll
func(op*SeedConversionWorkspaceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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 andthe 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 (*SeedConversionWorkspaceOperation) Wait
func(op*SeedConversionWorkspaceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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.
StartMigrationJobOperation
typeStartMigrationJobOperationstruct{// contains filtered or unexported fields}StartMigrationJobOperation manages a long-running operation from StartMigrationJob.
func (*StartMigrationJobOperation) Done
func(op*StartMigrationJobOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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.
StopMigrationJobOperation
typeStopMigrationJobOperationstruct{// contains filtered or unexported fields}StopMigrationJobOperation manages a long-running operation from StopMigrationJob.
func (*StopMigrationJobOperation) Done
func(op*StopMigrationJobOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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.
StringIterator
typeStringIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]string,nextPageTokenstring,errerror)// contains filtered or unexported fields}StringIterator manages a stream of string.
func (*StringIterator) All
func(it*StringIterator)All()iter.Seq2[string,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*StringIterator) Next
func(it*StringIterator)Next()(string,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*StringIterator) PageInfo
func(it*StringIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
UpdateConnectionProfileOperation
typeUpdateConnectionProfileOperationstruct{// contains filtered or unexported fields}UpdateConnectionProfileOperation manages a long-running operation from UpdateConnectionProfile.
func (*UpdateConnectionProfileOperation) Done
func(op*UpdateConnectionProfileOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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.
UpdateConversionWorkspaceOperation
typeUpdateConversionWorkspaceOperationstruct{// contains filtered or unexported fields}UpdateConversionWorkspaceOperation manages a long-running operation from UpdateConversionWorkspace.
func (*UpdateConversionWorkspaceOperation) Done
func(op*UpdateConversionWorkspaceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateConversionWorkspaceOperation) Metadata
func(op*UpdateConversionWorkspaceOperation)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 (*UpdateConversionWorkspaceOperation) Name
func(op*UpdateConversionWorkspaceOperation)Name()stringName 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 (*UpdateConversionWorkspaceOperation) Poll
func(op*UpdateConversionWorkspaceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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 andthe 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 (*UpdateConversionWorkspaceOperation) Wait
func(op*UpdateConversionWorkspaceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*clouddmspb.ConversionWorkspace,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.
UpdateMigrationJobOperation
typeUpdateMigrationJobOperationstruct{// contains filtered or unexported fields}UpdateMigrationJobOperation manages a long-running operation from UpdateMigrationJob.
func (*UpdateMigrationJobOperation) Done
func(op*UpdateMigrationJobOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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.
VerifyMigrationJobOperation
typeVerifyMigrationJobOperationstruct{// contains filtered or unexported fields}VerifyMigrationJobOperation manages a long-running operation from VerifyMigrationJob.
func (*VerifyMigrationJobOperation) Done
func(op*VerifyMigrationJobOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.