Class DataMigrationServiceClient (2.50.0)

GitHub RepositoryProduct ReferenceREST 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().

Methods
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.

  • listMigrationJobs(ListMigrationJobsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listMigrationJobs(LocationName parent)

  • listMigrationJobs(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listMigrationJobsPagedCallable()

  • listMigrationJobsCallable()

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.

  • getMigrationJob(GetMigrationJobRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getMigrationJob(MigrationJobName name)

  • getMigrationJob(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getMigrationJobCallable()

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.

  • createMigrationJobAsync(CreateMigrationJobRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createMigrationJobAsync(LocationName parent, MigrationJob migrationJob, String migrationJobId)

  • createMigrationJobAsync(String parent, MigrationJob migrationJob, String migrationJobId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createMigrationJobOperationCallable()

  • createMigrationJobCallable()

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.

  • updateMigrationJobAsync(UpdateMigrationJobRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateMigrationJobAsync(MigrationJob migrationJob, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateMigrationJobOperationCallable()

  • updateMigrationJobCallable()

DeleteMigrationJob

Deletes a single migration job.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteMigrationJobAsync(DeleteMigrationJobRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteMigrationJobAsync(MigrationJobName name)

  • deleteMigrationJobAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteMigrationJobOperationCallable()

  • deleteMigrationJobCallable()

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.

  • startMigrationJobAsync(StartMigrationJobRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • startMigrationJobOperationCallable()

  • startMigrationJobCallable()

StopMigrationJob

Stops a running migration job.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • stopMigrationJobAsync(StopMigrationJobRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • stopMigrationJobOperationCallable()

  • stopMigrationJobCallable()

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.

  • resumeMigrationJobAsync(ResumeMigrationJobRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • resumeMigrationJobOperationCallable()

  • resumeMigrationJobCallable()

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.

  • promoteMigrationJobAsync(PromoteMigrationJobRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • promoteMigrationJobOperationCallable()

  • promoteMigrationJobCallable()

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.

  • verifyMigrationJobAsync(VerifyMigrationJobRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • verifyMigrationJobOperationCallable()

  • verifyMigrationJobCallable()

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.

  • restartMigrationJobAsync(RestartMigrationJobRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • restartMigrationJobOperationCallable()

  • restartMigrationJobCallable()

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.

  • generateSshScript(GenerateSshScriptRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • generateSshScriptCallable()

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.

  • generateTcpProxyScript(GenerateTcpProxyScriptRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • generateTcpProxyScriptCallable()

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.

  • listConnectionProfiles(ListConnectionProfilesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listConnectionProfiles(LocationName parent)

  • listConnectionProfiles(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listConnectionProfilesPagedCallable()

  • listConnectionProfilesCallable()

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.

  • getConnectionProfile(GetConnectionProfileRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getConnectionProfile(ConnectionProfileName name)

  • getConnectionProfile(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getConnectionProfileCallable()

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.

  • createConnectionProfileAsync(CreateConnectionProfileRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createConnectionProfileAsync(LocationName parent, ConnectionProfile connectionProfile, String connectionProfileId)

  • createConnectionProfileAsync(String parent, ConnectionProfile connectionProfile, String connectionProfileId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createConnectionProfileOperationCallable()

  • createConnectionProfileCallable()

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.

  • updateConnectionProfileAsync(UpdateConnectionProfileRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateConnectionProfileAsync(ConnectionProfile connectionProfile, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateConnectionProfileOperationCallable()

  • updateConnectionProfileCallable()

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.

  • deleteConnectionProfileAsync(DeleteConnectionProfileRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteConnectionProfileAsync(ConnectionProfileName name)

  • deleteConnectionProfileAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteConnectionProfileOperationCallable()

  • deleteConnectionProfileCallable()

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.

  • createPrivateConnectionAsync(CreatePrivateConnectionRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createPrivateConnectionAsync(LocationName parent, PrivateConnection privateConnection, String privateConnectionId)

  • createPrivateConnectionAsync(String parent, PrivateConnection privateConnection, String privateConnectionId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createPrivateConnectionOperationCallable()

  • createPrivateConnectionCallable()

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.

  • getPrivateConnection(GetPrivateConnectionRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getPrivateConnection(PrivateConnectionName name)

  • getPrivateConnection(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getPrivateConnectionCallable()

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.

  • listPrivateConnections(ListPrivateConnectionsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listPrivateConnections(LocationName parent)

  • listPrivateConnections(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listPrivateConnectionsPagedCallable()

  • listPrivateConnectionsCallable()

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.

  • deletePrivateConnectionAsync(DeletePrivateConnectionRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deletePrivateConnectionAsync(PrivateConnectionName name)

  • deletePrivateConnectionAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deletePrivateConnectionOperationCallable()

  • deletePrivateConnectionCallable()

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.

  • getConversionWorkspace(GetConversionWorkspaceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getConversionWorkspace(ConversionWorkspaceName name)

  • getConversionWorkspace(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getConversionWorkspaceCallable()

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.

  • listConversionWorkspaces(ListConversionWorkspacesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listConversionWorkspaces(LocationName parent)

  • listConversionWorkspaces(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listConversionWorkspacesPagedCallable()

  • listConversionWorkspacesCallable()

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.

  • createConversionWorkspaceAsync(CreateConversionWorkspaceRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createConversionWorkspaceAsync(LocationName parent, ConversionWorkspace conversionWorkspace, String conversionWorkspaceId)

  • createConversionWorkspaceAsync(String parent, ConversionWorkspace conversionWorkspace, String conversionWorkspaceId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createConversionWorkspaceOperationCallable()

  • createConversionWorkspaceCallable()

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.

  • updateConversionWorkspaceAsync(UpdateConversionWorkspaceRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateConversionWorkspaceAsync(ConversionWorkspace conversionWorkspace, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateConversionWorkspaceOperationCallable()

  • updateConversionWorkspaceCallable()

DeleteConversionWorkspace

Deletes a single conversion workspace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteConversionWorkspaceAsync(DeleteConversionWorkspaceRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteConversionWorkspaceAsync(ConversionWorkspaceName name)

  • deleteConversionWorkspaceAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteConversionWorkspaceOperationCallable()

  • deleteConversionWorkspaceCallable()

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.

  • createMappingRule(CreateMappingRuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createMappingRule(ConversionWorkspaceName parent, MappingRule mappingRule, String mappingRuleId)

  • createMappingRule(String parent, MappingRule mappingRule, String mappingRuleId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createMappingRuleCallable()

DeleteMappingRule

Deletes a single mapping rule.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteMappingRule(DeleteMappingRuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteMappingRule(ConversionWorkspaceName name)

  • deleteMappingRule(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteMappingRuleCallable()

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.

  • listMappingRules(ListMappingRulesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listMappingRules(ConversionWorkspaceName parent)

  • listMappingRules(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listMappingRulesPagedCallable()

  • listMappingRulesCallable()

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.

  • getMappingRule(GetMappingRuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getMappingRule(MappingRuleName name)

  • getMappingRule(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getMappingRuleCallable()

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.

  • seedConversionWorkspaceAsync(SeedConversionWorkspaceRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • seedConversionWorkspaceOperationCallable()

  • seedConversionWorkspaceCallable()

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.

  • importMappingRulesAsync(ImportMappingRulesRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • importMappingRulesOperationCallable()

  • importMappingRulesCallable()

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.

  • convertConversionWorkspaceAsync(ConvertConversionWorkspaceRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • convertConversionWorkspaceOperationCallable()

  • convertConversionWorkspaceCallable()

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.

  • commitConversionWorkspaceAsync(CommitConversionWorkspaceRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • commitConversionWorkspaceOperationCallable()

  • commitConversionWorkspaceCallable()

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.

  • rollbackConversionWorkspaceAsync(RollbackConversionWorkspaceRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • rollbackConversionWorkspaceOperationCallable()

  • rollbackConversionWorkspaceCallable()

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.

  • applyConversionWorkspaceAsync(ApplyConversionWorkspaceRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • applyConversionWorkspaceOperationCallable()

  • applyConversionWorkspaceCallable()

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.

  • describeDatabaseEntities(DescribeDatabaseEntitiesRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • describeDatabaseEntitiesPagedCallable()

  • describeDatabaseEntitiesCallable()

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.

  • searchBackgroundJobs(SearchBackgroundJobsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • searchBackgroundJobsCallable()

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.

  • describeConversionWorkspaceRevisions(DescribeConversionWorkspaceRevisionsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • describeConversionWorkspaceRevisionsCallable()

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.

  • fetchStaticIps(FetchStaticIpsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • fetchStaticIps(LocationName name)

  • fetchStaticIps(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchStaticIpsPagedCallable()

  • fetchStaticIpsCallable()

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.

Inheritance

java.lang.Object > DataMigrationServiceClient

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