- 2.50.0 (latest)
- 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
GitHub Repository | Product Reference | REST Documentation |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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().
Method | Description | Method Variants |
---|---|---|
ListMigrationJobs |
Lists migration jobs in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetMigrationJob |
Gets details of a single migration job. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateMigrationJob |
Creates a new migration job in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateMigrationJob |
Updates the parameters of a single migration job. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMigrationJob |
Deletes a single migration job. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
StartMigrationJob |
Start an already created migration job. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
StopMigrationJob |
Stops a running migration job. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ResumeMigrationJob |
Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase). |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
PromoteMigrationJob |
Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
VerifyMigrationJob |
Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RestartMigrationJob |
Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GenerateSshScript |
Generate a SSH configuration script to configure the reverse SSH connectivity. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GenerateTcpProxyScript |
Generate a TCP Proxy configuration script to configure a cloud-hosted VM running a TCP Proxy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListConnectionProfiles |
Retrieves a list of all connection profiles in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetConnectionProfile |
Gets details of a single connection profile. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateConnectionProfile |
Creates a new connection profile in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateConnectionProfile |
Update the configuration of a single connection profile. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreatePrivateConnection |
Creates a new private connection in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetPrivateConnection |
Gets details of a single private connection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListPrivateConnections |
Retrieves a list of private connections in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeletePrivateConnection |
Deletes a single Database Migration Service private connection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetConversionWorkspace |
Gets details of a single conversion workspace. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListConversionWorkspaces |
Lists conversion workspaces in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateConversionWorkspace |
Creates a new conversion workspace in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateConversionWorkspace |
Updates the parameters of a single conversion workspace. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteConversionWorkspace |
Deletes a single conversion workspace. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateMappingRule |
Creates a new mapping rule for a given conversion workspace. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMappingRule |
Deletes a single mapping rule. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListMappingRules |
Lists the mapping rules for a specific conversion workspace. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetMappingRule |
Gets the details of a mapping rule. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SeedConversionWorkspace |
Imports a snapshot of the source database into the conversion workspace. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ImportMappingRules |
Imports the mapping rules for a given conversion workspace. Supports various formats of external rules files. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ConvertConversionWorkspace |
Creates a draft tree schema for the destination database. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CommitConversionWorkspace |
Marks all the data in the conversion workspace as committed. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RollbackConversionWorkspace |
Rolls back a conversion workspace to the last committed snapshot. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ApplyConversionWorkspace |
Applies draft tree onto a specific destination database. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DescribeDatabaseEntities |
Describes the database entities tree for a specific conversion workspace and a specific tree type. Database entities are not resources like conversion workspaces or mapping rules, and they can't be created, updated or deleted. Instead, they are simple data objects describing the structure of the client database. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SearchBackgroundJobs |
Searches/lists the background jobs for a specific conversion workspace. The background jobs are not resources like conversion workspaces or mapping rules, and they can't be created, updated or deleted. Instead, they are a way to expose the data plane jobs log. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DescribeConversionWorkspaceRevisions |
Retrieves a list of committed revisions of a specific conversion workspace. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
FetchStaticIps |
Fetches a set of static IP addresses that need to be allowlisted by the customer when using the static-IP connectivity method. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return 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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
DataMigrationServiceSettings dataMigrationServiceSettings =
DataMigrationServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create(dataMigrationServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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.
Static Methods
create()
public static final DataMigrationServiceClient create()
Constructs an instance of DataMigrationServiceClient with default settings.
Returns | |
---|---|
Type | Description |
DataMigrationServiceClient |
Exceptions | |
---|---|
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.
Parameter | |
---|---|
Name | Description |
settings |
DataMigrationServiceSettings |
Returns | |
---|---|
Type | Description |
DataMigrationServiceClient |
Exceptions | |
---|---|
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).
Parameter | |
---|---|
Name | Description |
stub |
DataMigrationServiceStub |
Returns | |
---|---|
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.
Parameter | |
---|---|
Name | Description |
settings |
DataMigrationServiceSettings |
DataMigrationServiceClient(DataMigrationServiceStub stub)
protected DataMigrationServiceClient(DataMigrationServiceStub stub)
Parameter | |
---|---|
Name | Description |
stub |
DataMigrationServiceStub |
Methods
applyConversionWorkspaceAsync(ApplyConversionWorkspaceRequest request)
public final OperationFuture<ConversionWorkspace,OperationMetadata> applyConversionWorkspaceAsync(ApplyConversionWorkspaceRequest request)
Applies draft tree onto a specific destination database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ApplyConversionWorkspaceRequest request =
ApplyConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setFilter("filter-1274492040")
.setDryRun(true)
.setAutoCommit(true)
.build();
ConversionWorkspace response =
dataMigrationServiceClient.applyConversionWorkspaceAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
ApplyConversionWorkspaceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversionWorkspace,OperationMetadata> |
applyConversionWorkspaceCallable()
public final UnaryCallable<ApplyConversionWorkspaceRequest,Operation> applyConversionWorkspaceCallable()
Applies draft tree onto a specific destination database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ApplyConversionWorkspaceRequest request =
ApplyConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setFilter("filter-1274492040")
.setDryRun(true)
.setAutoCommit(true)
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.applyConversionWorkspaceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ApplyConversionWorkspaceRequest,Operation> |
applyConversionWorkspaceOperationCallable()
public final OperationCallable<ApplyConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> applyConversionWorkspaceOperationCallable()
Applies draft tree onto a specific destination database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ApplyConversionWorkspaceRequest request =
ApplyConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setFilter("filter-1274492040")
.setDryRun(true)
.setAutoCommit(true)
.build();
OperationFuture<ConversionWorkspace, OperationMetadata> future =
dataMigrationServiceClient
.applyConversionWorkspaceOperationCallable()
.futureCall(request);
// Do something.
ConversionWorkspace response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<ApplyConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> |
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Parameters | |
---|---|
Name | Description |
duration |
long |
unit |
TimeUnit |
Returns | |
---|---|
Type | Description |
boolean |
Exceptions | |
---|---|
Type | Description |
InterruptedException |
close()
public final void close()
commitConversionWorkspaceAsync(CommitConversionWorkspaceRequest request)
public final OperationFuture<ConversionWorkspace,OperationMetadata> commitConversionWorkspaceAsync(CommitConversionWorkspaceRequest request)
Marks all the data in the conversion workspace as committed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CommitConversionWorkspaceRequest request =
CommitConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setCommitName("commitName1018078306")
.build();
ConversionWorkspace response =
dataMigrationServiceClient.commitConversionWorkspaceAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CommitConversionWorkspaceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversionWorkspace,OperationMetadata> |
commitConversionWorkspaceCallable()
public final UnaryCallable<CommitConversionWorkspaceRequest,Operation> commitConversionWorkspaceCallable()
Marks all the data in the conversion workspace as committed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CommitConversionWorkspaceRequest request =
CommitConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setCommitName("commitName1018078306")
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.commitConversionWorkspaceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CommitConversionWorkspaceRequest,Operation> |
commitConversionWorkspaceOperationCallable()
public final OperationCallable<CommitConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> commitConversionWorkspaceOperationCallable()
Marks all the data in the conversion workspace as committed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CommitConversionWorkspaceRequest request =
CommitConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setCommitName("commitName1018078306")
.build();
OperationFuture<ConversionWorkspace, OperationMetadata> future =
dataMigrationServiceClient
.commitConversionWorkspaceOperationCallable()
.futureCall(request);
// Do something.
ConversionWorkspace response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CommitConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> |
convertConversionWorkspaceAsync(ConvertConversionWorkspaceRequest request)
public final OperationFuture<ConversionWorkspace,OperationMetadata> convertConversionWorkspaceAsync(ConvertConversionWorkspaceRequest request)
Creates a draft tree schema for the destination database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConvertConversionWorkspaceRequest request =
ConvertConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setAutoCommit(true)
.setFilter("filter-1274492040")
.setConvertFullPath(true)
.build();
ConversionWorkspace response =
dataMigrationServiceClient.convertConversionWorkspaceAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
ConvertConversionWorkspaceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversionWorkspace,OperationMetadata> |
convertConversionWorkspaceCallable()
public final UnaryCallable<ConvertConversionWorkspaceRequest,Operation> convertConversionWorkspaceCallable()
Creates a draft tree schema for the destination database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConvertConversionWorkspaceRequest request =
ConvertConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setAutoCommit(true)
.setFilter("filter-1274492040")
.setConvertFullPath(true)
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.convertConversionWorkspaceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ConvertConversionWorkspaceRequest,Operation> |
convertConversionWorkspaceOperationCallable()
public final OperationCallable<ConvertConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> convertConversionWorkspaceOperationCallable()
Creates a draft tree schema for the destination database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConvertConversionWorkspaceRequest request =
ConvertConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setAutoCommit(true)
.setFilter("filter-1274492040")
.setConvertFullPath(true)
.build();
OperationFuture<ConversionWorkspace, OperationMetadata> future =
dataMigrationServiceClient
.convertConversionWorkspaceOperationCallable()
.futureCall(request);
// Do something.
ConversionWorkspace response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<ConvertConversionWorkspaceRequest,ConversionWorkspace,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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConnectionProfileRequest request =
CreateConnectionProfileRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConnectionProfileId("connectionProfileId597575526")
.setConnectionProfile(ConnectionProfile.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.setSkipValidation(true)
.build();
ConnectionProfile response =
dataMigrationServiceClient.createConnectionProfileAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateConnectionProfileRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConnectionProfile,OperationMetadata> |
createConnectionProfileAsync(LocationName parent, ConnectionProfile connectionProfile, String connectionProfileId)
public final OperationFuture<ConnectionProfile,OperationMetadata> createConnectionProfileAsync(LocationName parent, ConnectionProfile connectionProfile, String connectionProfileId)
Creates a new connection profile in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
String connectionProfileId = "connectionProfileId597575526";
ConnectionProfile response =
dataMigrationServiceClient
.createConnectionProfileAsync(parent, connectionProfile, connectionProfileId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName 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. |
Returns | |
---|---|
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
String connectionProfileId = "connectionProfileId597575526";
ConnectionProfile response =
dataMigrationServiceClient
.createConnectionProfileAsync(parent, connectionProfile, connectionProfileId)
.get();
}
Parameters | |
---|---|
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. |
Returns | |
---|---|
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConnectionProfileRequest request =
CreateConnectionProfileRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConnectionProfileId("connectionProfileId597575526")
.setConnectionProfile(ConnectionProfile.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.setSkipValidation(true)
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.createConnectionProfileCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConnectionProfileRequest request =
CreateConnectionProfileRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConnectionProfileId("connectionProfileId597575526")
.setConnectionProfile(ConnectionProfile.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.setSkipValidation(true)
.build();
OperationFuture<ConnectionProfile, OperationMetadata> future =
dataMigrationServiceClient.createConnectionProfileOperationCallable().futureCall(request);
// Do something.
ConnectionProfile response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateConnectionProfileRequest,ConnectionProfile,OperationMetadata> |
createConversionWorkspaceAsync(CreateConversionWorkspaceRequest request)
public final OperationFuture<ConversionWorkspace,OperationMetadata> createConversionWorkspaceAsync(CreateConversionWorkspaceRequest request)
Creates a new conversion workspace in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConversionWorkspaceRequest request =
CreateConversionWorkspaceRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConversionWorkspaceId("conversionWorkspaceId-928604774")
.setConversionWorkspace(ConversionWorkspace.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ConversionWorkspace response =
dataMigrationServiceClient.createConversionWorkspaceAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateConversionWorkspaceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversionWorkspace,OperationMetadata> |
createConversionWorkspaceAsync(LocationName parent, ConversionWorkspace conversionWorkspace, String conversionWorkspaceId)
public final OperationFuture<ConversionWorkspace,OperationMetadata> createConversionWorkspaceAsync(LocationName parent, ConversionWorkspace conversionWorkspace, String conversionWorkspaceId)
Creates a new conversion workspace in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
ConversionWorkspace conversionWorkspace = ConversionWorkspace.newBuilder().build();
String conversionWorkspaceId = "conversionWorkspaceId-928604774";
ConversionWorkspace response =
dataMigrationServiceClient
.createConversionWorkspaceAsync(parent, conversionWorkspace, conversionWorkspaceId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent which owns this collection of conversion workspaces. |
conversionWorkspace |
ConversionWorkspace Required. Represents a conversion workspace object. |
conversionWorkspaceId |
String Required. The ID of the conversion workspace to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversionWorkspace,OperationMetadata> |
createConversionWorkspaceAsync(String parent, ConversionWorkspace conversionWorkspace, String conversionWorkspaceId)
public final OperationFuture<ConversionWorkspace,OperationMetadata> createConversionWorkspaceAsync(String parent, ConversionWorkspace conversionWorkspace, String conversionWorkspaceId)
Creates a new conversion workspace in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
ConversionWorkspace conversionWorkspace = ConversionWorkspace.newBuilder().build();
String conversionWorkspaceId = "conversionWorkspaceId-928604774";
ConversionWorkspace response =
dataMigrationServiceClient
.createConversionWorkspaceAsync(parent, conversionWorkspace, conversionWorkspaceId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The parent which owns this collection of conversion workspaces. |
conversionWorkspace |
ConversionWorkspace Required. Represents a conversion workspace object. |
conversionWorkspaceId |
String Required. The ID of the conversion workspace to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversionWorkspace,OperationMetadata> |
createConversionWorkspaceCallable()
public final UnaryCallable<CreateConversionWorkspaceRequest,Operation> createConversionWorkspaceCallable()
Creates a new conversion workspace in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConversionWorkspaceRequest request =
CreateConversionWorkspaceRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConversionWorkspaceId("conversionWorkspaceId-928604774")
.setConversionWorkspace(ConversionWorkspace.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.createConversionWorkspaceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateConversionWorkspaceRequest,Operation> |
createConversionWorkspaceOperationCallable()
public final OperationCallable<CreateConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> createConversionWorkspaceOperationCallable()
Creates a new conversion workspace in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConversionWorkspaceRequest request =
CreateConversionWorkspaceRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConversionWorkspaceId("conversionWorkspaceId-928604774")
.setConversionWorkspace(ConversionWorkspace.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<ConversionWorkspace, OperationMetadata> future =
dataMigrationServiceClient
.createConversionWorkspaceOperationCallable()
.futureCall(request);
// Do something.
ConversionWorkspace response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> |
createMappingRule(ConversionWorkspaceName parent, MappingRule mappingRule, String mappingRuleId)
public final MappingRule createMappingRule(ConversionWorkspaceName parent, MappingRule mappingRule, String mappingRuleId)
Creates a new mapping rule for a given conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConversionWorkspaceName parent =
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]");
MappingRule mappingRule = MappingRule.newBuilder().build();
String mappingRuleId = "mappingRuleId-900824155";
MappingRule response =
dataMigrationServiceClient.createMappingRule(parent, mappingRule, mappingRuleId);
}
Parameters | |
---|---|
Name | Description |
parent |
ConversionWorkspaceName Required. The parent which owns this collection of mapping rules. |
mappingRule |
MappingRule Required. Represents a mapping rule object. |
mappingRuleId |
String Required. The ID of the rule to create. |
Returns | |
---|---|
Type | Description |
MappingRule |
createMappingRule(CreateMappingRuleRequest request)
public final MappingRule createMappingRule(CreateMappingRuleRequest request)
Creates a new mapping rule for a given conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateMappingRuleRequest request =
CreateMappingRuleRequest.newBuilder()
.setParent(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setMappingRuleId("mappingRuleId-900824155")
.setMappingRule(MappingRule.newBuilder().build())
.setRequestId("requestId693933066")
.build();
MappingRule response = dataMigrationServiceClient.createMappingRule(request);
}
Parameter | |
---|---|
Name | Description |
request |
CreateMappingRuleRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
MappingRule |
createMappingRule(String parent, MappingRule mappingRule, String mappingRuleId)
public final MappingRule createMappingRule(String parent, MappingRule mappingRule, String mappingRuleId)
Creates a new mapping rule for a given conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String parent =
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString();
MappingRule mappingRule = MappingRule.newBuilder().build();
String mappingRuleId = "mappingRuleId-900824155";
MappingRule response =
dataMigrationServiceClient.createMappingRule(parent, mappingRule, mappingRuleId);
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The parent which owns this collection of mapping rules. |
mappingRule |
MappingRule Required. Represents a mapping rule object. |
mappingRuleId |
String Required. The ID of the rule to create. |
Returns | |
---|---|
Type | Description |
MappingRule |
createMappingRuleCallable()
public final UnaryCallable<CreateMappingRuleRequest,MappingRule> createMappingRuleCallable()
Creates a new mapping rule for a given conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateMappingRuleRequest request =
CreateMappingRuleRequest.newBuilder()
.setParent(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setMappingRuleId("mappingRuleId-900824155")
.setMappingRule(MappingRule.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<MappingRule> future =
dataMigrationServiceClient.createMappingRuleCallable().futureCall(request);
// Do something.
MappingRule response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateMappingRuleRequest,MappingRule> |
createMigrationJobAsync(CreateMigrationJobRequest request)
public final OperationFuture<MigrationJob,OperationMetadata> createMigrationJobAsync(CreateMigrationJobRequest request)
Creates a new migration job in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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();
}
Parameter | |
---|---|
Name | Description |
request |
CreateMigrationJobRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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();
}
Parameters | |
---|---|
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. |
Returns | |
---|---|
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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();
}
Parameters | |
---|---|
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. |
Returns | |
---|---|
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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();
}
Returns | |
---|---|
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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<MigrationJob, OperationMetadata> future =
dataMigrationServiceClient.createMigrationJobOperationCallable().futureCall(request);
// Do something.
MigrationJob response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateMigrationJobRequest,MigrationJob,OperationMetadata> |
createPrivateConnectionAsync(CreatePrivateConnectionRequest request)
public final OperationFuture<PrivateConnection,OperationMetadata> createPrivateConnectionAsync(CreatePrivateConnectionRequest request)
Creates a new private connection in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreatePrivateConnectionRequest request =
CreatePrivateConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPrivateConnectionId("privateConnectionId-1926654532")
.setPrivateConnection(PrivateConnection.newBuilder().build())
.setRequestId("requestId693933066")
.setSkipValidation(true)
.build();
PrivateConnection response =
dataMigrationServiceClient.createPrivateConnectionAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreatePrivateConnectionRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateConnection,OperationMetadata> |
createPrivateConnectionAsync(LocationName parent, PrivateConnection privateConnection, String privateConnectionId)
public final OperationFuture<PrivateConnection,OperationMetadata> createPrivateConnectionAsync(LocationName parent, PrivateConnection privateConnection, String privateConnectionId)
Creates a new private connection in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
PrivateConnection privateConnection = PrivateConnection.newBuilder().build();
String privateConnectionId = "privateConnectionId-1926654532";
PrivateConnection response =
dataMigrationServiceClient
.createPrivateConnectionAsync(parent, privateConnection, privateConnectionId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent that owns the collection of PrivateConnections. |
privateConnection |
PrivateConnection Required. The private connection resource to create. |
privateConnectionId |
String Required. The private connection identifier. |
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateConnection,OperationMetadata> |
createPrivateConnectionAsync(String parent, PrivateConnection privateConnection, String privateConnectionId)
public final OperationFuture<PrivateConnection,OperationMetadata> createPrivateConnectionAsync(String parent, PrivateConnection privateConnection, String privateConnectionId)
Creates a new private connection in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
PrivateConnection privateConnection = PrivateConnection.newBuilder().build();
String privateConnectionId = "privateConnectionId-1926654532";
PrivateConnection response =
dataMigrationServiceClient
.createPrivateConnectionAsync(parent, privateConnection, privateConnectionId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The parent that owns the collection of PrivateConnections. |
privateConnection |
PrivateConnection Required. The private connection resource to create. |
privateConnectionId |
String Required. The private connection identifier. |
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateConnection,OperationMetadata> |
createPrivateConnectionCallable()
public final UnaryCallable<CreatePrivateConnectionRequest,Operation> createPrivateConnectionCallable()
Creates a new private connection in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreatePrivateConnectionRequest request =
CreatePrivateConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPrivateConnectionId("privateConnectionId-1926654532")
.setPrivateConnection(PrivateConnection.newBuilder().build())
.setRequestId("requestId693933066")
.setSkipValidation(true)
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.createPrivateConnectionCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreatePrivateConnectionRequest,Operation> |
createPrivateConnectionOperationCallable()
public final OperationCallable<CreatePrivateConnectionRequest,PrivateConnection,OperationMetadata> createPrivateConnectionOperationCallable()
Creates a new private connection in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreatePrivateConnectionRequest request =
CreatePrivateConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPrivateConnectionId("privateConnectionId-1926654532")
.setPrivateConnection(PrivateConnection.newBuilder().build())
.setRequestId("requestId693933066")
.setSkipValidation(true)
.build();
OperationFuture<PrivateConnection, OperationMetadata> future =
dataMigrationServiceClient.createPrivateConnectionOperationCallable().futureCall(request);
// Do something.
PrivateConnection response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreatePrivateConnectionRequest,PrivateConnection,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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConnectionProfileName name =
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]");
dataMigrationServiceClient.deleteConnectionProfileAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
ConnectionProfileName Required. Name of the connection profile resource to delete. |
Returns | |
---|---|
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteConnectionProfileRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String name =
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]").toString();
dataMigrationServiceClient.deleteConnectionProfileAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the connection profile resource to delete. |
Returns | |
---|---|
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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();
}
Returns | |
---|---|
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteConnectionProfileRequest request =
DeleteConnectionProfileRequest.newBuilder()
.setName(
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
.toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
OperationFuture<Empty, OperationMetadata> future =
dataMigrationServiceClient.deleteConnectionProfileOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteConnectionProfileRequest,Empty,OperationMetadata> |
deleteConversionWorkspaceAsync(ConversionWorkspaceName name)
public final OperationFuture<Empty,OperationMetadata> deleteConversionWorkspaceAsync(ConversionWorkspaceName name)
Deletes a single conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConversionWorkspaceName name =
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]");
dataMigrationServiceClient.deleteConversionWorkspaceAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
ConversionWorkspaceName Required. Name of the conversion workspace resource to delete. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConversionWorkspaceAsync(DeleteConversionWorkspaceRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteConversionWorkspaceAsync(DeleteConversionWorkspaceRequest request)
Deletes a single conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteConversionWorkspaceRequest request =
DeleteConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
dataMigrationServiceClient.deleteConversionWorkspaceAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteConversionWorkspaceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConversionWorkspaceAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteConversionWorkspaceAsync(String name)
Deletes a single conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String name =
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString();
dataMigrationServiceClient.deleteConversionWorkspaceAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the conversion workspace resource to delete. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConversionWorkspaceCallable()
public final UnaryCallable<DeleteConversionWorkspaceRequest,Operation> deleteConversionWorkspaceCallable()
Deletes a single conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteConversionWorkspaceRequest request =
DeleteConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.deleteConversionWorkspaceCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteConversionWorkspaceRequest,Operation> |
deleteConversionWorkspaceOperationCallable()
public final OperationCallable<DeleteConversionWorkspaceRequest,Empty,OperationMetadata> deleteConversionWorkspaceOperationCallable()
Deletes a single conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteConversionWorkspaceRequest request =
DeleteConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
OperationFuture<Empty, OperationMetadata> future =
dataMigrationServiceClient
.deleteConversionWorkspaceOperationCallable()
.futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteConversionWorkspaceRequest,Empty,OperationMetadata> |
deleteMappingRule(ConversionWorkspaceName name)
public final void deleteMappingRule(ConversionWorkspaceName name)
Deletes a single mapping rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConversionWorkspaceName name =
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]");
dataMigrationServiceClient.deleteMappingRule(name);
}
Parameter | |
---|---|
Name | Description |
name |
ConversionWorkspaceName Required. Name of the mapping rule resource to delete. |
deleteMappingRule(DeleteMappingRuleRequest request)
public final void deleteMappingRule(DeleteMappingRuleRequest request)
Deletes a single mapping rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteMappingRuleRequest request =
DeleteMappingRuleRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setRequestId("requestId693933066")
.build();
dataMigrationServiceClient.deleteMappingRule(request);
}
Parameter | |
---|---|
Name | Description |
request |
DeleteMappingRuleRequest The request object containing all of the parameters for the API call. |
deleteMappingRule(String name)
public final void deleteMappingRule(String name)
Deletes a single mapping rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String name =
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString();
dataMigrationServiceClient.deleteMappingRule(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the mapping rule resource to delete. |
deleteMappingRuleCallable()
public final UnaryCallable<DeleteMappingRuleRequest,Empty> deleteMappingRuleCallable()
Deletes a single mapping rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteMappingRuleRequest request =
DeleteMappingRuleRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Empty> future =
dataMigrationServiceClient.deleteMappingRuleCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteMappingRuleRequest,Empty> |
deleteMigrationJobAsync(DeleteMigrationJobRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteMigrationJobAsync(DeleteMigrationJobRequest request)
Deletes a single migration job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteMigrationJobRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteMigrationJobAsync(MigrationJobName name)
public final OperationFuture<Empty,OperationMetadata> deleteMigrationJobAsync(MigrationJobName name)
Deletes a single migration job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
MigrationJobName name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]");
dataMigrationServiceClient.deleteMigrationJobAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
MigrationJobName Required. Name of the migration job resource to delete. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteMigrationJobAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteMigrationJobAsync(String name)
Deletes a single migration job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString();
dataMigrationServiceClient.deleteMigrationJobAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the migration job resource to delete. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteMigrationJobCallable()
public final UnaryCallable<DeleteMigrationJobRequest,Operation> deleteMigrationJobCallable()
Deletes a single migration job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteMigrationJobRequest,Operation> |
deleteMigrationJobOperationCallable()
public final OperationCallable<DeleteMigrationJobRequest,Empty,OperationMetadata> deleteMigrationJobOperationCallable()
Deletes a single migration job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteMigrationJobRequest request =
DeleteMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
OperationFuture<Empty, OperationMetadata> future =
dataMigrationServiceClient.deleteMigrationJobOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteMigrationJobRequest,Empty,OperationMetadata> |
deletePrivateConnectionAsync(DeletePrivateConnectionRequest request)
public final OperationFuture<Empty,OperationMetadata> deletePrivateConnectionAsync(DeletePrivateConnectionRequest request)
Deletes a single Database Migration Service private connection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeletePrivateConnectionRequest request