- 2.54.0 (latest)
- 2.53.0
- 2.52.0
- 2.51.0
- 2.50.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.0
- 2.38.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.8
- 2.1.9
public class DataMigrationServiceClient implements BackgroundResource
Service Description: Database Migration service
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
MigrationJobName name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]");
MigrationJob response = dataMigrationServiceClient.getMigrationJob(name);
}
Note: close() needs to be called on the DataMigrationServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of DataMigrationServiceSettings to create(). For example:
To customize credentials:
DataMigrationServiceSettings dataMigrationServiceSettings =
DataMigrationServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create(dataMigrationServiceSettings);
To customize the endpoint:
DataMigrationServiceSettings dataMigrationServiceSettings =
DataMigrationServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create(dataMigrationServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final DataMigrationServiceClient create()
Constructs an instance of DataMigrationServiceClient with default settings.
Type | Description |
DataMigrationServiceClient |
Type | Description |
IOException |
create(DataMigrationServiceSettings settings)
public static final DataMigrationServiceClient create(DataMigrationServiceSettings settings)
Constructs an instance of DataMigrationServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Name | Description |
settings | DataMigrationServiceSettings |
Type | Description |
DataMigrationServiceClient |
Type | Description |
IOException |
create(DataMigrationServiceStub stub)
public static final DataMigrationServiceClient create(DataMigrationServiceStub stub)
Constructs an instance of DataMigrationServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(DataMigrationServiceSettings).
Name | Description |
stub | DataMigrationServiceStub |
Type | Description |
DataMigrationServiceClient |
Constructors
DataMigrationServiceClient(DataMigrationServiceSettings settings)
protected DataMigrationServiceClient(DataMigrationServiceSettings settings)
Constructs an instance of DataMigrationServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
Name | Description |
settings | DataMigrationServiceSettings |
DataMigrationServiceClient(DataMigrationServiceStub stub)
protected DataMigrationServiceClient(DataMigrationServiceStub stub)
Name | Description |
stub | DataMigrationServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Name | Description |
duration | long |
unit | TimeUnit |
Type | Description |
boolean |
Type | Description |
InterruptedException |
close()
public final void close()
createConnectionProfileAsync(ConnectionProfileName parent, ConnectionProfile connectionProfile, String connectionProfileId)
public final OperationFuture<ConnectionProfile,OperationMetadata> createConnectionProfileAsync(ConnectionProfileName parent, ConnectionProfile connectionProfile, String connectionProfileId)
Creates a new connection profile in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConnectionProfileName parent =
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]");
ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
String connectionProfileId = "connectionProfileId597575526";
ConnectionProfile response =
dataMigrationServiceClient
.createConnectionProfileAsync(parent, connectionProfile, connectionProfileId)
.get();
}
Name | Description |
parent | ConnectionProfileName Required. The parent, which owns this collection of connection profiles. |
connectionProfile | ConnectionProfile Required. The create request body including the connection profile data |
connectionProfileId | String Required. The connection profile identifier. |
Type | Description |
OperationFuture<ConnectionProfile,OperationMetadata> |
createConnectionProfileAsync(CreateConnectionProfileRequest request)
public final OperationFuture<ConnectionProfile,OperationMetadata> createConnectionProfileAsync(CreateConnectionProfileRequest request)
Creates a new connection profile in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConnectionProfileRequest request =
CreateConnectionProfileRequest.newBuilder()
.setParent(
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
.toString())
.setConnectionProfileId("connectionProfileId597575526")
.setConnectionProfile(ConnectionProfile.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ConnectionProfile response =
dataMigrationServiceClient.createConnectionProfileAsync(request).get();
}
Name | Description |
request | CreateConnectionProfileRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<ConnectionProfile,OperationMetadata> |
createConnectionProfileAsync(String parent, ConnectionProfile connectionProfile, String connectionProfileId)
public final OperationFuture<ConnectionProfile,OperationMetadata> createConnectionProfileAsync(String parent, ConnectionProfile connectionProfile, String connectionProfileId)
Creates a new connection profile in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String parent =
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]").toString();
ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
String connectionProfileId = "connectionProfileId597575526";
ConnectionProfile response =
dataMigrationServiceClient
.createConnectionProfileAsync(parent, connectionProfile, connectionProfileId)
.get();
}
Name | Description |
parent | String Required. The parent, which owns this collection of connection profiles. |
connectionProfile | ConnectionProfile Required. The create request body including the connection profile data |
connectionProfileId | String Required. The connection profile identifier. |
Type | Description |
OperationFuture<ConnectionProfile,OperationMetadata> |
createConnectionProfileCallable()
public final UnaryCallable<CreateConnectionProfileRequest,Operation> createConnectionProfileCallable()
Creates a new connection profile in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConnectionProfileRequest request =
CreateConnectionProfileRequest.newBuilder()
.setParent(
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
.toString())
.setConnectionProfileId("connectionProfileId597575526")
.setConnectionProfile(ConnectionProfile.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.createConnectionProfileCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateConnectionProfileRequest,Operation> |
createConnectionProfileOperationCallable()
public final OperationCallable<CreateConnectionProfileRequest,ConnectionProfile,OperationMetadata> createConnectionProfileOperationCallable()
Creates a new connection profile in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConnectionProfileRequest request =
CreateConnectionProfileRequest.newBuilder()
.setParent(
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
.toString())
.setConnectionProfileId("connectionProfileId597575526")
.setConnectionProfile(ConnectionProfile.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<CreateConnectionProfileRequest,ConnectionProfile,OperationMetadata> |
createMigrationJobAsync(CreateMigrationJobRequest request)
public final OperationFuture<MigrationJob,OperationMetadata> createMigrationJobAsync(CreateMigrationJobRequest request)
Creates a new migration job in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateMigrationJobRequest request =
CreateMigrationJobRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setMigrationJobId("migrationJobId1870575242")
.setMigrationJob(MigrationJob.newBuilder().build())
.setRequestId("requestId693933066")
.build();
MigrationJob response = dataMigrationServiceClient.createMigrationJobAsync(request).get();
}
Name | Description |
request | CreateMigrationJobRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
createMigrationJobAsync(LocationName parent, MigrationJob migrationJob, String migrationJobId)
public final OperationFuture<MigrationJob,OperationMetadata> createMigrationJobAsync(LocationName parent, MigrationJob migrationJob, String migrationJobId)
Creates a new migration job in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
MigrationJob migrationJob = MigrationJob.newBuilder().build();
String migrationJobId = "migrationJobId1870575242";
MigrationJob response =
dataMigrationServiceClient
.createMigrationJobAsync(parent, migrationJob, migrationJobId)
.get();
}
Name | Description |
parent | LocationName Required. The parent, which owns this collection of migration jobs. |
migrationJob | MigrationJob Required. Represents a migration job object. |
migrationJobId | String Required. The ID of the instance to create. |
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
createMigrationJobAsync(String parent, MigrationJob migrationJob, String migrationJobId)
public final OperationFuture<MigrationJob,OperationMetadata> createMigrationJobAsync(String parent, MigrationJob migrationJob, String migrationJobId)
Creates a new migration job in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
MigrationJob migrationJob = MigrationJob.newBuilder().build();
String migrationJobId = "migrationJobId1870575242";
MigrationJob response =
dataMigrationServiceClient
.createMigrationJobAsync(parent, migrationJob, migrationJobId)
.get();
}
Name | Description |
parent | String Required. The parent, which owns this collection of migration jobs. |
migrationJob | MigrationJob Required. Represents a migration job object. |
migrationJobId | String Required. The ID of the instance to create. |
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
createMigrationJobCallable()
public final UnaryCallable<CreateMigrationJobRequest,Operation> createMigrationJobCallable()
Creates a new migration job in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateMigrationJobRequest request =
CreateMigrationJobRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setMigrationJobId("migrationJobId1870575242")
.setMigrationJob(MigrationJob.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.createMigrationJobCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateMigrationJobRequest,Operation> |
createMigrationJobOperationCallable()
public final OperationCallable<CreateMigrationJobRequest,MigrationJob,OperationMetadata> createMigrationJobOperationCallable()
Creates a new migration job in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateMigrationJobRequest request =
CreateMigrationJobRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setMigrationJobId("migrationJobId1870575242")
.setMigrationJob(MigrationJob.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<CreateMigrationJobRequest,MigrationJob,OperationMetadata> |
deleteConnectionProfileAsync(ConnectionProfileName name)
public final OperationFuture<Empty,OperationMetadata> deleteConnectionProfileAsync(ConnectionProfileName name)
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.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConnectionProfileName name =
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]");
dataMigrationServiceClient.deleteConnectionProfileAsync(name).get();
}
Name | Description |
name | ConnectionProfileName Required. Name of the connection profile resource to delete. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConnectionProfileAsync(DeleteConnectionProfileRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteConnectionProfileAsync(DeleteConnectionProfileRequest request)
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.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteConnectionProfileRequest request =
DeleteConnectionProfileRequest.newBuilder()
.setName(
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
.toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
dataMigrationServiceClient.deleteConnectionProfileAsync(request).get();
}
Name | Description |
request | DeleteConnectionProfileRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConnectionProfileAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteConnectionProfileAsync(String name)
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.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String name =
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]").toString();
dataMigrationServiceClient.deleteConnectionProfileAsync(name).get();
}
Name | Description |
name | String Required. Name of the connection profile resource to delete. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConnectionProfileCallable()
public final UnaryCallable<DeleteConnectionProfileRequest,Operation> deleteConnectionProfileCallable()
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.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteConnectionProfileRequest request =
DeleteConnectionProfileRequest.newBuilder()
.setName(
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
.toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.deleteConnectionProfileCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteConnectionProfileRequest,Operation> |
deleteConnectionProfileOperationCallable()
public final OperationCallable<DeleteConnectionProfileRequest,Empty,OperationMetadata> deleteConnectionProfileOperationCallable()
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.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteConnectionProfileRequest request =
DeleteConnectionProfileRequest.newBuilder()
.setName(
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
.toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
OperationFuture
Type | Description |
OperationCallable<DeleteConnectionProfileRequest,Empty,OperationMetadata> |
deleteMigrationJobAsync(DeleteMigrationJobRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteMigrationJobAsync(DeleteMigrationJobRequest request)
Deletes a single migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteMigrationJobRequest request =
DeleteMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
dataMigrationServiceClient.deleteMigrationJobAsync(request).get();
}
Name | Description |
request | DeleteMigrationJobRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteMigrationJobAsync(MigrationJobName name)
public final OperationFuture<Empty,OperationMetadata> deleteMigrationJobAsync(MigrationJobName name)
Deletes a single migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
MigrationJobName name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]");
dataMigrationServiceClient.deleteMigrationJobAsync(name).get();
}
Name | Description |
name | MigrationJobName Required. Name of the migration job resource to delete. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteMigrationJobAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteMigrationJobAsync(String name)
Deletes a single migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString();
dataMigrationServiceClient.deleteMigrationJobAsync(name).get();
}
Name | Description |
name | String Required. Name of the migration job resource to delete. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteMigrationJobCallable()
public final UnaryCallable<DeleteMigrationJobRequest,Operation> deleteMigrationJobCallable()
Deletes a single migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteMigrationJobRequest request =
DeleteMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.deleteMigrationJobCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteMigrationJobRequest,Operation> |
deleteMigrationJobOperationCallable()
public final OperationCallable<DeleteMigrationJobRequest,Empty,OperationMetadata> deleteMigrationJobOperationCallable()
Deletes a single migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteMigrationJobRequest request =
DeleteMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
OperationFuture
Type | Description |
OperationCallable<DeleteMigrationJobRequest,Empty,OperationMetadata> |
generateSshScript(GenerateSshScriptRequest request)
public final SshScript generateSshScript(GenerateSshScriptRequest request)
Generate a SSH configuration script to configure the reverse SSH connectivity.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
GenerateSshScriptRequest request =
GenerateSshScriptRequest.newBuilder()
.setMigrationJob(
MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.setVm("vm3767")
.setVmPort(563010825)
.build();
SshScript response = dataMigrationServiceClient.generateSshScript(request);
}
Name | Description |
request | GenerateSshScriptRequest The request object containing all of the parameters for the API call. |
Type | Description |
SshScript |
generateSshScriptCallable()
public final UnaryCallable<GenerateSshScriptRequest,SshScript> generateSshScriptCallable()
Generate a SSH configuration script to configure the reverse SSH connectivity.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
GenerateSshScriptRequest request =
GenerateSshScriptRequest.newBuilder()
.setMigrationJob(
MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.setVm("vm3767")
.setVmPort(563010825)
.build();
ApiFuture
Type | Description |
UnaryCallable<GenerateSshScriptRequest,SshScript> |
getConnectionProfile(ConnectionProfileName name)
public final ConnectionProfile getConnectionProfile(ConnectionProfileName name)
Gets details of a single connection profile.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConnectionProfileName name =
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]");
ConnectionProfile response = dataMigrationServiceClient.getConnectionProfile(name);
}
Name | Description |
name | ConnectionProfileName Required. Name of the connection profile resource to get. |
Type | Description |
ConnectionProfile |
getConnectionProfile(GetConnectionProfileRequest request)
public final ConnectionProfile getConnectionProfile(GetConnectionProfileRequest request)
Gets details of a single connection profile.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
GetConnectionProfileRequest request =
GetConnectionProfileRequest.newBuilder()
.setName(
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
.toString())
.build();
ConnectionProfile response = dataMigrationServiceClient.getConnectionProfile(request);
}
Name | Description |
request | GetConnectionProfileRequest The request object containing all of the parameters for the API call. |
Type | Description |
ConnectionProfile |
getConnectionProfile(String name)
public final ConnectionProfile getConnectionProfile(String name)
Gets details of a single connection profile.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String name =
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]").toString();
ConnectionProfile response = dataMigrationServiceClient.getConnectionProfile(name);
}
Name | Description |
name | String Required. Name of the connection profile resource to get. |
Type | Description |
ConnectionProfile |
getConnectionProfileCallable()
public final UnaryCallable<GetConnectionProfileRequest,ConnectionProfile> getConnectionProfileCallable()
Gets details of a single connection profile.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
GetConnectionProfileRequest request =
GetConnectionProfileRequest.newBuilder()
.setName(
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
.toString())
.build();
ApiFuture
Type | Description |
UnaryCallable<GetConnectionProfileRequest,ConnectionProfile> |
getMigrationJob(GetMigrationJobRequest request)
public final MigrationJob getMigrationJob(GetMigrationJobRequest request)
Gets details of a single migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
GetMigrationJobRequest request =
GetMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
MigrationJob response = dataMigrationServiceClient.getMigrationJob(request);
}
Name | Description |
request | GetMigrationJobRequest The request object containing all of the parameters for the API call. |
Type | Description |
MigrationJob |
getMigrationJob(MigrationJobName name)
public final MigrationJob getMigrationJob(MigrationJobName name)
Gets details of a single migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
MigrationJobName name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]");
MigrationJob response = dataMigrationServiceClient.getMigrationJob(name);
}
Name | Description |
name | MigrationJobName Required. Name of the migration job resource to get. |
Type | Description |
MigrationJob |
getMigrationJob(String name)
public final MigrationJob getMigrationJob(String name)
Gets details of a single migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString();
MigrationJob response = dataMigrationServiceClient.getMigrationJob(name);
}
Name | Description |
name | String Required. Name of the migration job resource to get. |
Type | Description |
MigrationJob |
getMigrationJobCallable()
public final UnaryCallable<GetMigrationJobRequest,MigrationJob> getMigrationJobCallable()
Gets details of a single migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
GetMigrationJobRequest request =
GetMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
ApiFuture
Type | Description |
UnaryCallable<GetMigrationJobRequest,MigrationJob> |
getOperationsClient()
public final OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Type | Description |
OperationsClient |
getSettings()
public final DataMigrationServiceSettings getSettings()
Type | Description |
DataMigrationServiceSettings |
getStub()
public DataMigrationServiceStub getStub()
Type | Description |
DataMigrationServiceStub |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
listConnectionProfiles(ListConnectionProfilesRequest request)
public final DataMigrationServiceClient.ListConnectionProfilesPagedResponse listConnectionProfiles(ListConnectionProfilesRequest request)
Retrieve a list of all connection profiles in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ListConnectionProfilesRequest request =
ListConnectionProfilesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (ConnectionProfile element :
dataMigrationServiceClient.listConnectionProfiles(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListConnectionProfilesRequest The request object containing all of the parameters for the API call. |
Type | Description |
DataMigrationServiceClient.ListConnectionProfilesPagedResponse |
listConnectionProfiles(LocationName parent)
public final DataMigrationServiceClient.ListConnectionProfilesPagedResponse listConnectionProfiles(LocationName parent)
Retrieve a list of all connection profiles in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (ConnectionProfile element :
dataMigrationServiceClient.listConnectionProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | LocationName Required. The parent, which owns this collection of connection profiles. |
Type | Description |
DataMigrationServiceClient.ListConnectionProfilesPagedResponse |
listConnectionProfiles(String parent)
public final DataMigrationServiceClient.ListConnectionProfilesPagedResponse listConnectionProfiles(String parent)
Retrieve a list of all connection profiles in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (ConnectionProfile element :
dataMigrationServiceClient.listConnectionProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The parent, which owns this collection of connection profiles. |
Type | Description |
DataMigrationServiceClient.ListConnectionProfilesPagedResponse |
listConnectionProfilesCallable()
public final UnaryCallable<ListConnectionProfilesRequest,ListConnectionProfilesResponse> listConnectionProfilesCallable()
Retrieve a list of all connection profiles in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ListConnectionProfilesRequest request =
ListConnectionProfilesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListConnectionProfilesResponse response =
dataMigrationServiceClient.listConnectionProfilesCallable().call(request);
for (ConnectionProfile element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListConnectionProfilesRequest,ListConnectionProfilesResponse> |
listConnectionProfilesPagedCallable()
public final UnaryCallable<ListConnectionProfilesRequest,DataMigrationServiceClient.ListConnectionProfilesPagedResponse> listConnectionProfilesPagedCallable()
Retrieve a list of all connection profiles in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ListConnectionProfilesRequest request =
ListConnectionProfilesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture
Type | Description |
UnaryCallable<ListConnectionProfilesRequest,ListConnectionProfilesPagedResponse> |
listMigrationJobs(ListMigrationJobsRequest request)
public final DataMigrationServiceClient.ListMigrationJobsPagedResponse listMigrationJobs(ListMigrationJobsRequest request)
Lists migration jobs in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ListMigrationJobsRequest request =
ListMigrationJobsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (MigrationJob element :
dataMigrationServiceClient.listMigrationJobs(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListMigrationJobsRequest The request object containing all of the parameters for the API call. |
Type | Description |
DataMigrationServiceClient.ListMigrationJobsPagedResponse |
listMigrationJobs(LocationName parent)
public final DataMigrationServiceClient.ListMigrationJobsPagedResponse listMigrationJobs(LocationName parent)
Lists migration jobs in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (MigrationJob element :
dataMigrationServiceClient.listMigrationJobs(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | LocationName Required. The parent, which owns this collection of migrationJobs. |
Type | Description |
DataMigrationServiceClient.ListMigrationJobsPagedResponse |
listMigrationJobs(String parent)
public final DataMigrationServiceClient.ListMigrationJobsPagedResponse listMigrationJobs(String parent)
Lists migration jobs in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (MigrationJob element :
dataMigrationServiceClient.listMigrationJobs(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The parent, which owns this collection of migrationJobs. |
Type | Description |
DataMigrationServiceClient.ListMigrationJobsPagedResponse |
listMigrationJobsCallable()
public final UnaryCallable<ListMigrationJobsRequest,ListMigrationJobsResponse> listMigrationJobsCallable()
Lists migration jobs in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ListMigrationJobsRequest request =
ListMigrationJobsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListMigrationJobsResponse response =
dataMigrationServiceClient.listMigrationJobsCallable().call(request);
for (MigrationJob element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListMigrationJobsRequest,ListMigrationJobsResponse> |
listMigrationJobsPagedCallable()
public final UnaryCallable<ListMigrationJobsRequest,DataMigrationServiceClient.ListMigrationJobsPagedResponse> listMigrationJobsPagedCallable()
Lists migration jobs in a given project and location.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ListMigrationJobsRequest request =
ListMigrationJobsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture
Type | Description |
UnaryCallable<ListMigrationJobsRequest,ListMigrationJobsPagedResponse> |
promoteMigrationJobAsync(PromoteMigrationJobRequest request)
public final OperationFuture<MigrationJob,OperationMetadata> promoteMigrationJobAsync(PromoteMigrationJobRequest request)
Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
PromoteMigrationJobRequest request =
PromoteMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
MigrationJob response = dataMigrationServiceClient.promoteMigrationJobAsync(request).get();
}
Name | Description |
request | PromoteMigrationJobRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
promoteMigrationJobCallable()
public final UnaryCallable<PromoteMigrationJobRequest,Operation> promoteMigrationJobCallable()
Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
PromoteMigrationJobRequest request =
PromoteMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.promoteMigrationJobCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<PromoteMigrationJobRequest,Operation> |
promoteMigrationJobOperationCallable()
public final OperationCallable<PromoteMigrationJobRequest,MigrationJob,OperationMetadata> promoteMigrationJobOperationCallable()
Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
PromoteMigrationJobRequest request =
PromoteMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
OperationFuture
Type | Description |
OperationCallable<PromoteMigrationJobRequest,MigrationJob,OperationMetadata> |
restartMigrationJobAsync(RestartMigrationJobRequest request)
public final OperationFuture<MigrationJob,OperationMetadata> restartMigrationJobAsync(RestartMigrationJobRequest request)
Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
RestartMigrationJobRequest request =
RestartMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
MigrationJob response = dataMigrationServiceClient.restartMigrationJobAsync(request).get();
}
Name | Description |
request | RestartMigrationJobRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
restartMigrationJobCallable()
public final UnaryCallable<RestartMigrationJobRequest,Operation> restartMigrationJobCallable()
Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
RestartMigrationJobRequest request =
RestartMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.restartMigrationJobCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<RestartMigrationJobRequest,Operation> |
restartMigrationJobOperationCallable()
public final OperationCallable<RestartMigrationJobRequest,MigrationJob,OperationMetadata> restartMigrationJobOperationCallable()
Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
RestartMigrationJobRequest request =
RestartMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
OperationFuture
Type | Description |
OperationCallable<RestartMigrationJobRequest,MigrationJob,OperationMetadata> |
resumeMigrationJobAsync(ResumeMigrationJobRequest request)
public final OperationFuture<MigrationJob,OperationMetadata> resumeMigrationJobAsync(ResumeMigrationJobRequest request)
Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ResumeMigrationJobRequest request =
ResumeMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
MigrationJob response = dataMigrationServiceClient.resumeMigrationJobAsync(request).get();
}
Name | Description |
request | ResumeMigrationJobRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
resumeMigrationJobCallable()
public final UnaryCallable<ResumeMigrationJobRequest,Operation> resumeMigrationJobCallable()
Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ResumeMigrationJobRequest request =
ResumeMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.resumeMigrationJobCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<ResumeMigrationJobRequest,Operation> |
resumeMigrationJobOperationCallable()
public final OperationCallable<ResumeMigrationJobRequest,MigrationJob,OperationMetadata> resumeMigrationJobOperationCallable()
Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ResumeMigrationJobRequest request =
ResumeMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
OperationFuture
Type | Description |
OperationCallable<ResumeMigrationJobRequest,MigrationJob,OperationMetadata> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
startMigrationJobAsync(StartMigrationJobRequest request)
public final OperationFuture<MigrationJob,OperationMetadata> startMigrationJobAsync(StartMigrationJobRequest request)
Start an already created migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
StartMigrationJobRequest request =
StartMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
MigrationJob response = dataMigrationServiceClient.startMigrationJobAsync(request).get();
}
Name | Description |
request | StartMigrationJobRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
startMigrationJobCallable()
public final UnaryCallable<StartMigrationJobRequest,Operation> startMigrationJobCallable()
Start an already created migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
StartMigrationJobRequest request =
StartMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.startMigrationJobCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<StartMigrationJobRequest,Operation> |
startMigrationJobOperationCallable()
public final OperationCallable<StartMigrationJobRequest,MigrationJob,OperationMetadata> startMigrationJobOperationCallable()
Start an already created migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
StartMigrationJobRequest request =
StartMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
OperationFuture
Type | Description |
OperationCallable<StartMigrationJobRequest,MigrationJob,OperationMetadata> |
stopMigrationJobAsync(StopMigrationJobRequest request)
public final OperationFuture<MigrationJob,OperationMetadata> stopMigrationJobAsync(StopMigrationJobRequest request)
Stops a running migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
StopMigrationJobRequest request =
StopMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
MigrationJob response = dataMigrationServiceClient.stopMigrationJobAsync(request).get();
}
Name | Description |
request | StopMigrationJobRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
stopMigrationJobCallable()
public final UnaryCallable<StopMigrationJobRequest,Operation> stopMigrationJobCallable()
Stops a running migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
StopMigrationJobRequest request =
StopMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.stopMigrationJobCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<StopMigrationJobRequest,Operation> |
stopMigrationJobOperationCallable()
public final OperationCallable<StopMigrationJobRequest,MigrationJob,OperationMetadata> stopMigrationJobOperationCallable()
Stops a running migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
StopMigrationJobRequest request =
StopMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
OperationFuture
Type | Description |
OperationCallable<StopMigrationJobRequest,MigrationJob,OperationMetadata> |
updateConnectionProfileAsync(ConnectionProfile connectionProfile, FieldMask updateMask)
public final OperationFuture<ConnectionProfile,OperationMetadata> updateConnectionProfileAsync(ConnectionProfile connectionProfile, FieldMask updateMask)
Update the configuration of a single connection profile.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
ConnectionProfile response =
dataMigrationServiceClient
.updateConnectionProfileAsync(connectionProfile, updateMask)
.get();
}
Name | Description |
connectionProfile | ConnectionProfile Required. The connection profile parameters to update. |
updateMask | FieldMask Required. Field mask is used to specify the fields to be overwritten in the connection profile resource by the update. |
Type | Description |
OperationFuture<ConnectionProfile,OperationMetadata> |
updateConnectionProfileAsync(UpdateConnectionProfileRequest request)
public final OperationFuture<ConnectionProfile,OperationMetadata> updateConnectionProfileAsync(UpdateConnectionProfileRequest request)
Update the configuration of a single connection profile.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
UpdateConnectionProfileRequest request =
UpdateConnectionProfileRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setConnectionProfile(ConnectionProfile.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ConnectionProfile response =
dataMigrationServiceClient.updateConnectionProfileAsync(request).get();
}
Name | Description |
request | UpdateConnectionProfileRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<ConnectionProfile,OperationMetadata> |
updateConnectionProfileCallable()
public final UnaryCallable<UpdateConnectionProfileRequest,Operation> updateConnectionProfileCallable()
Update the configuration of a single connection profile.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
UpdateConnectionProfileRequest request =
UpdateConnectionProfileRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setConnectionProfile(ConnectionProfile.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.updateConnectionProfileCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdateConnectionProfileRequest,Operation> |
updateConnectionProfileOperationCallable()
public final OperationCallable<UpdateConnectionProfileRequest,ConnectionProfile,OperationMetadata> updateConnectionProfileOperationCallable()
Update the configuration of a single connection profile.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
UpdateConnectionProfileRequest request =
UpdateConnectionProfileRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setConnectionProfile(ConnectionProfile.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<UpdateConnectionProfileRequest,ConnectionProfile,OperationMetadata> |
updateMigrationJobAsync(MigrationJob migrationJob, FieldMask updateMask)
public final OperationFuture<MigrationJob,OperationMetadata> updateMigrationJobAsync(MigrationJob migrationJob, FieldMask updateMask)
Updates the parameters of a single migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
MigrationJob migrationJob = MigrationJob.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
MigrationJob response =
dataMigrationServiceClient.updateMigrationJobAsync(migrationJob, updateMask).get();
}
Name | Description |
migrationJob | MigrationJob Required. The migration job parameters to update. |
updateMask | FieldMask Required. Field mask is used to specify the fields to be overwritten in the migration job resource by the update. |
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
updateMigrationJobAsync(UpdateMigrationJobRequest request)
public final OperationFuture<MigrationJob,OperationMetadata> updateMigrationJobAsync(UpdateMigrationJobRequest request)
Updates the parameters of a single migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
UpdateMigrationJobRequest request =
UpdateMigrationJobRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setMigrationJob(MigrationJob.newBuilder().build())
.setRequestId("requestId693933066")
.build();
MigrationJob response = dataMigrationServiceClient.updateMigrationJobAsync(request).get();
}
Name | Description |
request | UpdateMigrationJobRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
updateMigrationJobCallable()
public final UnaryCallable<UpdateMigrationJobRequest,Operation> updateMigrationJobCallable()
Updates the parameters of a single migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
UpdateMigrationJobRequest request =
UpdateMigrationJobRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setMigrationJob(MigrationJob.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.updateMigrationJobCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdateMigrationJobRequest,Operation> |
updateMigrationJobOperationCallable()
public final OperationCallable<UpdateMigrationJobRequest,MigrationJob,OperationMetadata> updateMigrationJobOperationCallable()
Updates the parameters of a single migration job.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
UpdateMigrationJobRequest request =
UpdateMigrationJobRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setMigrationJob(MigrationJob.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<UpdateMigrationJobRequest,MigrationJob,OperationMetadata> |
verifyMigrationJobAsync(VerifyMigrationJobRequest request)
public final OperationFuture<MigrationJob,OperationMetadata> verifyMigrationJobAsync(VerifyMigrationJobRequest request)
Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
VerifyMigrationJobRequest request =
VerifyMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
MigrationJob response = dataMigrationServiceClient.verifyMigrationJobAsync(request).get();
}
Name | Description |
request | VerifyMigrationJobRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
verifyMigrationJobCallable()
public final UnaryCallable<VerifyMigrationJobRequest,Operation> verifyMigrationJobCallable()
Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
VerifyMigrationJobRequest request =
VerifyMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.verifyMigrationJobCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<VerifyMigrationJobRequest,Operation> |
verifyMigrationJobOperationCallable()
public final OperationCallable<VerifyMigrationJobRequest,MigrationJob,OperationMetadata> verifyMigrationJobOperationCallable()
Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.
Sample code:
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
VerifyMigrationJobRequest request =
VerifyMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.build();
OperationFuture
Type | Description |
OperationCallable<VerifyMigrationJobRequest,MigrationJob,OperationMetadata> |