Class DataMigrationServiceClient (2.26.0)

public class DataMigrationServiceClient implements BackgroundResource

Service Description: Database Migration service

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // 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().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of DataMigrationServiceSettings to create(). For example:

To customize credentials:


 // 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

Implements

BackgroundResource

Static Methods

create()

public static final DataMigrationServiceClient create()

Constructs an instance of DataMigrationServiceClient with default settings.

Returns
TypeDescription
DataMigrationServiceClient
Exceptions
TypeDescription
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
NameDescription
settingsDataMigrationServiceSettings
Returns
TypeDescription
DataMigrationServiceClient
Exceptions
TypeDescription
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
NameDescription
stubDataMigrationServiceStub
Returns
TypeDescription
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
NameDescription
settingsDataMigrationServiceSettings

DataMigrationServiceClient(DataMigrationServiceStub stub)

protected DataMigrationServiceClient(DataMigrationServiceStub stub)
Parameter
NameDescription
stubDataMigrationServiceStub

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
NameDescription
requestApplyConversionWorkspaceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
OperationCallable<ApplyConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata>

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
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
NameDescription
requestCommitConversionWorkspaceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestConvertConversionWorkspaceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestCreateConnectionProfileRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. The parent which owns this collection of connection profiles.

connectionProfileConnectionProfile

Required. The create request body including the connection profile data

connectionProfileIdString

Required. The connection profile identifier.

Returns
TypeDescription
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
NameDescription
parentString

Required. The parent which owns this collection of connection profiles.

connectionProfileConnectionProfile

Required. The create request body including the connection profile data

connectionProfileIdString

Required. The connection profile identifier.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestCreateConversionWorkspaceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. The parent which owns this collection of conversion workspaces.

conversionWorkspaceConversionWorkspace

Required. Represents a conversion workspace object.

conversionWorkspaceIdString

Required. The ID of the conversion workspace to create.

Returns
TypeDescription
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
NameDescription
parentString

Required. The parent which owns this collection of conversion workspaces.

conversionWorkspaceConversionWorkspace

Required. Represents a conversion workspace object.

conversionWorkspaceIdString

Required. The ID of the conversion workspace to create.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
parentConversionWorkspaceName

Required. The parent which owns this collection of mapping rules.

mappingRuleMappingRule

Required. Represents a mapping rule object.

mappingRuleIdString

Required. The ID of the rule to create.

Returns
TypeDescription
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
NameDescription
requestCreateMappingRuleRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
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
NameDescription
parentString

Required. The parent which owns this collection of mapping rules.

mappingRuleMappingRule

Required. Represents a mapping rule object.

mappingRuleIdString

Required. The ID of the rule to create.

Returns
TypeDescription
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
TypeDescription
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
NameDescription
requestCreateMigrationJobRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. The parent which owns this collection of migration jobs.

migrationJobMigrationJob

Required. Represents a migration job object.

migrationJobIdString

Required. The ID of the instance to create.

Returns
TypeDescription
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
NameDescription
parentString

Required. The parent which owns this collection of migration jobs.

migrationJobMigrationJob

Required. Represents a migration job object.

migrationJobIdString

Required. The ID of the instance to create.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestCreatePrivateConnectionRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. The parent that owns the collection of PrivateConnections.

privateConnectionPrivateConnection

Required. The private connection resource to create.

privateConnectionIdString

Required. The private connection identifier.

Returns
TypeDescription
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
NameDescription
parentString

Required. The parent that owns the collection of PrivateConnections.

privateConnectionPrivateConnection

Required. The private connection resource to create.

privateConnectionIdString

Required. The private connection identifier.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
nameConnectionProfileName

Required. Name of the connection profile resource to delete.

Returns
TypeDescription
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
NameDescription
requestDeleteConnectionProfileRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
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
NameDescription
nameString

Required. Name of the connection profile resource to delete.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
nameConversionWorkspaceName

Required. Name of the conversion workspace resource to delete.

Returns
TypeDescription
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
NameDescription
requestDeleteConversionWorkspaceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
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
NameDescription
nameString

Required. Name of the conversion workspace resource to delete.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
nameConversionWorkspaceName

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
NameDescription
requestDeleteMappingRuleRequest

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
NameDescription
nameString

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
TypeDescription
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
NameDescription
requestDeleteMigrationJobRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
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
NameDescription
nameMigrationJobName

Required. Name of the migration job resource to delete.

Returns
TypeDescription
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
NameDescription
nameString

Required. Name of the migration job resource to delete.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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 =
       DeletePrivateConnectionRequest.newBuilder()
           .setName(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   dataMigrationServiceClient.deletePrivateConnectionAsync(request).get();
 }
 
Parameter
NameDescription
requestDeletePrivateConnectionRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deletePrivateConnectionAsync(PrivateConnectionName name)

public final OperationFuture<Empty,OperationMetadata> deletePrivateConnectionAsync(PrivateConnectionName name)

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()) {
   PrivateConnectionName name =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]");
   dataMigrationServiceClient.deletePrivateConnectionAsync(name).get();
 }
 
Parameter
NameDescription
namePrivateConnectionName

Required. The name of the private connection to delete.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deletePrivateConnectionAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deletePrivateConnectionAsync(String name)

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()) {
   String name =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]").toString();
   dataMigrationServiceClient.deletePrivateConnectionAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The name of the private connection to delete.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deletePrivateConnectionCallable()

