- 0.121.6 (latest)
- 0.121.5
- 0.120.1
- 0.119.0
- 0.118.3
- 0.117.0
- 0.116.0
- 0.115.1
- 0.114.0
- 0.113.0
- 0.112.2
- 0.111.0
- 0.110.10
- 0.109.0
- 0.108.0
- 0.107.0
- 0.106.0
- 0.105.0
- 0.104.0
- 0.103.0
- 0.102.1
- 0.101.1
- 0.100.2
- 0.99.0
- 0.98.0
- 0.97.0
- 0.96.0
- 0.95.0
- 0.94.1
- 0.93.3
- 0.92.3
- 0.91.1
- 0.90.0
- 0.89.0
- 0.88.0
- 0.87.0
- 0.86.0
- 0.85.0
- 0.84.0
- 0.83.0
- 0.82.0
- 0.81.0
- 0.80.0
- 0.79.0
- 0.78.0
- 0.77.0
- 0.76.0
- 0.75.0
Package clouddms is an auto-generated package for the Database Migration API.
Manage Cloud Database Migration Service resources on Google Cloud Platform.
NOTE : This package is in beta . It is not stable , and may be subject to changes .
Use of Context
The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go .
Functions
func DefaultAuthScopes
func
DefaultAuthScopes
()
[]
string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
ConnectionProfileIterator
type
ConnectionProfileIterator
struct
{
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response
interface
{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch
func
(
pageSize
int
,
pageToken
string
)
(
results
[]
*
clouddmspb
.
ConnectionProfile
,
nextPageToken
string
,
err
error
)
// contains filtered or unexported fields
}
ConnectionProfileIterator manages a stream of *clouddmspb.ConnectionProfile.
func (*ConnectionProfileIterator) Next
func
(
it
*
ConnectionProfileIterator
)
Next
()
(
*
clouddmspb
.
ConnectionProfile
,
error
)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ConnectionProfileIterator) PageInfo
func
(
it
*
ConnectionProfileIterator
)
PageInfo
()
*
iterator
.
PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
CreateConnectionProfileOperation
type
CreateConnectionProfileOperation
struct
{
// contains filtered or unexported fields
}
CreateConnectionProfileOperation manages a long-running operation from CreateConnectionProfile.
func (*CreateConnectionProfileOperation) Done
func
(
op
*
CreateConnectionProfileOperation
)
Done
()
bool
Done reports whether the long-running operation has completed.
func (*CreateConnectionProfileOperation) Metadata
func
(
op
*
CreateConnectionProfileOperation
)
Metadata
()
(
*
clouddmspb
.
OperationMetadata
,
error
)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateConnectionProfileOperation) Name
func
(
op
*
CreateConnectionProfileOperation
)
Name
()
string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateConnectionProfileOperation) Poll
func
(
op
*
CreateConnectionProfileOperation
)
Poll
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
ConnectionProfile
,
error
)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateConnectionProfileOperation) Wait
func
(
op
*
CreateConnectionProfileOperation
)
Wait
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
ConnectionProfile
,
error
)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateMigrationJobOperation
type
CreateMigrationJobOperation
struct
{
// contains filtered or unexported fields
}
CreateMigrationJobOperation manages a long-running operation from CreateMigrationJob.
func (*CreateMigrationJobOperation) Done
func
(
op
*
CreateMigrationJobOperation
)
Done
()
bool
Done reports whether the long-running operation has completed.
func (*CreateMigrationJobOperation) Metadata
func
(
op
*
CreateMigrationJobOperation
)
Metadata
()
(
*
clouddmspb
.
OperationMetadata
,
error
)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateMigrationJobOperation) Name
func
(
op
*
CreateMigrationJobOperation
)
Name
()
string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateMigrationJobOperation) Poll
func
(
op
*
CreateMigrationJobOperation
)
Poll
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateMigrationJobOperation) Wait
func
(
op
*
CreateMigrationJobOperation
)
Wait
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DataMigrationCallOptions
type
DataMigrationCallOptions
struct
{
ListMigrationJobs
[]
gax
.
CallOption
GetMigrationJob
[]
gax
.
CallOption
CreateMigrationJob
[]
gax
.
CallOption
UpdateMigrationJob
[]
gax
.
CallOption
DeleteMigrationJob
[]
gax
.
CallOption
StartMigrationJob
[]
gax
.
CallOption
StopMigrationJob
[]
gax
.
CallOption
ResumeMigrationJob
[]
gax
.
CallOption
PromoteMigrationJob
[]
gax
.
CallOption
VerifyMigrationJob
[]
gax
.
CallOption
RestartMigrationJob
[]
gax
.
CallOption
GenerateSshScript
[]
gax
.
CallOption
ListConnectionProfiles
[]
gax
.
CallOption
GetConnectionProfile
[]
gax
.
CallOption
CreateConnectionProfile
[]
gax
.
CallOption
UpdateConnectionProfile
[]
gax
.
CallOption
DeleteConnectionProfile
[]
gax
.
CallOption
}
DataMigrationCallOptions contains the retry settings for each method of DataMigrationClient.
DataMigrationClient
type
DataMigrationClient
struct
{
// The call options for this service.
CallOptions
*
DataMigrationCallOptions
// LROClient is used internally to handle long-running operations.
// It is exposed so that its CallOptions can be modified if required.
// Users should not Close this client.
LROClient
*
lroauto
.
OperationsClient
// contains filtered or unexported fields
}
DataMigrationClient is a client for interacting with Database Migration API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Database Migration service
func NewDataMigrationClient
func
NewDataMigrationClient
(
ctx
context
.
Context
,
opts
...
option
.
ClientOption
)
(
*
DataMigrationClient
,
error
)
NewDataMigrationClient creates a new data migration service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Database Migration service
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
// TODO: Use client.
_
=
c
}
func (*DataMigrationClient) Close
func
(
c
*
DataMigrationClient
)
Close
()
error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DataMigrationClient) Connection
func
(
c
*
DataMigrationClient
)
Connection
()
*
grpc
.
ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*DataMigrationClient) CreateConnectionProfile
func
(
c
*
DataMigrationClient
)
CreateConnectionProfile
(
ctx
context
.
Context
,
req
*
clouddmspb
.
CreateConnectionProfileRequest
,
opts
...
gax
.
CallOption
)
(
*
CreateConnectionProfileOperation
,
error
)
CreateConnectionProfile creates a new connection profile in a given project and location.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
CreateConnectionProfileRequest
{
// TODO: Fill request struct fields.
}
op
,
err
:=
c
.
CreateConnectionProfile
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
resp
,
err
:=
op
.
Wait
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*DataMigrationClient) CreateConnectionProfileOperation
func
(
c
*
DataMigrationClient
)
CreateConnectionProfileOperation
(
name
string
)
*
CreateConnectionProfileOperation
CreateConnectionProfileOperation returns a new CreateConnectionProfileOperation from a given name. The name must be that of a previously created CreateConnectionProfileOperation, possibly from a different process.
func (*DataMigrationClient) CreateMigrationJob
func
(
c
*
DataMigrationClient
)
CreateMigrationJob
(
ctx
context
.
Context
,
req
*
clouddmspb
.
CreateMigrationJobRequest
,
opts
...
gax
.
CallOption
)
(
*
CreateMigrationJobOperation
,
error
)
CreateMigrationJob creates a new migration job in a given project and location.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
CreateMigrationJobRequest
{
// TODO: Fill request struct fields.
}
op
,
err
:=
c
.
CreateMigrationJob
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
resp
,
err
:=
op
.
Wait
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*DataMigrationClient) CreateMigrationJobOperation
func
(
c
*
DataMigrationClient
)
CreateMigrationJobOperation
(
name
string
)
*
CreateMigrationJobOperation
CreateMigrationJobOperation returns a new CreateMigrationJobOperation from a given name. The name must be that of a previously created CreateMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) DeleteConnectionProfile
func
(
c
*
DataMigrationClient
)
DeleteConnectionProfile
(
ctx
context
.
Context
,
req
*
clouddmspb
.
DeleteConnectionProfileRequest
,
opts
...
gax
.
CallOption
)
(
*
DeleteConnectionProfileOperation
,
error
)
DeleteConnectionProfile deletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
DeleteConnectionProfileRequest
{
// TODO: Fill request struct fields.
}
op
,
err
:=
c
.
DeleteConnectionProfile
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
err
=
op
.
Wait
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
}
func (*DataMigrationClient) DeleteConnectionProfileOperation
func
(
c
*
DataMigrationClient
)
DeleteConnectionProfileOperation
(
name
string
)
*
DeleteConnectionProfileOperation
DeleteConnectionProfileOperation returns a new DeleteConnectionProfileOperation from a given name. The name must be that of a previously created DeleteConnectionProfileOperation, possibly from a different process.
func (*DataMigrationClient) DeleteMigrationJob
func
(
c
*
DataMigrationClient
)
DeleteMigrationJob
(
ctx
context
.
Context
,
req
*
clouddmspb
.
DeleteMigrationJobRequest
,
opts
...
gax
.
CallOption
)
(
*
DeleteMigrationJobOperation
,
error
)
DeleteMigrationJob deletes a single migration job.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
DeleteMigrationJobRequest
{
// TODO: Fill request struct fields.
}
op
,
err
:=
c
.
DeleteMigrationJob
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
err
=
op
.
Wait
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
}
func (*DataMigrationClient) DeleteMigrationJobOperation
func
(
c
*
DataMigrationClient
)
DeleteMigrationJobOperation
(
name
string
)
*
DeleteMigrationJobOperation
DeleteMigrationJobOperation returns a new DeleteMigrationJobOperation from a given name. The name must be that of a previously created DeleteMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) GenerateSshScript
func
(
c
*
DataMigrationClient
)
GenerateSshScript
(
ctx
context
.
Context
,
req
*
clouddmspb
.
GenerateSshScriptRequest
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
SshScript
,
error
)
GenerateSshScript generate a SSH configuration script to configure the reverse SSH connectivity.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
GenerateSshScriptRequest
{
// TODO: Fill request struct fields.
}
resp
,
err
:=
c
.
GenerateSshScript
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*DataMigrationClient) GetConnectionProfile
func
(
c
*
DataMigrationClient
)
GetConnectionProfile
(
ctx
context
.
Context
,
req
*
clouddmspb
.
GetConnectionProfileRequest
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
ConnectionProfile
,
error
)
GetConnectionProfile gets details of a single connection profile.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
GetConnectionProfileRequest
{
// TODO: Fill request struct fields.
}
resp
,
err
:=
c
.
GetConnectionProfile
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*DataMigrationClient) GetMigrationJob
func
(
c
*
DataMigrationClient
)
GetMigrationJob
(
ctx
context
.
Context
,
req
*
clouddmspb
.
GetMigrationJobRequest
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
GetMigrationJob gets details of a single migration job.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
GetMigrationJobRequest
{
// TODO: Fill request struct fields.
}
resp
,
err
:=
c
.
GetMigrationJob
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*DataMigrationClient) ListConnectionProfiles
func
(
c
*
DataMigrationClient
)
ListConnectionProfiles
(
ctx
context
.
Context
,
req
*
clouddmspb
.
ListConnectionProfilesRequest
,
opts
...
gax
.
CallOption
)
*
ConnectionProfileIterator
ListConnectionProfiles retrieve a list of all connection profiles in a given project and location.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
"google.golang.org/api/iterator"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
ListConnectionProfilesRequest
{
// TODO: Fill request struct fields.
}
it
:=
c
.
ListConnectionProfiles
(
ctx
,
req
)
for
{
resp
,
err
:=
it
.
Next
()
if
err
==
iterator
.
Done
{
break
}
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
}
func (*DataMigrationClient) ListMigrationJobs
func
(
c
*
DataMigrationClient
)
ListMigrationJobs
(
ctx
context
.
Context
,
req
*
clouddmspb
.
ListMigrationJobsRequest
,
opts
...
gax
.
CallOption
)
*
MigrationJobIterator
ListMigrationJobs lists migration jobs in a given project and location.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
"google.golang.org/api/iterator"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
ListMigrationJobsRequest
{
// TODO: Fill request struct fields.
}
it
:=
c
.
ListMigrationJobs
(
ctx
,
req
)
for
{
resp
,
err
:=
it
.
Next
()
if
err
==
iterator
.
Done
{
break
}
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
}
func (*DataMigrationClient) PromoteMigrationJob
func
(
c
*
DataMigrationClient
)
PromoteMigrationJob
(
ctx
context
.
Context
,
req
*
clouddmspb
.
PromoteMigrationJobRequest
,
opts
...
gax
.
CallOption
)
(
*
PromoteMigrationJobOperation
,
error
)
PromoteMigrationJob promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
PromoteMigrationJobRequest
{
// TODO: Fill request struct fields.
}
op
,
err
:=
c
.
PromoteMigrationJob
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
resp
,
err
:=
op
.
Wait
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*DataMigrationClient) PromoteMigrationJobOperation
func
(
c
*
DataMigrationClient
)
PromoteMigrationJobOperation
(
name
string
)
*
PromoteMigrationJobOperation
PromoteMigrationJobOperation returns a new PromoteMigrationJobOperation from a given name. The name must be that of a previously created PromoteMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) RestartMigrationJob
func
(
c
*
DataMigrationClient
)
RestartMigrationJob
(
ctx
context
.
Context
,
req
*
clouddmspb
.
RestartMigrationJobRequest
,
opts
...
gax
.
CallOption
)
(
*
RestartMigrationJobOperation
,
error
)
RestartMigrationJob restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
RestartMigrationJobRequest
{
// TODO: Fill request struct fields.
}
op
,
err
:=
c
.
RestartMigrationJob
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
resp
,
err
:=
op
.
Wait
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*DataMigrationClient) RestartMigrationJobOperation
func
(
c
*
DataMigrationClient
)
RestartMigrationJobOperation
(
name
string
)
*
RestartMigrationJobOperation
RestartMigrationJobOperation returns a new RestartMigrationJobOperation from a given name. The name must be that of a previously created RestartMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) ResumeMigrationJob
func
(
c
*
DataMigrationClient
)
ResumeMigrationJob
(
ctx
context
.
Context
,
req
*
clouddmspb
.
ResumeMigrationJobRequest
,
opts
...
gax
.
CallOption
)
(
*
ResumeMigrationJobOperation
,
error
)
ResumeMigrationJob resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
ResumeMigrationJobRequest
{
// TODO: Fill request struct fields.
}
op
,
err
:=
c
.
ResumeMigrationJob
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
resp
,
err
:=
op
.
Wait
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*DataMigrationClient) ResumeMigrationJobOperation
func
(
c
*
DataMigrationClient
)
ResumeMigrationJobOperation
(
name
string
)
*
ResumeMigrationJobOperation
ResumeMigrationJobOperation returns a new ResumeMigrationJobOperation from a given name. The name must be that of a previously created ResumeMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) StartMigrationJob
func
(
c
*
DataMigrationClient
)
StartMigrationJob
(
ctx
context
.
Context
,
req
*
clouddmspb
.
StartMigrationJobRequest
,
opts
...
gax
.
CallOption
)
(
*
StartMigrationJobOperation
,
error
)
StartMigrationJob start an already created migration job.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
StartMigrationJobRequest
{
// TODO: Fill request struct fields.
}
op
,
err
:=
c
.
StartMigrationJob
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
resp
,
err
:=
op
.
Wait
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*DataMigrationClient) StartMigrationJobOperation
func
(
c
*
DataMigrationClient
)
StartMigrationJobOperation
(
name
string
)
*
StartMigrationJobOperation
StartMigrationJobOperation returns a new StartMigrationJobOperation from a given name. The name must be that of a previously created StartMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) StopMigrationJob
func
(
c
*
DataMigrationClient
)
StopMigrationJob
(
ctx
context
.
Context
,
req
*
clouddmspb
.
StopMigrationJobRequest
,
opts
...
gax
.
CallOption
)
(
*
StopMigrationJobOperation
,
error
)
StopMigrationJob stops a running migration job.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
StopMigrationJobRequest
{
// TODO: Fill request struct fields.
}
op
,
err
:=
c
.
StopMigrationJob
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
resp
,
err
:=
op
.
Wait
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*DataMigrationClient) StopMigrationJobOperation
func
(
c
*
DataMigrationClient
)
StopMigrationJobOperation
(
name
string
)
*
StopMigrationJobOperation
StopMigrationJobOperation returns a new StopMigrationJobOperation from a given name. The name must be that of a previously created StopMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) UpdateConnectionProfile
func
(
c
*
DataMigrationClient
)
UpdateConnectionProfile
(
ctx
context
.
Context
,
req
*
clouddmspb
.
UpdateConnectionProfileRequest
,
opts
...
gax
.
CallOption
)
(
*
UpdateConnectionProfileOperation
,
error
)
UpdateConnectionProfile update the configuration of a single connection profile.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
UpdateConnectionProfileRequest
{
// TODO: Fill request struct fields.
}
op
,
err
:=
c
.
UpdateConnectionProfile
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
resp
,
err
:=
op
.
Wait
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*DataMigrationClient) UpdateConnectionProfileOperation
func
(
c
*
DataMigrationClient
)
UpdateConnectionProfileOperation
(
name
string
)
*
UpdateConnectionProfileOperation
UpdateConnectionProfileOperation returns a new UpdateConnectionProfileOperation from a given name. The name must be that of a previously created UpdateConnectionProfileOperation, possibly from a different process.
func (*DataMigrationClient) UpdateMigrationJob
func
(
c
*
DataMigrationClient
)
UpdateMigrationJob
(
ctx
context
.
Context
,
req
*
clouddmspb
.
UpdateMigrationJobRequest
,
opts
...
gax
.
CallOption
)
(
*
UpdateMigrationJobOperation
,
error
)
UpdateMigrationJob updates the parameters of a single migration job.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
UpdateMigrationJobRequest
{
// TODO: Fill request struct fields.
}
op
,
err
:=
c
.
UpdateMigrationJob
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
resp
,
err
:=
op
.
Wait
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*DataMigrationClient) UpdateMigrationJobOperation
func
(
c
*
DataMigrationClient
)
UpdateMigrationJobOperation
(
name
string
)
*
UpdateMigrationJobOperation
UpdateMigrationJobOperation returns a new UpdateMigrationJobOperation from a given name. The name must be that of a previously created UpdateMigrationJobOperation, possibly from a different process.
func (*DataMigrationClient) VerifyMigrationJob
func
(
c
*
DataMigrationClient
)
VerifyMigrationJob
(
ctx
context
.
Context
,
req
*
clouddmspb
.
VerifyMigrationJobRequest
,
opts
...
gax
.
CallOption
)
(
*
VerifyMigrationJobOperation
,
error
)
VerifyMigrationJob verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.
Example
package
main
import
(
"context"
clouddms
"cloud.google.com/go/clouddms/apiv1"
clouddmspb
"google.golang.org/genproto/googleapis/cloud/clouddms/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
clouddms
.
NewDataMigrationClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& clouddmspb
.
VerifyMigrationJobRequest
{
// TODO: Fill request struct fields.
}
op
,
err
:=
c
.
VerifyMigrationJob
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
resp
,
err
:=
op
.
Wait
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*DataMigrationClient) VerifyMigrationJobOperation
func
(
c
*
DataMigrationClient
)
VerifyMigrationJobOperation
(
name
string
)
*
VerifyMigrationJobOperation
VerifyMigrationJobOperation returns a new VerifyMigrationJobOperation from a given name. The name must be that of a previously created VerifyMigrationJobOperation, possibly from a different process.
DeleteConnectionProfileOperation
type
DeleteConnectionProfileOperation
struct
{
// contains filtered or unexported fields
}
DeleteConnectionProfileOperation manages a long-running operation from DeleteConnectionProfile.
func (*DeleteConnectionProfileOperation) Done
func
(
op
*
DeleteConnectionProfileOperation
)
Done
()
bool
Done reports whether the long-running operation has completed.
func (*DeleteConnectionProfileOperation) Metadata
func
(
op
*
DeleteConnectionProfileOperation
)
Metadata
()
(
*
clouddmspb
.
OperationMetadata
,
error
)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteConnectionProfileOperation) Name
func
(
op
*
DeleteConnectionProfileOperation
)
Name
()
string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteConnectionProfileOperation) Poll
func
(
op
*
DeleteConnectionProfileOperation
)
Poll
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteConnectionProfileOperation) Wait
func
(
op
*
DeleteConnectionProfileOperation
)
Wait
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteMigrationJobOperation
type
DeleteMigrationJobOperation
struct
{
// contains filtered or unexported fields
}
DeleteMigrationJobOperation manages a long-running operation from DeleteMigrationJob.
func (*DeleteMigrationJobOperation) Done
func
(
op
*
DeleteMigrationJobOperation
)
Done
()
bool
Done reports whether the long-running operation has completed.
func (*DeleteMigrationJobOperation) Metadata
func
(
op
*
DeleteMigrationJobOperation
)
Metadata
()
(
*
clouddmspb
.
OperationMetadata
,
error
)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteMigrationJobOperation) Name
func
(
op
*
DeleteMigrationJobOperation
)
Name
()
string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteMigrationJobOperation) Poll
func
(
op
*
DeleteMigrationJobOperation
)
Poll
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteMigrationJobOperation) Wait
func
(
op
*
DeleteMigrationJobOperation
)
Wait
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
MigrationJobIterator
type
MigrationJobIterator
struct
{
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response
interface
{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch
func
(
pageSize
int
,
pageToken
string
)
(
results
[]
*
clouddmspb
.
MigrationJob
,
nextPageToken
string
,
err
error
)
// contains filtered or unexported fields
}
MigrationJobIterator manages a stream of *clouddmspb.MigrationJob.
func (*MigrationJobIterator) Next
func
(
it
*
MigrationJobIterator
)
Next
()
(
*
clouddmspb
.
MigrationJob
,
error
)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*MigrationJobIterator) PageInfo
func
(
it
*
MigrationJobIterator
)
PageInfo
()
*
iterator
.
PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
PromoteMigrationJobOperation
type
PromoteMigrationJobOperation
struct
{
// contains filtered or unexported fields
}
PromoteMigrationJobOperation manages a long-running operation from PromoteMigrationJob.
func (*PromoteMigrationJobOperation) Done
func
(
op
*
PromoteMigrationJobOperation
)
Done
()
bool
Done reports whether the long-running operation has completed.
func (*PromoteMigrationJobOperation) Metadata
func
(
op
*
PromoteMigrationJobOperation
)
Metadata
()
(
*
clouddmspb
.
OperationMetadata
,
error
)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*PromoteMigrationJobOperation) Name
func
(
op
*
PromoteMigrationJobOperation
)
Name
()
string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*PromoteMigrationJobOperation) Poll
func
(
op
*
PromoteMigrationJobOperation
)
Poll
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*PromoteMigrationJobOperation) Wait
func
(
op
*
PromoteMigrationJobOperation
)
Wait
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
RestartMigrationJobOperation
type
RestartMigrationJobOperation
struct
{
// contains filtered or unexported fields
}
RestartMigrationJobOperation manages a long-running operation from RestartMigrationJob.
func (*RestartMigrationJobOperation) Done
func
(
op
*
RestartMigrationJobOperation
)
Done
()
bool
Done reports whether the long-running operation has completed.
func (*RestartMigrationJobOperation) Metadata
func
(
op
*
RestartMigrationJobOperation
)
Metadata
()
(
*
clouddmspb
.
OperationMetadata
,
error
)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*RestartMigrationJobOperation) Name
func
(
op
*
RestartMigrationJobOperation
)
Name
()
string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*RestartMigrationJobOperation) Poll
func
(
op
*
RestartMigrationJobOperation
)
Poll
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*RestartMigrationJobOperation) Wait
func
(
op
*
RestartMigrationJobOperation
)
Wait
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
ResumeMigrationJobOperation
type
ResumeMigrationJobOperation
struct
{
// contains filtered or unexported fields
}
ResumeMigrationJobOperation manages a long-running operation from ResumeMigrationJob.
func (*ResumeMigrationJobOperation) Done
func
(
op
*
ResumeMigrationJobOperation
)
Done
()
bool
Done reports whether the long-running operation has completed.
func (*ResumeMigrationJobOperation) Metadata
func
(
op
*
ResumeMigrationJobOperation
)
Metadata
()
(
*
clouddmspb
.
OperationMetadata
,
error
)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*ResumeMigrationJobOperation) Name
func
(
op
*
ResumeMigrationJobOperation
)
Name
()
string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*ResumeMigrationJobOperation) Poll
func
(
op
*
ResumeMigrationJobOperation
)
Poll
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ResumeMigrationJobOperation) Wait
func
(
op
*
ResumeMigrationJobOperation
)
Wait
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
StartMigrationJobOperation
type
StartMigrationJobOperation
struct
{
// contains filtered or unexported fields
}
StartMigrationJobOperation manages a long-running operation from StartMigrationJob.
func (*StartMigrationJobOperation) Done
func
(
op
*
StartMigrationJobOperation
)
Done
()
bool
Done reports whether the long-running operation has completed.
func (*StartMigrationJobOperation) Metadata
func
(
op
*
StartMigrationJobOperation
)
Metadata
()
(
*
clouddmspb
.
OperationMetadata
,
error
)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*StartMigrationJobOperation) Name
func
(
op
*
StartMigrationJobOperation
)
Name
()
string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*StartMigrationJobOperation) Poll
func
(
op
*
StartMigrationJobOperation
)
Poll
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*StartMigrationJobOperation) Wait
func
(
op
*
StartMigrationJobOperation
)
Wait
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
StopMigrationJobOperation
type
StopMigrationJobOperation
struct
{
// contains filtered or unexported fields
}
StopMigrationJobOperation manages a long-running operation from StopMigrationJob.
func (*StopMigrationJobOperation) Done
func
(
op
*
StopMigrationJobOperation
)
Done
()
bool
Done reports whether the long-running operation has completed.
func (*StopMigrationJobOperation) Metadata
func
(
op
*
StopMigrationJobOperation
)
Metadata
()
(
*
clouddmspb
.
OperationMetadata
,
error
)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*StopMigrationJobOperation) Name
func
(
op
*
StopMigrationJobOperation
)
Name
()
string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*StopMigrationJobOperation) Poll
func
(
op
*
StopMigrationJobOperation
)
Poll
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*StopMigrationJobOperation) Wait
func
(
op
*
StopMigrationJobOperation
)
Wait
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateConnectionProfileOperation
type
UpdateConnectionProfileOperation
struct
{
// contains filtered or unexported fields
}
UpdateConnectionProfileOperation manages a long-running operation from UpdateConnectionProfile.
func (*UpdateConnectionProfileOperation) Done
func
(
op
*
UpdateConnectionProfileOperation
)
Done
()
bool
Done reports whether the long-running operation has completed.
func (*UpdateConnectionProfileOperation) Metadata
func
(
op
*
UpdateConnectionProfileOperation
)
Metadata
()
(
*
clouddmspb
.
OperationMetadata
,
error
)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateConnectionProfileOperation) Name
func
(
op
*
UpdateConnectionProfileOperation
)
Name
()
string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateConnectionProfileOperation) Poll
func
(
op
*
UpdateConnectionProfileOperation
)
Poll
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
ConnectionProfile
,
error
)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateConnectionProfileOperation) Wait
func
(
op
*
UpdateConnectionProfileOperation
)
Wait
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
ConnectionProfile
,
error
)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateMigrationJobOperation
type
UpdateMigrationJobOperation
struct
{
// contains filtered or unexported fields
}
UpdateMigrationJobOperation manages a long-running operation from UpdateMigrationJob.
func (*UpdateMigrationJobOperation) Done
func
(
op
*
UpdateMigrationJobOperation
)
Done
()
bool
Done reports whether the long-running operation has completed.
func (*UpdateMigrationJobOperation) Metadata
func
(
op
*
UpdateMigrationJobOperation
)
Metadata
()
(
*
clouddmspb
.
OperationMetadata
,
error
)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateMigrationJobOperation) Name
func
(
op
*
UpdateMigrationJobOperation
)
Name
()
string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateMigrationJobOperation) Poll
func
(
op
*
UpdateMigrationJobOperation
)
Poll
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateMigrationJobOperation) Wait
func
(
op
*
UpdateMigrationJobOperation
)
Wait
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
VerifyMigrationJobOperation
type
VerifyMigrationJobOperation
struct
{
// contains filtered or unexported fields
}
VerifyMigrationJobOperation manages a long-running operation from VerifyMigrationJob.
func (*VerifyMigrationJobOperation) Done
func
(
op
*
VerifyMigrationJobOperation
)
Done
()
bool
Done reports whether the long-running operation has completed.
func (*VerifyMigrationJobOperation) Metadata
func
(
op
*
VerifyMigrationJobOperation
)
Metadata
()
(
*
clouddmspb
.
OperationMetadata
,
error
)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*VerifyMigrationJobOperation) Name
func
(
op
*
VerifyMigrationJobOperation
)
Name
()
string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*VerifyMigrationJobOperation) Poll
func
(
op
*
VerifyMigrationJobOperation
)
Poll
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*VerifyMigrationJobOperation) Wait
func
(
op
*
VerifyMigrationJobOperation
)
Wait
(
ctx
context
.
Context
,
opts
...
gax
.
CallOption
)
(
*
clouddmspb
.
MigrationJob
,
error
)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.