public final UnaryCallable<DeletePrivateConnectionRequest,Operation> deletePrivateConnectionCallable()

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 =
       DeletePrivateConnectionRequest.newBuilder()
           .setName(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       dataMigrationServiceClient.deletePrivateConnectionCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeletePrivateConnectionRequest,Operation>

deletePrivateConnectionOperationCallable()

public final OperationCallable<DeletePrivateConnectionRequest,Empty,OperationMetadata> deletePrivateConnectionOperationCallable()

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 =
       DeletePrivateConnectionRequest.newBuilder()
           .setName(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       dataMigrationServiceClient.deletePrivateConnectionOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
OperationCallable<DeletePrivateConnectionRequest,Empty,OperationMetadata>

describeConversionWorkspaceRevisions(DescribeConversionWorkspaceRevisionsRequest request)

public final DescribeConversionWorkspaceRevisionsResponse describeConversionWorkspaceRevisions(DescribeConversionWorkspaceRevisionsRequest request)

Retrieves a list of committed revisions of a specific 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()) {
   DescribeConversionWorkspaceRevisionsRequest request =
       DescribeConversionWorkspaceRevisionsRequest.newBuilder()
           .setConversionWorkspace(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setCommitId("commitId-602292046")
           .build();
   DescribeConversionWorkspaceRevisionsResponse response =
       dataMigrationServiceClient.describeConversionWorkspaceRevisions(request);
 }
 
Parameter
NameDescription
requestDescribeConversionWorkspaceRevisionsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
DescribeConversionWorkspaceRevisionsResponse

describeConversionWorkspaceRevisionsCallable()

public final UnaryCallable<DescribeConversionWorkspaceRevisionsRequest,DescribeConversionWorkspaceRevisionsResponse> describeConversionWorkspaceRevisionsCallable()

Retrieves a list of committed revisions of a specific 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()) {
   DescribeConversionWorkspaceRevisionsRequest request =
       DescribeConversionWorkspaceRevisionsRequest.newBuilder()
           .setConversionWorkspace(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setCommitId("commitId-602292046")
           .build();
   ApiFuture<DescribeConversionWorkspaceRevisionsResponse> future =
       dataMigrationServiceClient
           .describeConversionWorkspaceRevisionsCallable()
           .futureCall(request);
   // Do something.
   DescribeConversionWorkspaceRevisionsResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DescribeConversionWorkspaceRevisionsRequest,DescribeConversionWorkspaceRevisionsResponse>

describeDatabaseEntities(DescribeDatabaseEntitiesRequest request)

public final DataMigrationServiceClient.DescribeDatabaseEntitiesPagedResponse describeDatabaseEntities(DescribeDatabaseEntitiesRequest request)

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.

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()) {
   DescribeDatabaseEntitiesRequest request =
       DescribeDatabaseEntitiesRequest.newBuilder()
           .setConversionWorkspace(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setUncommitted(true)
           .setCommitId("commitId-602292046")
           .setFilter("filter-1274492040")
           .setView(DatabaseEntityView.forNumber(0))
           .build();
   for (DatabaseEntity element :
       dataMigrationServiceClient.describeDatabaseEntities(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestDescribeDatabaseEntitiesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
DataMigrationServiceClient.DescribeDatabaseEntitiesPagedResponse

describeDatabaseEntitiesCallable()

public final UnaryCallable<DescribeDatabaseEntitiesRequest,DescribeDatabaseEntitiesResponse> describeDatabaseEntitiesCallable()

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.

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()) {
   DescribeDatabaseEntitiesRequest request =
       DescribeDatabaseEntitiesRequest.newBuilder()
           .setConversionWorkspace(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setUncommitted(true)
           .setCommitId("commitId-602292046")
           .setFilter("filter-1274492040")
           .setView(DatabaseEntityView.forNumber(0))
           .build();
   while (true) {
     DescribeDatabaseEntitiesResponse response =
         dataMigrationServiceClient.describeDatabaseEntitiesCallable().call(request);
     for (DatabaseEntity element : response.getDatabaseEntitiesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<DescribeDatabaseEntitiesRequest,DescribeDatabaseEntitiesResponse>

describeDatabaseEntitiesPagedCallable()

public final UnaryCallable<DescribeDatabaseEntitiesRequest,DataMigrationServiceClient.DescribeDatabaseEntitiesPagedResponse> describeDatabaseEntitiesPagedCallable()

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.

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()) {
   DescribeDatabaseEntitiesRequest request =
       DescribeDatabaseEntitiesRequest.newBuilder()
           .setConversionWorkspace(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setUncommitted(true)
           .setCommitId("commitId-602292046")
           .setFilter("filter-1274492040")
           .setView(DatabaseEntityView.forNumber(0))
           .build();
   ApiFuture<DatabaseEntity> future =
       dataMigrationServiceClient.describeDatabaseEntitiesPagedCallable().futureCall(request);
   // Do something.
   for (DatabaseEntity element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<DescribeDatabaseEntitiesRequest,DescribeDatabaseEntitiesPagedResponse>

fetchStaticIps(FetchStaticIpsRequest request)

public final DataMigrationServiceClient.FetchStaticIpsPagedResponse fetchStaticIps(FetchStaticIpsRequest request)

Fetches a set of static IP addresses that need to be allowlisted by the customer when using the static-IP connectivity method.

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()) {
   FetchStaticIpsRequest request =
       FetchStaticIpsRequest.newBuilder()
           .setName(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (String element : dataMigrationServiceClient.fetchStaticIps(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestFetchStaticIpsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
DataMigrationServiceClient.FetchStaticIpsPagedResponse

fetchStaticIps(LocationName name)

public final DataMigrationServiceClient.FetchStaticIpsPagedResponse fetchStaticIps(LocationName name)

Fetches a set of static IP addresses that need to be allowlisted by the customer when using the static-IP connectivity method.

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 name = LocationName.of("[PROJECT]", "[LOCATION]");
   for (String element : dataMigrationServiceClient.fetchStaticIps(name).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
nameLocationName

Required. The resource name for the location for which static IPs should be returned. Must be in the format projects/*/locations/*.

Returns
TypeDescription
DataMigrationServiceClient.FetchStaticIpsPagedResponse

fetchStaticIps(String name)

public final DataMigrationServiceClient.FetchStaticIpsPagedResponse fetchStaticIps(String name)

Fetches a set of static IP addresses that need to be allowlisted by the customer when using the static-IP connectivity method.

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 = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (String element : dataMigrationServiceClient.fetchStaticIps(name).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
nameString

Required. The resource name for the location for which static IPs should be returned. Must be in the format projects/*/locations/*.

Returns
TypeDescription
DataMigrationServiceClient.FetchStaticIpsPagedResponse

fetchStaticIpsCallable()

public final UnaryCallable<FetchStaticIpsRequest,FetchStaticIpsResponse> fetchStaticIpsCallable()

Fetches a set of static IP addresses that need to be allowlisted by the customer when using the static-IP connectivity method.

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()) {
   FetchStaticIpsRequest request =
       FetchStaticIpsRequest.newBuilder()
           .setName(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     FetchStaticIpsResponse response =
         dataMigrationServiceClient.fetchStaticIpsCallable().call(request);
     for (String element : response.getStaticIpsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<FetchStaticIpsRequest,FetchStaticIpsResponse>

fetchStaticIpsPagedCallable()

public final UnaryCallable<FetchStaticIpsRequest,DataMigrationServiceClient.FetchStaticIpsPagedResponse> fetchStaticIpsPagedCallable()

Fetches a set of static IP addresses that need to be allowlisted by the customer when using the static-IP connectivity method.

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()) {
   FetchStaticIpsRequest request =
       FetchStaticIpsRequest.newBuilder()
           .setName(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<String> future =
       dataMigrationServiceClient.fetchStaticIpsPagedCallable().futureCall(request);
   // Do something.
   for (String element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<FetchStaticIpsRequest,FetchStaticIpsPagedResponse>

generateSshScript(GenerateSshScriptRequest request)

public final SshScript generateSshScript(GenerateSshScriptRequest request)

Generate a SSH configuration script to configure the reverse SSH connectivity.

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()) {
   GenerateSshScriptRequest request =
       GenerateSshScriptRequest.newBuilder()
           .setMigrationJob(
               MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .setVm("vm3767")
           .setVmPort(563010825)
           .build();
   SshScript response = dataMigrationServiceClient.generateSshScript(request);
 }
 
Parameter
NameDescription
requestGenerateSshScriptRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SshScript

generateSshScriptCallable()

public final UnaryCallable<GenerateSshScriptRequest,SshScript> generateSshScriptCallable()

Generate a SSH configuration script to configure the reverse SSH connectivity.

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()) {
   GenerateSshScriptRequest request =
       GenerateSshScriptRequest.newBuilder()
           .setMigrationJob(
               MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .setVm("vm3767")
           .setVmPort(563010825)
           .build();
   ApiFuture<SshScript> future =
       dataMigrationServiceClient.generateSshScriptCallable().futureCall(request);
   // Do something.
   SshScript response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GenerateSshScriptRequest,SshScript>

generateTcpProxyScript(GenerateTcpProxyScriptRequest request)

public final TcpProxyScript generateTcpProxyScript(GenerateTcpProxyScriptRequest request)

Generate a TCP Proxy configuration script to configure a cloud-hosted VM running a TCP Proxy.

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()) {
   GenerateTcpProxyScriptRequest request =
       GenerateTcpProxyScriptRequest.newBuilder()
           .setMigrationJob(
               MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .setVmName("vmName-813643294")
           .setVmMachineType("vmMachineType-1921917718")
           .setVmZone("vmZone-813272317")
           .setVmSubnet("vmSubnet-65857292")
           .build();
   TcpProxyScript response = dataMigrationServiceClient.generateTcpProxyScript(request);
 }
 
Parameter
NameDescription
requestGenerateTcpProxyScriptRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
TcpProxyScript

generateTcpProxyScriptCallable()

public final UnaryCallable<GenerateTcpProxyScriptRequest,TcpProxyScript> generateTcpProxyScriptCallable()

Generate a TCP Proxy configuration script to configure a cloud-hosted VM running a TCP Proxy.

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()) {
   GenerateTcpProxyScriptRequest request =
       GenerateTcpProxyScriptRequest.newBuilder()
           .setMigrationJob(
               MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .setVmName("vmName-813643294")
           .setVmMachineType("vmMachineType-1921917718")
           .setVmZone("vmZone-813272317")
           .setVmSubnet("vmSubnet-65857292")
           .build();
   ApiFuture<TcpProxyScript> future =
       dataMigrationServiceClient.generateTcpProxyScriptCallable().futureCall(request);
   // Do something.
   TcpProxyScript response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GenerateTcpProxyScriptRequest,TcpProxyScript>

getConnectionProfile(ConnectionProfileName name)

public final ConnectionProfile getConnectionProfile(ConnectionProfileName name)

Gets details of a single connection profile.

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]");
   ConnectionProfile response = dataMigrationServiceClient.getConnectionProfile(name);
 }
 
Parameter
NameDescription
nameConnectionProfileName

Required. Name of the connection profile resource to get.

Returns
TypeDescription
ConnectionProfile

getConnectionProfile(GetConnectionProfileRequest request)

public final ConnectionProfile getConnectionProfile(GetConnectionProfileRequest request)

Gets details of a single connection profile.

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()) {
   GetConnectionProfileRequest request =
       GetConnectionProfileRequest.newBuilder()
           .setName(
               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
                   .toString())
           .build();
   ConnectionProfile response = dataMigrationServiceClient.getConnectionProfile(request);
 }
 
Parameter
NameDescription
requestGetConnectionProfileRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
ConnectionProfile

getConnectionProfile(String name)

public final ConnectionProfile getConnectionProfile(String name)

Gets details of a single connection profile.

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();
   ConnectionProfile response = dataMigrationServiceClient.getConnectionProfile(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the connection profile resource to get.

Returns
TypeDescription
ConnectionProfile

getConnectionProfileCallable()

public final UnaryCallable<GetConnectionProfileRequest,ConnectionProfile> getConnectionProfileCallable()

Gets details of a single connection profile.

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()) {
   GetConnectionProfileRequest request =
       GetConnectionProfileRequest.newBuilder()
           .setName(
               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
                   .toString())
           .build();
   ApiFuture<ConnectionProfile> future =
       dataMigrationServiceClient.getConnectionProfileCallable().futureCall(request);
   // Do something.
   ConnectionProfile response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetConnectionProfileRequest,ConnectionProfile>

getConversionWorkspace(ConversionWorkspaceName name)

public final ConversionWorkspace getConversionWorkspace(ConversionWorkspaceName name)

Gets details of 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]");
   ConversionWorkspace response = dataMigrationServiceClient.getConversionWorkspace(name);
 }
 
Parameter
NameDescription
nameConversionWorkspaceName

Required. Name of the conversion workspace resource to get.

Returns
TypeDescription
ConversionWorkspace

getConversionWorkspace(GetConversionWorkspaceRequest request)

public final ConversionWorkspace getConversionWorkspace(GetConversionWorkspaceRequest request)

Gets details of 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()) {
   GetConversionWorkspaceRequest request =
       GetConversionWorkspaceRequest.newBuilder()
           .setName(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .build();
   ConversionWorkspace response = dataMigrationServiceClient.getConversionWorkspace(request);
 }
 
Parameter
NameDescription
requestGetConversionWorkspaceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
ConversionWorkspace

getConversionWorkspace(String name)

public final ConversionWorkspace getConversionWorkspace(String name)

Gets details of 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();
   ConversionWorkspace response = dataMigrationServiceClient.getConversionWorkspace(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the conversion workspace resource to get.

Returns
TypeDescription
ConversionWorkspace

getConversionWorkspaceCallable()

public final UnaryCallable<GetConversionWorkspaceRequest,ConversionWorkspace> getConversionWorkspaceCallable()

Gets details of 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()) {
   GetConversionWorkspaceRequest request =
       GetConversionWorkspaceRequest.newBuilder()
           .setName(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .build();
   ApiFuture<ConversionWorkspace> future =
       dataMigrationServiceClient.getConversionWorkspaceCallable().futureCall(request);
   // Do something.
   ConversionWorkspace response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetConversionWorkspaceRequest,ConversionWorkspace>

getMappingRule(GetMappingRuleRequest request)

public final MappingRule getMappingRule(GetMappingRuleRequest request)

Gets the details of a 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()) {
   GetMappingRuleRequest request =
       GetMappingRuleRequest.newBuilder()
           .setName(
               MappingRuleName.of(
                       "[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]", "[MAPPING_RULE]")
                   .toString())
           .build();
   MappingRule response = dataMigrationServiceClient.getMappingRule(request);
 }
 
Parameter
NameDescription
requestGetMappingRuleRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
MappingRule

getMappingRule(MappingRuleName name)

public final MappingRule getMappingRule(MappingRuleName name)

Gets the details of a 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()) {
   MappingRuleName name =
       MappingRuleName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]", "[MAPPING_RULE]");
   MappingRule response = dataMigrationServiceClient.getMappingRule(name);
 }
 
Parameter
NameDescription
nameMappingRuleName

Required. Name of the mapping rule resource to get. Example: conversionWorkspaces/123/mappingRules/rule123

In order to retrieve a previous revision of the mapping rule, also provide the revision ID. Example: conversionWorkspace/123/mappingRules/rule123@c7cfa2a8c7cfa2a8c7cfa2a8c7cfa2a8

Returns
TypeDescription
MappingRule

getMappingRule(String name)

public final MappingRule getMappingRule(String name)

Gets the details of a 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 =
       MappingRuleName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]", "[MAPPING_RULE]")
           .toString();
   MappingRule response = dataMigrationServiceClient.getMappingRule(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the mapping rule resource to get. Example: conversionWorkspaces/123/mappingRules/rule123

In order to retrieve a previous revision of the mapping rule, also provide the revision ID. Example: conversionWorkspace/123/mappingRules/rule123@c7cfa2a8c7cfa2a8c7cfa2a8c7cfa2a8

Returns
TypeDescription
MappingRule

getMappingRuleCallable()

public final UnaryCallable<GetMappingRuleRequest,MappingRule> getMappingRuleCallable()

Gets the details of a 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()) {
   GetMappingRuleRequest request =
       GetMappingRuleRequest.newBuilder()
           .setName(
               MappingRuleName.of(
                       "[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]", "[MAPPING_RULE]")
                   .toString())
           .build();
   ApiFuture<MappingRule> future =
       dataMigrationServiceClient.getMappingRuleCallable().futureCall(request);
   // Do something.
   MappingRule response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetMappingRuleRequest,MappingRule>

getMigrationJob(GetMigrationJobRequest request)

public final MigrationJob getMigrationJob(GetMigrationJobRequest request)

Gets details of 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()) {
   GetMigrationJobRequest request =
       GetMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .build();
   MigrationJob response = dataMigrationServiceClient.getMigrationJob(request);
 }
 
Parameter
NameDescription
requestGetMigrationJobRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
MigrationJob

getMigrationJob(MigrationJobName name)

public final MigrationJob getMigrationJob(MigrationJobName name)

Gets details of 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]");
   MigrationJob response = dataMigrationServiceClient.getMigrationJob(name);
 }
 
Parameter
NameDescription
nameMigrationJobName

Required. Name of the migration job resource to get.

Returns
TypeDescription
MigrationJob

getMigrationJob(String name)

public final MigrationJob getMigrationJob(String name)

Gets details of 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();
   MigrationJob response = dataMigrationServiceClient.getMigrationJob(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the migration job resource to get.

Returns
TypeDescription
MigrationJob

getMigrationJobCallable()

public final UnaryCallable<GetMigrationJobRequest,MigrationJob> getMigrationJobCallable()

Gets details of 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()) {
   GetMigrationJobRequest request =
       GetMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .build();
   ApiFuture<MigrationJob> future =
       dataMigrationServiceClient.getMigrationJobCallable().futureCall(request);
   // Do something.
   MigrationJob response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetMigrationJobRequest,MigrationJob>

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
TypeDescription
OperationsClient

getPrivateConnection(GetPrivateConnectionRequest request)

public final PrivateConnection getPrivateConnection(GetPrivateConnectionRequest request)

Gets details of a single 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()) {
   GetPrivateConnectionRequest request =
       GetPrivateConnectionRequest.newBuilder()
           .setName(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .build();
   PrivateConnection response = dataMigrationServiceClient.getPrivateConnection(request);
 }
 
Parameter
NameDescription
requestGetPrivateConnectionRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
PrivateConnection

getPrivateConnection(PrivateConnectionName name)

public final PrivateConnection getPrivateConnection(PrivateConnectionName name)

Gets details of a single 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()) {
   PrivateConnectionName name =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]");
   PrivateConnection response = dataMigrationServiceClient.getPrivateConnection(name);
 }
 
Parameter
NameDescription
namePrivateConnectionName

Required. The name of the private connection to get.

Returns
TypeDescription
PrivateConnection

getPrivateConnection(String name)

public final PrivateConnection getPrivateConnection(String name)

Gets details of a single 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()) {
   String name =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]").toString();
   PrivateConnection response = dataMigrationServiceClient.getPrivateConnection(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the private connection to get.

Returns
TypeDescription
PrivateConnection

getPrivateConnectionCallable()

public final UnaryCallable<GetPrivateConnectionRequest,PrivateConnection> getPrivateConnectionCallable()

Gets details of a single 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()) {
   GetPrivateConnectionRequest request =
       GetPrivateConnectionRequest.newBuilder()
           .setName(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .build();
   ApiFuture<PrivateConnection> future =
       dataMigrationServiceClient.getPrivateConnectionCallable().futureCall(request);
   // Do something.
   PrivateConnection response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetPrivateConnectionRequest,PrivateConnection>

getSettings()

public final DataMigrationServiceSettings getSettings()
Returns
TypeDescription
DataMigrationServiceSettings

getStub()

public DataMigrationServiceStub getStub()
Returns
TypeDescription
DataMigrationServiceStub

importMappingRulesAsync(ImportMappingRulesRequest request)

public final OperationFuture<ConversionWorkspace,OperationMetadata> importMappingRulesAsync(ImportMappingRulesRequest request)

Imports the mapping rules for a given conversion workspace. Supports various formats of external rules files.

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()) {
   ImportMappingRulesRequest request =
       ImportMappingRulesRequest.newBuilder()
           .setParent(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setRulesFormat(ImportRulesFileFormat.forNumber(0))
           .addAllRulesFiles(new ArrayList<ImportMappingRulesRequest.RulesFile>())
           .setAutoCommit(true)
           .build();
   ConversionWorkspace response =
       dataMigrationServiceClient.importMappingRulesAsync(request).get();
 }
 
Parameter
NameDescription
requestImportMappingRulesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<ConversionWorkspace,OperationMetadata>

importMappingRulesCallable()

public final UnaryCallable<ImportMappingRulesRequest,Operation> importMappingRulesCallable()

Imports the mapping rules for a given conversion workspace. Supports various formats of external rules files.

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()) {
   ImportMappingRulesRequest request =
       ImportMappingRulesRequest.newBuilder()
           .setParent(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setRulesFormat(ImportRulesFileFormat.forNumber(0))
           .addAllRulesFiles(new ArrayList<ImportMappingRulesRequest.RulesFile>())
           .setAutoCommit(true)
           .build();
   ApiFuture<Operation> future =
       dataMigrationServiceClient.importMappingRulesCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<ImportMappingRulesRequest,Operation>

importMappingRulesOperationCallable()

public final OperationCallable<ImportMappingRulesRequest,ConversionWorkspace,OperationMetadata> importMappingRulesOperationCallable()

Imports the mapping rules for a given conversion workspace. Supports various formats of external rules files.

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()) {
   ImportMappingRulesRequest request =
       ImportMappingRulesRequest.newBuilder()
           .setParent(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setRulesFormat(ImportRulesFileFormat.forNumber(0))
           .addAllRulesFiles(new ArrayList<ImportMappingRulesRequest.RulesFile>())
           .setAutoCommit(true)
           .build();
   OperationFuture<ConversionWorkspace, OperationMetadata> future =
       dataMigrationServiceClient.importMappingRulesOperationCallable().futureCall(request);
   // Do something.
   ConversionWorkspace response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<ImportMappingRulesRequest,ConversionWorkspace,OperationMetadata>

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

listConnectionProfiles(ListConnectionProfilesRequest request)

public final DataMigrationServiceClient.ListConnectionProfilesPagedResponse listConnectionProfiles(ListConnectionProfilesRequest request)

Retrieves a list of all connection profiles 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()) {
   ListConnectionProfilesRequest request =
       ListConnectionProfilesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (ConnectionProfile element :
       dataMigrationServiceClient.listConnectionProfiles(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListConnectionProfilesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
DataMigrationServiceClient.ListConnectionProfilesPagedResponse

listConnectionProfiles(LocationName parent)

public final DataMigrationServiceClient.ListConnectionProfilesPagedResponse listConnectionProfiles(LocationName parent)

Retrieves a list of all connection profiles 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]");
   for (ConnectionProfile element :
       dataMigrationServiceClient.listConnectionProfiles(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The parent which owns this collection of connection profiles.

Returns
TypeDescription
DataMigrationServiceClient.ListConnectionProfilesPagedResponse

listConnectionProfiles(String parent)

public final DataMigrationServiceClient.ListConnectionProfilesPagedResponse listConnectionProfiles(String parent)

Retrieves a list of all connection profiles 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();
   for (ConnectionProfile element :
       dataMigrationServiceClient.listConnectionProfiles(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent which owns this collection of connection profiles.

Returns
TypeDescription
DataMigrationServiceClient.ListConnectionProfilesPagedResponse

listConnectionProfilesCallable()

public final UnaryCallable<ListConnectionProfilesRequest,ListConnectionProfilesResponse> listConnectionProfilesCallable()

Retrieves a list of all connection profiles 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()) {
   ListConnectionProfilesRequest request =
       ListConnectionProfilesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListConnectionProfilesResponse response =
         dataMigrationServiceClient.listConnectionProfilesCallable().call(request);
     for (ConnectionProfile element : response.getConnectionProfilesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListConnectionProfilesRequest,ListConnectionProfilesResponse>

listConnectionProfilesPagedCallable()

public final UnaryCallable<ListConnectionProfilesRequest,DataMigrationServiceClient.ListConnectionProfilesPagedResponse> listConnectionProfilesPagedCallable()

Retrieves a list of all connection profiles 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()) {
   ListConnectionProfilesRequest request =
       ListConnectionProfilesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<ConnectionProfile> future =
       dataMigrationServiceClient.listConnectionProfilesPagedCallable().futureCall(request);
   // Do something.
   for (ConnectionProfile element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListConnectionProfilesRequest,ListConnectionProfilesPagedResponse>

listConversionWorkspaces(ListConversionWorkspacesRequest request)

public final DataMigrationServiceClient.ListConversionWorkspacesPagedResponse listConversionWorkspaces(ListConversionWorkspacesRequest request)

Lists conversion workspaces 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()) {
   ListConversionWorkspacesRequest request =
       ListConversionWorkspacesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   for (ConversionWorkspace element :
       dataMigrationServiceClient.listConversionWorkspaces(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListConversionWorkspacesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
DataMigrationServiceClient.ListConversionWorkspacesPagedResponse

listConversionWorkspaces(LocationName parent)

public final DataMigrationServiceClient.ListConversionWorkspacesPagedResponse listConversionWorkspaces(LocationName parent)

Lists conversion workspaces 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]");
   for (ConversionWorkspace element :
       dataMigrationServiceClient.listConversionWorkspaces(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The parent which owns this collection of conversion workspaces.

Returns
TypeDescription
DataMigrationServiceClient.ListConversionWorkspacesPagedResponse

listConversionWorkspaces(String parent)

public final DataMigrationServiceClient.ListConversionWorkspacesPagedResponse listConversionWorkspaces(String parent)

Lists conversion workspaces 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();
   for (ConversionWorkspace element :
       dataMigrationServiceClient.listConversionWorkspaces(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent which owns this collection of conversion workspaces.

Returns
TypeDescription
DataMigrationServiceClient.ListConversionWorkspacesPagedResponse

listConversionWorkspacesCallable()

public final UnaryCallable<ListConversionWorkspacesRequest,ListConversionWorkspacesResponse> listConversionWorkspacesCallable()

Lists conversion workspaces 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()) {
   ListConversionWorkspacesRequest request =
       ListConversionWorkspacesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   while (true) {
     ListConversionWorkspacesResponse response =
         dataMigrationServiceClient.listConversionWorkspacesCallable().call(request);
     for (ConversionWorkspace element : response.getConversionWorkspacesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListConversionWorkspacesRequest,ListConversionWorkspacesResponse>

listConversionWorkspacesPagedCallable()

public final UnaryCallable<ListConversionWorkspacesRequest,DataMigrationServiceClient.ListConversionWorkspacesPagedResponse> listConversionWorkspacesPagedCallable()

Lists conversion workspaces 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()) {
   ListConversionWorkspacesRequest request =
       ListConversionWorkspacesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   ApiFuture<ConversionWorkspace> future =
       dataMigrationServiceClient.listConversionWorkspacesPagedCallable().futureCall(request);
   // Do something.
   for (ConversionWorkspace element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListConversionWorkspacesRequest,ListConversionWorkspacesPagedResponse>

listMappingRules(ConversionWorkspaceName parent)

public final DataMigrationServiceClient.ListMappingRulesPagedResponse listMappingRules(ConversionWorkspaceName parent)

Lists the mapping rules for a specific 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]");
   for (MappingRule element : dataMigrationServiceClient.listMappingRules(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentConversionWorkspaceName

Required. Name of the conversion workspace resource whose mapping rules are listed in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.

Returns
TypeDescription
DataMigrationServiceClient.ListMappingRulesPagedResponse

listMappingRules(ListMappingRulesRequest request)

public final DataMigrationServiceClient.ListMappingRulesPagedResponse listMappingRules(ListMappingRulesRequest request)

Lists the mapping rules for a specific 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()) {
   ListMappingRulesRequest request =
       ListMappingRulesRequest.newBuilder()
           .setParent(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (MappingRule element :
       dataMigrationServiceClient.listMappingRules(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListMappingRulesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
DataMigrationServiceClient.ListMappingRulesPagedResponse

listMappingRules(String parent)

public final DataMigrationServiceClient.ListMappingRulesPagedResponse listMappingRules(String parent)

Lists the mapping rules for a specific 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();
   for (MappingRule element : dataMigrationServiceClient.listMappingRules(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. Name of the conversion workspace resource whose mapping rules are listed in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.

Returns
TypeDescription
DataMigrationServiceClient.ListMappingRulesPagedResponse

listMappingRulesCallable()

public final UnaryCallable<ListMappingRulesRequest,ListMappingRulesResponse> listMappingRulesCallable()

Lists the mapping rules for a specific 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()) {
   ListMappingRulesRequest request =
       ListMappingRulesRequest.newBuilder()
           .setParent(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListMappingRulesResponse response =
         dataMigrationServiceClient.listMappingRulesCallable().call(request);
     for (MappingRule element : response.getMappingRulesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListMappingRulesRequest,ListMappingRulesResponse>

listMappingRulesPagedCallable()

public final UnaryCallable<ListMappingRulesRequest,DataMigrationServiceClient.ListMappingRulesPagedResponse> listMappingRulesPagedCallable()

Lists the mapping rules for a specific 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()) {
   ListMappingRulesRequest request =
       ListMappingRulesRequest.newBuilder()
           .setParent(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<MappingRule> future =
       dataMigrationServiceClient.listMappingRulesPagedCallable().futureCall(request);
   // Do something.
   for (MappingRule element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListMappingRulesRequest,ListMappingRulesPagedResponse>

listMigrationJobs(ListMigrationJobsRequest request)

public final DataMigrationServiceClient.ListMigrationJobsPagedResponse listMigrationJobs(ListMigrationJobsRequest request)

Lists migration jobs 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()) {
   ListMigrationJobsRequest request =
       ListMigrationJobsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (MigrationJob element :
       dataMigrationServiceClient.listMigrationJobs(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListMigrationJobsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
DataMigrationServiceClient.ListMigrationJobsPagedResponse

listMigrationJobs(LocationName parent)

public final DataMigrationServiceClient.ListMigrationJobsPagedResponse listMigrationJobs(LocationName parent)

Lists migration jobs 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]");
   for (MigrationJob element :
       dataMigrationServiceClient.listMigrationJobs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The parent which owns this collection of migrationJobs.

Returns
TypeDescription
DataMigrationServiceClient.ListMigrationJobsPagedResponse

listMigrationJobs(String parent)

public final DataMigrationServiceClient.ListMigrationJobsPagedResponse listMigrationJobs(String parent)

Lists migration jobs 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();
   for (MigrationJob element :
       dataMigrationServiceClient.listMigrationJobs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent which owns this collection of migrationJobs.

Returns
TypeDescription
DataMigrationServiceClient.ListMigrationJobsPagedResponse

listMigrationJobsCallable()

public final UnaryCallable<ListMigrationJobsRequest,ListMigrationJobsResponse> listMigrationJobsCallable()

Lists migration jobs 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()) {
   ListMigrationJobsRequest request =
       ListMigrationJobsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListMigrationJobsResponse response =
         dataMigrationServiceClient.listMigrationJobsCallable().call(request);
     for (MigrationJob element : response.getMigrationJobsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListMigrationJobsRequest,ListMigrationJobsResponse>

listMigrationJobsPagedCallable()

public final UnaryCallable<ListMigrationJobsRequest,DataMigrationServiceClient.ListMigrationJobsPagedResponse> listMigrationJobsPagedCallable()

Lists migration jobs 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()) {
   ListMigrationJobsRequest request =
       ListMigrationJobsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<MigrationJob> future =
       dataMigrationServiceClient.listMigrationJobsPagedCallable().futureCall(request);
   // Do something.
   for (MigrationJob element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListMigrationJobsRequest,ListMigrationJobsPagedResponse>

listPrivateConnections(ListPrivateConnectionsRequest request)

public final DataMigrationServiceClient.ListPrivateConnectionsPagedResponse listPrivateConnections(ListPrivateConnectionsRequest request)

Retrieves a list of private connections 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()) {
   ListPrivateConnectionsRequest request =
       ListPrivateConnectionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (PrivateConnection element :
       dataMigrationServiceClient.listPrivateConnections(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListPrivateConnectionsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
DataMigrationServiceClient.ListPrivateConnectionsPagedResponse

listPrivateConnections(LocationName parent)

public final DataMigrationServiceClient.ListPrivateConnectionsPagedResponse listPrivateConnections(LocationName parent)

Retrieves a list of private connections 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]");
   for (PrivateConnection element :
       dataMigrationServiceClient.listPrivateConnections(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The parent that owns the collection of private connections.

Returns
TypeDescription
DataMigrationServiceClient.ListPrivateConnectionsPagedResponse

listPrivateConnections(String parent)

public final DataMigrationServiceClient.ListPrivateConnectionsPagedResponse listPrivateConnections(String parent)

Retrieves a list of private connections 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();
   for (PrivateConnection element :
       dataMigrationServiceClient.listPrivateConnections(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent that owns the collection of private connections.

Returns
TypeDescription
DataMigrationServiceClient.ListPrivateConnectionsPagedResponse

listPrivateConnectionsCallable()

public final UnaryCallable<ListPrivateConnectionsRequest,ListPrivateConnectionsResponse> listPrivateConnectionsCallable()

Retrieves a list of private connections 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()) {
   ListPrivateConnectionsRequest request =
       ListPrivateConnectionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListPrivateConnectionsResponse response =
         dataMigrationServiceClient.listPrivateConnectionsCallable().call(request);
     for (PrivateConnection element : response.getPrivateConnectionsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListPrivateConnectionsRequest,ListPrivateConnectionsResponse>

listPrivateConnectionsPagedCallable()

public final UnaryCallable<ListPrivateConnectionsRequest,DataMigrationServiceClient.ListPrivateConnectionsPagedResponse> listPrivateConnectionsPagedCallable()

Retrieves a list of private connections 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()) {
   ListPrivateConnectionsRequest request =
       ListPrivateConnectionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<PrivateConnection> future =
       dataMigrationServiceClient.listPrivateConnectionsPagedCallable().futureCall(request);
   // Do something.
   for (PrivateConnection element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListPrivateConnectionsRequest,ListPrivateConnectionsPagedResponse>

promoteMigrationJobAsync(PromoteMigrationJobRequest request)

public final OperationFuture<MigrationJob,OperationMetadata> promoteMigrationJobAsync(PromoteMigrationJobRequest request)

Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.

Sample code:


 // 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()) {
   PromoteMigrationJobRequest request =
       PromoteMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .build();
   MigrationJob response = dataMigrationServiceClient.promoteMigrationJobAsync(request).get();
 }
 
Parameter
NameDescription
requestPromoteMigrationJobRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<MigrationJob,OperationMetadata>

promoteMigrationJobCallable()

public final UnaryCallable<PromoteMigrationJobRequest,Operation> promoteMigrationJobCallable()

Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.

Sample code:


 // 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()) {
   PromoteMigrationJobRequest request =
       PromoteMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .build();
   ApiFuture<Operation> future =
       dataMigrationServiceClient.promoteMigrationJobCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<PromoteMigrationJobRequest,Operation>

promoteMigrationJobOperationCallable()

public final OperationCallable<PromoteMigrationJobRequest,MigrationJob,OperationMetadata> promoteMigrationJobOperationCallable()

Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.

Sample code:


 // 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()) {
   PromoteMigrationJobRequest request =
       PromoteMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .build();
   OperationFuture<MigrationJob, OperationMetadata> future =
       dataMigrationServiceClient.promoteMigrationJobOperationCallable().futureCall(request);
   // Do something.
   MigrationJob response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<PromoteMigrationJobRequest,MigrationJob,OperationMetadata>

restartMigrationJobAsync(RestartMigrationJobRequest request)

public final OperationFuture<MigrationJob,OperationMetadata> restartMigrationJobAsync(RestartMigrationJobRequest request)

Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.

Sample code:


 // 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()) {
   RestartMigrationJobRequest request =
       RestartMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .setSkipValidation(true)
           .build();
   MigrationJob response = dataMigrationServiceClient.restartMigrationJobAsync(request).get();
 }
 
Parameter
NameDescription
requestRestartMigrationJobRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<MigrationJob,OperationMetadata>

restartMigrationJobCallable()

public final UnaryCallable<RestartMigrationJobRequest,Operation> restartMigrationJobCallable()

Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.

Sample code:


 // 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()) {
   RestartMigrationJobRequest request =
       RestartMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .setSkipValidation(true)
           .build();
   ApiFuture<Operation> future =
       dataMigrationServiceClient.restartMigrationJobCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<RestartMigrationJobRequest,Operation>

restartMigrationJobOperationCallable()

public final OperationCallable<RestartMigrationJobRequest,MigrationJob,OperationMetadata> restartMigrationJobOperationCallable()

Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.

Sample code:


 // 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()) {
   RestartMigrationJobRequest request =
       RestartMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .setSkipValidation(true)
           .build();
   OperationFuture<MigrationJob, OperationMetadata> future =
       dataMigrationServiceClient.restartMigrationJobOperationCallable().futureCall(request);
   // Do something.
   MigrationJob response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<RestartMigrationJobRequest,MigrationJob,OperationMetadata>

resumeMigrationJobAsync(ResumeMigrationJobRequest request)

public final OperationFuture<MigrationJob,OperationMetadata> resumeMigrationJobAsync(ResumeMigrationJobRequest request)

Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).

Sample code:


 // 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()) {
   ResumeMigrationJobRequest request =
       ResumeMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .build();
   MigrationJob response = dataMigrationServiceClient.resumeMigrationJobAsync(request).get();
 }
 
Parameter
NameDescription
requestResumeMigrationJobRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<MigrationJob,OperationMetadata>

resumeMigrationJobCallable()

public final UnaryCallable<ResumeMigrationJobRequest,Operation> resumeMigrationJobCallable()

Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).

Sample code:


 // 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()) {
   ResumeMigrationJobRequest request =
       ResumeMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .build();
   ApiFuture<Operation> future =
       dataMigrationServiceClient.resumeMigrationJobCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<ResumeMigrationJobRequest,Operation>

resumeMigrationJobOperationCallable()

public final OperationCallable<ResumeMigrationJobRequest,MigrationJob,OperationMetadata> resumeMigrationJobOperationCallable()

Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).

Sample code:


 // 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()) {
   ResumeMigrationJobRequest request =
       ResumeMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .build();
   OperationFuture<MigrationJob, OperationMetadata> future =
       dataMigrationServiceClient.resumeMigrationJobOperationCallable().futureCall(request);
   // Do something.
   MigrationJob response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<ResumeMigrationJobRequest,MigrationJob,OperationMetadata>

rollbackConversionWorkspaceAsync(RollbackConversionWorkspaceRequest request)

public final OperationFuture<ConversionWorkspace,OperationMetadata> rollbackConversionWorkspaceAsync(RollbackConversionWorkspaceRequest request)

Rolls back a conversion workspace to the last committed snapshot.

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()) {
   RollbackConversionWorkspaceRequest request =
       RollbackConversionWorkspaceRequest.newBuilder()
           .setName(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .build();
   ConversionWorkspace response =
       dataMigrationServiceClient.rollbackConversionWorkspaceAsync(request).get();
 }
 
Parameter
NameDescription
requestRollbackConversionWorkspaceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<ConversionWorkspace,OperationMetadata>

rollbackConversionWorkspaceCallable()

public final UnaryCallable<RollbackConversionWorkspaceRequest,Operation> rollbackConversionWorkspaceCallable()

Rolls back a conversion workspace to the last committed snapshot.

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()) {
   RollbackConversionWorkspaceRequest request =
       RollbackConversionWorkspaceRequest.newBuilder()
           .setName(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .build();
   ApiFuture<Operation> future =
       dataMigrationServiceClient.rollbackConversionWorkspaceCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<RollbackConversionWorkspaceRequest,Operation>

rollbackConversionWorkspaceOperationCallable()

public final OperationCallable<RollbackConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> rollbackConversionWorkspaceOperationCallable()

Rolls back a conversion workspace to the last committed snapshot.

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()) {
   RollbackConversionWorkspaceRequest request =
       RollbackConversionWorkspaceRequest.newBuilder()
           .setName(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .build();
   OperationFuture<ConversionWorkspace, OperationMetadata> future =
       dataMigrationServiceClient
           .rollbackConversionWorkspaceOperationCallable()
           .futureCall(request);
   // Do something.
   ConversionWorkspace response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<RollbackConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata>

searchBackgroundJobs(SearchBackgroundJobsRequest request)

public final SearchBackgroundJobsResponse searchBackgroundJobs(SearchBackgroundJobsRequest request)

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.

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()) {
   SearchBackgroundJobsRequest request =
       SearchBackgroundJobsRequest.newBuilder()
           .setConversionWorkspace(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setReturnMostRecentPerJobType(true)
           .setMaxSize(408072700)
           .setCompletedUntilTime(Timestamp.newBuilder().build())
           .build();
   SearchBackgroundJobsResponse response =
       dataMigrationServiceClient.searchBackgroundJobs(request);
 }
 
Parameter
NameDescription
requestSearchBackgroundJobsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SearchBackgroundJobsResponse

searchBackgroundJobsCallable()

public final UnaryCallable<SearchBackgroundJobsRequest,SearchBackgroundJobsResponse> searchBackgroundJobsCallable()

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.

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()) {
   SearchBackgroundJobsRequest request =
       SearchBackgroundJobsRequest.newBuilder()
           .setConversionWorkspace(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setReturnMostRecentPerJobType(true)
           .setMaxSize(408072700)
           .setCompletedUntilTime(Timestamp.newBuilder().build())
           .build();
   ApiFuture<SearchBackgroundJobsResponse> future =
       dataMigrationServiceClient.searchBackgroundJobsCallable().futureCall(request);
   // Do something.
   SearchBackgroundJobsResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<SearchBackgroundJobsRequest,SearchBackgroundJobsResponse>

seedConversionWorkspaceAsync(SeedConversionWorkspaceRequest request)

public final OperationFuture<ConversionWorkspace,OperationMetadata> seedConversionWorkspaceAsync(SeedConversionWorkspaceRequest request)

Imports a snapshot of the source database into the 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()) {
   SeedConversionWorkspaceRequest request =
       SeedConversionWorkspaceRequest.newBuilder()
           .setName(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setAutoCommit(true)
           .build();
   ConversionWorkspace response =
       dataMigrationServiceClient.seedConversionWorkspaceAsync(request).get();
 }
 
Parameter
NameDescription
requestSeedConversionWorkspaceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<ConversionWorkspace,OperationMetadata>

seedConversionWorkspaceCallable()

public final UnaryCallable<SeedConversionWorkspaceRequest,Operation> seedConversionWorkspaceCallable()

Imports a snapshot of the source database into the 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()) {
   SeedConversionWorkspaceRequest request =
       SeedConversionWorkspaceRequest.newBuilder()
           .setName(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setAutoCommit(true)
           .build();
   ApiFuture<Operation> future =
       dataMigrationServiceClient.seedConversionWorkspaceCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<SeedConversionWorkspaceRequest,Operation>

seedConversionWorkspaceOperationCallable()

public final OperationCallable<SeedConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> seedConversionWorkspaceOperationCallable()

Imports a snapshot of the source database into the 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()) {
   SeedConversionWorkspaceRequest request =
       SeedConversionWorkspaceRequest.newBuilder()
           .setName(
               ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
                   .toString())
           .setAutoCommit(true)
           .build();
   OperationFuture<ConversionWorkspace, OperationMetadata> future =
       dataMigrationServiceClient.seedConversionWorkspaceOperationCallable().futureCall(request);
   // Do something.
   ConversionWorkspace response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<SeedConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

startMigrationJobAsync(StartMigrationJobRequest request)

public final OperationFuture<MigrationJob,OperationMetadata> startMigrationJobAsync(StartMigrationJobRequest request)

Start an already created migration job.

Sample code:


 // 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()) {
   StartMigrationJobRequest request =
       StartMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .setSkipValidation(true)
           .build();
   MigrationJob response = dataMigrationServiceClient.startMigrationJobAsync(request).get();
 }
 
Parameter
NameDescription
requestStartMigrationJobRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<MigrationJob,OperationMetadata>

startMigrationJobCallable()

public final UnaryCallable<StartMigrationJobRequest,Operation> startMigrationJobCallable()

Start an already created 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()) {
   StartMigrationJobRequest request =
       StartMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .setSkipValidation(true)
           .build();
   ApiFuture<Operation> future =
       dataMigrationServiceClient.startMigrationJobCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<StartMigrationJobRequest,Operation>

startMigrationJobOperationCallable()

public final OperationCallable<StartMigrationJobRequest,MigrationJob,OperationMetadata> startMigrationJobOperationCallable()

Start an already created 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()) {
   StartMigrationJobRequest request =
       StartMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .setSkipValidation(true)
           .build();
   OperationFuture<MigrationJob, OperationMetadata> future =
       dataMigrationServiceClient.startMigrationJobOperationCallable().futureCall(request);
   // Do something.
   MigrationJob response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<StartMigrationJobRequest,MigrationJob,OperationMetadata>

stopMigrationJobAsync(StopMigrationJobRequest request)

public final OperationFuture<MigrationJob,OperationMetadata> stopMigrationJobAsync(StopMigrationJobRequest request)

Stops a running 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()) {
   StopMigrationJobRequest request =
       StopMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .build();
   MigrationJob response = dataMigrationServiceClient.stopMigrationJobAsync(request).get();
 }
 
Parameter
NameDescription
requestStopMigrationJobRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<MigrationJob,OperationMetadata>

stopMigrationJobCallable()

public final UnaryCallable<StopMigrationJobRequest,Operation> stopMigrationJobCallable()

Stops a running 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()) {
   StopMigrationJobRequest request =
       StopMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .build();
   ApiFuture<Operation> future =
       dataMigrationServiceClient.stopMigrationJobCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<StopMigrationJobRequest,Operation>

stopMigrationJobOperationCallable()

public final OperationCallable<StopMigrationJobRequest,MigrationJob,OperationMetadata> stopMigrationJobOperationCallable()

Stops a running 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()) {
   StopMigrationJobRequest request =
       StopMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .build();
   OperationFuture<MigrationJob, OperationMetadata> future =
       dataMigrationServiceClient.stopMigrationJobOperationCallable().futureCall(request);
   // Do something.
   MigrationJob response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<StopMigrationJobRequest,MigrationJob,OperationMetadata>

updateConnectionProfileAsync(ConnectionProfile connectionProfile, FieldMask updateMask)

public final OperationFuture<ConnectionProfile,OperationMetadata> updateConnectionProfileAsync(ConnectionProfile connectionProfile, FieldMask updateMask)

Update the configuration of a single connection profile.

Sample code:


 // 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()) {
   ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   ConnectionProfile response =
       dataMigrationServiceClient
           .updateConnectionProfileAsync(connectionProfile, updateMask)
           .get();
 }
 
Parameters
NameDescription
connectionProfileConnectionProfile

Required. The connection profile parameters to update.

updateMaskFieldMask

Required. Field mask is used to specify the fields to be overwritten by the update in the conversion workspace resource.

Returns
TypeDescription
OperationFuture<ConnectionProfile,OperationMetadata>

updateConnectionProfileAsync(UpdateConnectionProfileRequest request)

public final OperationFuture<ConnectionProfile,OperationMetadata> updateConnectionProfileAsync(UpdateConnectionProfileRequest request)

Update the configuration of a single connection profile.

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()) {
   UpdateConnectionProfileRequest request =
       UpdateConnectionProfileRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setSkipValidation(true)
           .build();
   ConnectionProfile response =
       dataMigrationServiceClient.updateConnectionProfileAsync(request).get();
 }
 
Parameter
NameDescription
requestUpdateConnectionProfileRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<ConnectionProfile,OperationMetadata>

updateConnectionProfileCallable()

public final UnaryCallable<UpdateConnectionProfileRequest,Operation> updateConnectionProfileCallable()

Update the configuration of a single connection profile.

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()) {
   UpdateConnectionProfileRequest request =
       UpdateConnectionProfileRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setSkipValidation(true)
           .build();
   ApiFuture<Operation> future =
       dataMigrationServiceClient.updateConnectionProfileCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateConnectionProfileRequest,Operation>

updateConnectionProfileOperationCallable()

public final OperationCallable<UpdateConnectionProfileRequest,ConnectionProfile,OperationMetadata> updateConnectionProfileOperationCallable()

Update the configuration of a single connection profile.

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()) {
   UpdateConnectionProfileRequest request =
       UpdateConnectionProfileRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setSkipValidation(true)
           .build();
   OperationFuture<ConnectionProfile, OperationMetadata> future =
       dataMigrationServiceClient.updateConnectionProfileOperationCallable().futureCall(request);
   // Do something.
   ConnectionProfile response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<UpdateConnectionProfileRequest,ConnectionProfile,OperationMetadata>

updateConversionWorkspaceAsync(ConversionWorkspace conversionWorkspace, FieldMask updateMask)

public final OperationFuture<ConversionWorkspace,OperationMetadata> updateConversionWorkspaceAsync(ConversionWorkspace conversionWorkspace, FieldMask updateMask)

Updates the parameters of 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()) {
   ConversionWorkspace conversionWorkspace = ConversionWorkspace.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   ConversionWorkspace response =
       dataMigrationServiceClient
           .updateConversionWorkspaceAsync(conversionWorkspace, updateMask)
           .get();
 }
 
Parameters
NameDescription
conversionWorkspaceConversionWorkspace

Required. The conversion workspace parameters to update.

updateMaskFieldMask

Required. Field mask is used to specify the fields to be overwritten by the update in the conversion workspace resource.

Returns
TypeDescription
OperationFuture<ConversionWorkspace,OperationMetadata>

updateConversionWorkspaceAsync(UpdateConversionWorkspaceRequest request)

public final OperationFuture<ConversionWorkspace,OperationMetadata> updateConversionWorkspaceAsync(UpdateConversionWorkspaceRequest request)

Updates the parameters of 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()) {
   UpdateConversionWorkspaceRequest request =
       UpdateConversionWorkspaceRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConversionWorkspace(ConversionWorkspace.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ConversionWorkspace response =
       dataMigrationServiceClient.updateConversionWorkspaceAsync(request).get();
 }
 
Parameter
NameDescription
requestUpdateConversionWorkspaceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<ConversionWorkspace,OperationMetadata>

updateConversionWorkspaceCallable()

public final UnaryCallable<UpdateConversionWorkspaceRequest,Operation> updateConversionWorkspaceCallable()

Updates the parameters of 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()) {
   UpdateConversionWorkspaceRequest request =
       UpdateConversionWorkspaceRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConversionWorkspace(ConversionWorkspace.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       dataMigrationServiceClient.updateConversionWorkspaceCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateConversionWorkspaceRequest,Operation>

updateConversionWorkspaceOperationCallable()

public final OperationCallable<UpdateConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> updateConversionWorkspaceOperationCallable()

Updates the parameters of 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()) {
   UpdateConversionWorkspaceRequest request =
       UpdateConversionWorkspaceRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConversionWorkspace(ConversionWorkspace.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<ConversionWorkspace, OperationMetadata> future =
       dataMigrationServiceClient
           .updateConversionWorkspaceOperationCallable()
           .futureCall(request);
   // Do something.
   ConversionWorkspace response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<UpdateConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata>

updateMigrationJobAsync(MigrationJob migrationJob, FieldMask updateMask)

public final OperationFuture<MigrationJob,OperationMetadata> updateMigrationJobAsync(MigrationJob migrationJob, FieldMask updateMask)

Updates the parameters of a single migration job.

Sample code:


 // 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()) {
   MigrationJob migrationJob = MigrationJob.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   MigrationJob response =
       dataMigrationServiceClient.updateMigrationJobAsync(migrationJob, updateMask).get();
 }
 
Parameters
NameDescription
migrationJobMigrationJob

Required. The migration job parameters to update.

updateMaskFieldMask

Required. Field mask is used to specify the fields to be overwritten by the update in the conversion workspace resource.

Returns
TypeDescription
OperationFuture<MigrationJob,OperationMetadata>

updateMigrationJobAsync(UpdateMigrationJobRequest request)

public final OperationFuture<MigrationJob,OperationMetadata> updateMigrationJobAsync(UpdateMigrationJobRequest request)

Updates the parameters of 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()) {
   UpdateMigrationJobRequest request =
       UpdateMigrationJobRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setMigrationJob(MigrationJob.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   MigrationJob response = dataMigrationServiceClient.updateMigrationJobAsync(request).get();
 }
 
Parameter
NameDescription
requestUpdateMigrationJobRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<MigrationJob,OperationMetadata>

updateMigrationJobCallable()

public final UnaryCallable<UpdateMigrationJobRequest,Operation> updateMigrationJobCallable()

Updates the parameters of 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()) {
   UpdateMigrationJobRequest request =
       UpdateMigrationJobRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setMigrationJob(MigrationJob.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       dataMigrationServiceClient.updateMigrationJobCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateMigrationJobRequest,Operation>

updateMigrationJobOperationCallable()

public final OperationCallable<UpdateMigrationJobRequest,MigrationJob,OperationMetadata> updateMigrationJobOperationCallable()

Updates the parameters of 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()) {
   UpdateMigrationJobRequest request =
       UpdateMigrationJobRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setMigrationJob(MigrationJob.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<MigrationJob, OperationMetadata> future =
       dataMigrationServiceClient.updateMigrationJobOperationCallable().futureCall(request);
   // Do something.
   MigrationJob response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<UpdateMigrationJobRequest,MigrationJob,OperationMetadata>

verifyMigrationJobAsync(VerifyMigrationJobRequest request)

public final OperationFuture<MigrationJob,OperationMetadata> verifyMigrationJobAsync(VerifyMigrationJobRequest request)

Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.

Sample code:


 // 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()) {
   VerifyMigrationJobRequest request =
       VerifyMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setMigrationJob(MigrationJob.newBuilder().build())
           .build();
   MigrationJob response = dataMigrationServiceClient.verifyMigrationJobAsync(request).get();
 }
 
Parameter
NameDescription
requestVerifyMigrationJobRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<MigrationJob,OperationMetadata>

verifyMigrationJobCallable()

public final UnaryCallable<VerifyMigrationJobRequest,Operation> verifyMigrationJobCallable()

Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.

Sample code:


 // 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()) {
   VerifyMigrationJobRequest request =
       VerifyMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setMigrationJob(MigrationJob.newBuilder().build())
           .build();
   ApiFuture<Operation> future =
       dataMigrationServiceClient.verifyMigrationJobCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<VerifyMigrationJobRequest,Operation>

verifyMigrationJobOperationCallable()

public final OperationCallable<VerifyMigrationJobRequest,MigrationJob,OperationMetadata> verifyMigrationJobOperationCallable()

Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.

Sample code:


 // 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()) {
   VerifyMigrationJobRequest request =
       VerifyMigrationJobRequest.newBuilder()
           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setMigrationJob(MigrationJob.newBuilder().build())
           .build();
   OperationFuture<MigrationJob, OperationMetadata> future =
       dataMigrationServiceClient.verifyMigrationJobOperationCallable().futureCall(request);
   // Do something.
   MigrationJob response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<VerifyMigrationJobRequest,MigrationJob,OperationMetadata>