- 2.52.0 (latest)
- 2.51.0
- 2.50.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.0
- 2.38.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.8
- 2.1.9
GitHub Repository | Product Reference | REST Documentation |
Service Description: Database Migration service
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
MigrationJobName name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]");
MigrationJob response = dataMigrationServiceClient.getMigrationJob(name);
}
Note: close() needs to be called on the DataMigrationServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of DataMigrationServiceSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
DataMigrationServiceSettings dataMigrationServiceSettings =
DataMigrationServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create(dataMigrationServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
DataMigrationServiceSettings dataMigrationServiceSettings =
DataMigrationServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create(dataMigrationServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final DataMigrationServiceClient create()
Constructs an instance of DataMigrationServiceClient with default settings.
Returns | |
---|---|
Type | Description |
DataMigrationServiceClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(DataMigrationServiceSettings settings)
public static final DataMigrationServiceClient create(DataMigrationServiceSettings settings)
Constructs an instance of DataMigrationServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Parameter | |
---|---|
Name | Description |
settings | DataMigrationServiceSettings |
Returns | |
---|---|
Type | Description |
DataMigrationServiceClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(DataMigrationServiceStub stub)
public static final DataMigrationServiceClient create(DataMigrationServiceStub stub)
Constructs an instance of DataMigrationServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(DataMigrationServiceSettings).
Parameter | |
---|---|
Name | Description |
stub | DataMigrationServiceStub |
Returns | |
---|---|
Type | Description |
DataMigrationServiceClient |
Constructors
DataMigrationServiceClient(DataMigrationServiceSettings settings)
protected DataMigrationServiceClient(DataMigrationServiceSettings settings)
Constructs an instance of DataMigrationServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
Parameter | |
---|---|
Name | Description |
settings | DataMigrationServiceSettings |
DataMigrationServiceClient(DataMigrationServiceStub stub)
protected DataMigrationServiceClient(DataMigrationServiceStub stub)
Parameter | |
---|---|
Name | Description |
stub | DataMigrationServiceStub |
Methods
applyConversionWorkspaceAsync(ApplyConversionWorkspaceRequest request)
public final OperationFuture<ConversionWorkspace,OperationMetadata> applyConversionWorkspaceAsync(ApplyConversionWorkspaceRequest request)
Applies draft tree onto a specific destination database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ApplyConversionWorkspaceRequest request =
ApplyConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setFilter("filter-1274492040")
.setDryRun(true)
.setAutoCommit(true)
.build();
ConversionWorkspace response =
dataMigrationServiceClient.applyConversionWorkspaceAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | ApplyConversionWorkspaceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversionWorkspace,OperationMetadata> |
applyConversionWorkspaceCallable()
public final UnaryCallable<ApplyConversionWorkspaceRequest,Operation> applyConversionWorkspaceCallable()
Applies draft tree onto a specific destination database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ApplyConversionWorkspaceRequest request =
ApplyConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setFilter("filter-1274492040")
.setDryRun(true)
.setAutoCommit(true)
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.applyConversionWorkspaceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ApplyConversionWorkspaceRequest,Operation> |
applyConversionWorkspaceOperationCallable()
public final OperationCallable<ApplyConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> applyConversionWorkspaceOperationCallable()
Applies draft tree onto a specific destination database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ApplyConversionWorkspaceRequest request =
ApplyConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setFilter("filter-1274492040")
.setDryRun(true)
.setAutoCommit(true)
.build();
OperationFuture<ConversionWorkspace, OperationMetadata> future =
dataMigrationServiceClient
.applyConversionWorkspaceOperationCallable()
.futureCall(request);
// Do something.
ConversionWorkspace response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<ApplyConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> |
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Parameters | |
---|---|
Name | Description |
duration | long |
unit | TimeUnit |
Returns | |
---|---|
Type | Description |
boolean |
Exceptions | |
---|---|
Type | Description |
InterruptedException |
close()
public final void close()
commitConversionWorkspaceAsync(CommitConversionWorkspaceRequest request)
public final OperationFuture<ConversionWorkspace,OperationMetadata> commitConversionWorkspaceAsync(CommitConversionWorkspaceRequest request)
Marks all the data in the conversion workspace as committed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CommitConversionWorkspaceRequest request =
CommitConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setCommitName("commitName1018078306")
.build();
ConversionWorkspace response =
dataMigrationServiceClient.commitConversionWorkspaceAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | CommitConversionWorkspaceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversionWorkspace,OperationMetadata> |
commitConversionWorkspaceCallable()
public final UnaryCallable<CommitConversionWorkspaceRequest,Operation> commitConversionWorkspaceCallable()
Marks all the data in the conversion workspace as committed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CommitConversionWorkspaceRequest request =
CommitConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setCommitName("commitName1018078306")
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.commitConversionWorkspaceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CommitConversionWorkspaceRequest,Operation> |
commitConversionWorkspaceOperationCallable()
public final OperationCallable<CommitConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> commitConversionWorkspaceOperationCallable()
Marks all the data in the conversion workspace as committed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CommitConversionWorkspaceRequest request =
CommitConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setCommitName("commitName1018078306")
.build();
OperationFuture<ConversionWorkspace, OperationMetadata> future =
dataMigrationServiceClient
.commitConversionWorkspaceOperationCallable()
.futureCall(request);
// Do something.
ConversionWorkspace response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CommitConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> |
convertConversionWorkspaceAsync(ConvertConversionWorkspaceRequest request)
public final OperationFuture<ConversionWorkspace,OperationMetadata> convertConversionWorkspaceAsync(ConvertConversionWorkspaceRequest request)
Creates a draft tree schema for the destination database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConvertConversionWorkspaceRequest request =
ConvertConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setAutoCommit(true)
.setFilter("filter-1274492040")
.setConvertFullPath(true)
.build();
ConversionWorkspace response =
dataMigrationServiceClient.convertConversionWorkspaceAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | ConvertConversionWorkspaceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversionWorkspace,OperationMetadata> |
convertConversionWorkspaceCallable()
public final UnaryCallable<ConvertConversionWorkspaceRequest,Operation> convertConversionWorkspaceCallable()
Creates a draft tree schema for the destination database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConvertConversionWorkspaceRequest request =
ConvertConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setAutoCommit(true)
.setFilter("filter-1274492040")
.setConvertFullPath(true)
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.convertConversionWorkspaceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ConvertConversionWorkspaceRequest,Operation> |
convertConversionWorkspaceOperationCallable()
public final OperationCallable<ConvertConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> convertConversionWorkspaceOperationCallable()
Creates a draft tree schema for the destination database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConvertConversionWorkspaceRequest request =
ConvertConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setAutoCommit(true)
.setFilter("filter-1274492040")
.setConvertFullPath(true)
.build();
OperationFuture<ConversionWorkspace, OperationMetadata> future =
dataMigrationServiceClient
.convertConversionWorkspaceOperationCallable()
.futureCall(request);
// Do something.
ConversionWorkspace response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<ConvertConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> |
createConnectionProfileAsync(CreateConnectionProfileRequest request)
public final OperationFuture<ConnectionProfile,OperationMetadata> createConnectionProfileAsync(CreateConnectionProfileRequest request)
Creates a new connection profile in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConnectionProfileRequest request =
CreateConnectionProfileRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConnectionProfileId("connectionProfileId597575526")
.setConnectionProfile(ConnectionProfile.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.setSkipValidation(true)
.build();
ConnectionProfile response =
dataMigrationServiceClient.createConnectionProfileAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | CreateConnectionProfileRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConnectionProfile,OperationMetadata> |
createConnectionProfileAsync(LocationName parent, ConnectionProfile connectionProfile, String connectionProfileId)
public final OperationFuture<ConnectionProfile,OperationMetadata> createConnectionProfileAsync(LocationName parent, ConnectionProfile connectionProfile, String connectionProfileId)
Creates a new connection profile in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
String connectionProfileId = "connectionProfileId597575526";
ConnectionProfile response =
dataMigrationServiceClient
.createConnectionProfileAsync(parent, connectionProfile, connectionProfileId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent which owns this collection of connection profiles. |
connectionProfile | ConnectionProfile Required. The create request body including the connection profile data |
connectionProfileId | String Required. The connection profile identifier. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConnectionProfile,OperationMetadata> |
createConnectionProfileAsync(String parent, ConnectionProfile connectionProfile, String connectionProfileId)
public final OperationFuture<ConnectionProfile,OperationMetadata> createConnectionProfileAsync(String parent, ConnectionProfile connectionProfile, String connectionProfileId)
Creates a new connection profile in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
String connectionProfileId = "connectionProfileId597575526";
ConnectionProfile response =
dataMigrationServiceClient
.createConnectionProfileAsync(parent, connectionProfile, connectionProfileId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent which owns this collection of connection profiles. |
connectionProfile | ConnectionProfile Required. The create request body including the connection profile data |
connectionProfileId | String Required. The connection profile identifier. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConnectionProfile,OperationMetadata> |
createConnectionProfileCallable()
public final UnaryCallable<CreateConnectionProfileRequest,Operation> createConnectionProfileCallable()
Creates a new connection profile in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConnectionProfileRequest request =
CreateConnectionProfileRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConnectionProfileId("connectionProfileId597575526")
.setConnectionProfile(ConnectionProfile.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.setSkipValidation(true)
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.createConnectionProfileCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateConnectionProfileRequest,Operation> |
createConnectionProfileOperationCallable()
public final OperationCallable<CreateConnectionProfileRequest,ConnectionProfile,OperationMetadata> createConnectionProfileOperationCallable()
Creates a new connection profile in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConnectionProfileRequest request =
CreateConnectionProfileRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConnectionProfileId("connectionProfileId597575526")
.setConnectionProfile(ConnectionProfile.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.setSkipValidation(true)
.build();
OperationFuture<ConnectionProfile, OperationMetadata> future =
dataMigrationServiceClient.createConnectionProfileOperationCallable().futureCall(request);
// Do something.
ConnectionProfile response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateConnectionProfileRequest,ConnectionProfile,OperationMetadata> |
createConversionWorkspaceAsync(CreateConversionWorkspaceRequest request)
public final OperationFuture<ConversionWorkspace,OperationMetadata> createConversionWorkspaceAsync(CreateConversionWorkspaceRequest request)
Creates a new conversion workspace in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConversionWorkspaceRequest request =
CreateConversionWorkspaceRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConversionWorkspaceId("conversionWorkspaceId-928604774")
.setConversionWorkspace(ConversionWorkspace.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ConversionWorkspace response =
dataMigrationServiceClient.createConversionWorkspaceAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | CreateConversionWorkspaceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversionWorkspace,OperationMetadata> |
createConversionWorkspaceAsync(LocationName parent, ConversionWorkspace conversionWorkspace, String conversionWorkspaceId)
public final OperationFuture<ConversionWorkspace,OperationMetadata> createConversionWorkspaceAsync(LocationName parent, ConversionWorkspace conversionWorkspace, String conversionWorkspaceId)
Creates a new conversion workspace in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
ConversionWorkspace conversionWorkspace = ConversionWorkspace.newBuilder().build();
String conversionWorkspaceId = "conversionWorkspaceId-928604774";
ConversionWorkspace response =
dataMigrationServiceClient
.createConversionWorkspaceAsync(parent, conversionWorkspace, conversionWorkspaceId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent which owns this collection of conversion workspaces. |
conversionWorkspace | ConversionWorkspace Required. Represents a conversion workspace object. |
conversionWorkspaceId | String Required. The ID of the conversion workspace to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversionWorkspace,OperationMetadata> |
createConversionWorkspaceAsync(String parent, ConversionWorkspace conversionWorkspace, String conversionWorkspaceId)
public final OperationFuture<ConversionWorkspace,OperationMetadata> createConversionWorkspaceAsync(String parent, ConversionWorkspace conversionWorkspace, String conversionWorkspaceId)
Creates a new conversion workspace in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
ConversionWorkspace conversionWorkspace = ConversionWorkspace.newBuilder().build();
String conversionWorkspaceId = "conversionWorkspaceId-928604774";
ConversionWorkspace response =
dataMigrationServiceClient
.createConversionWorkspaceAsync(parent, conversionWorkspace, conversionWorkspaceId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent which owns this collection of conversion workspaces. |
conversionWorkspace | ConversionWorkspace Required. Represents a conversion workspace object. |
conversionWorkspaceId | String Required. The ID of the conversion workspace to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversionWorkspace,OperationMetadata> |
createConversionWorkspaceCallable()
public final UnaryCallable<CreateConversionWorkspaceRequest,Operation> createConversionWorkspaceCallable()
Creates a new conversion workspace in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConversionWorkspaceRequest request =
CreateConversionWorkspaceRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConversionWorkspaceId("conversionWorkspaceId-928604774")
.setConversionWorkspace(ConversionWorkspace.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.createConversionWorkspaceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateConversionWorkspaceRequest,Operation> |
createConversionWorkspaceOperationCallable()
public final OperationCallable<CreateConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> createConversionWorkspaceOperationCallable()
Creates a new conversion workspace in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateConversionWorkspaceRequest request =
CreateConversionWorkspaceRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConversionWorkspaceId("conversionWorkspaceId-928604774")
.setConversionWorkspace(ConversionWorkspace.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<ConversionWorkspace, OperationMetadata> future =
dataMigrationServiceClient
.createConversionWorkspaceOperationCallable()
.futureCall(request);
// Do something.
ConversionWorkspace response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateConversionWorkspaceRequest,ConversionWorkspace,OperationMetadata> |
createMappingRule(ConversionWorkspaceName parent, MappingRule mappingRule, String mappingRuleId)
public final MappingRule createMappingRule(ConversionWorkspaceName parent, MappingRule mappingRule, String mappingRuleId)
Creates a new mapping rule for a given conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConversionWorkspaceName parent =
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]");
MappingRule mappingRule = MappingRule.newBuilder().build();
String mappingRuleId = "mappingRuleId-900824155";
MappingRule response =
dataMigrationServiceClient.createMappingRule(parent, mappingRule, mappingRuleId);
}
Parameters | |
---|---|
Name | Description |
parent | ConversionWorkspaceName Required. The parent which owns this collection of mapping rules. |
mappingRule | MappingRule Required. Represents a mapping rule object. |
mappingRuleId | String Required. The ID of the rule to create. |
Returns | |
---|---|
Type | Description |
MappingRule |
createMappingRule(CreateMappingRuleRequest request)
public final MappingRule createMappingRule(CreateMappingRuleRequest request)
Creates a new mapping rule for a given conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateMappingRuleRequest request =
CreateMappingRuleRequest.newBuilder()
.setParent(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setMappingRuleId("mappingRuleId-900824155")
.setMappingRule(MappingRule.newBuilder().build())
.setRequestId("requestId693933066")
.build();
MappingRule response = dataMigrationServiceClient.createMappingRule(request);
}
Parameter | |
---|---|
Name | Description |
request | CreateMappingRuleRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
MappingRule |
createMappingRule(String parent, MappingRule mappingRule, String mappingRuleId)
public final MappingRule createMappingRule(String parent, MappingRule mappingRule, String mappingRuleId)
Creates a new mapping rule for a given conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String parent =
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString();
MappingRule mappingRule = MappingRule.newBuilder().build();
String mappingRuleId = "mappingRuleId-900824155";
MappingRule response =
dataMigrationServiceClient.createMappingRule(parent, mappingRule, mappingRuleId);
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent which owns this collection of mapping rules. |
mappingRule | MappingRule Required. Represents a mapping rule object. |
mappingRuleId | String Required. The ID of the rule to create. |
Returns | |
---|---|
Type | Description |
MappingRule |
createMappingRuleCallable()
public final UnaryCallable<CreateMappingRuleRequest,MappingRule> createMappingRuleCallable()
Creates a new mapping rule for a given conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateMappingRuleRequest request =
CreateMappingRuleRequest.newBuilder()
.setParent(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setMappingRuleId("mappingRuleId-900824155")
.setMappingRule(MappingRule.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<MappingRule> future =
dataMigrationServiceClient.createMappingRuleCallable().futureCall(request);
// Do something.
MappingRule response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateMappingRuleRequest,MappingRule> |
createMigrationJobAsync(CreateMigrationJobRequest request)
public final OperationFuture<MigrationJob,OperationMetadata> createMigrationJobAsync(CreateMigrationJobRequest request)
Creates a new migration job in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateMigrationJobRequest request =
CreateMigrationJobRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setMigrationJobId("migrationJobId1870575242")
.setMigrationJob(MigrationJob.newBuilder().build())
.setRequestId("requestId693933066")
.build();
MigrationJob response = dataMigrationServiceClient.createMigrationJobAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | CreateMigrationJobRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
createMigrationJobAsync(LocationName parent, MigrationJob migrationJob, String migrationJobId)
public final OperationFuture<MigrationJob,OperationMetadata> createMigrationJobAsync(LocationName parent, MigrationJob migrationJob, String migrationJobId)
Creates a new migration job in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
MigrationJob migrationJob = MigrationJob.newBuilder().build();
String migrationJobId = "migrationJobId1870575242";
MigrationJob response =
dataMigrationServiceClient
.createMigrationJobAsync(parent, migrationJob, migrationJobId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent which owns this collection of migration jobs. |
migrationJob | MigrationJob Required. Represents a migration job object. |
migrationJobId | String Required. The ID of the instance to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
createMigrationJobAsync(String parent, MigrationJob migrationJob, String migrationJobId)
public final OperationFuture<MigrationJob,OperationMetadata> createMigrationJobAsync(String parent, MigrationJob migrationJob, String migrationJobId)
Creates a new migration job in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
MigrationJob migrationJob = MigrationJob.newBuilder().build();
String migrationJobId = "migrationJobId1870575242";
MigrationJob response =
dataMigrationServiceClient
.createMigrationJobAsync(parent, migrationJob, migrationJobId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent which owns this collection of migration jobs. |
migrationJob | MigrationJob Required. Represents a migration job object. |
migrationJobId | String Required. The ID of the instance to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
createMigrationJobCallable()
public final UnaryCallable<CreateMigrationJobRequest,Operation> createMigrationJobCallable()
Creates a new migration job in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateMigrationJobRequest request =
CreateMigrationJobRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setMigrationJobId("migrationJobId1870575242")
.setMigrationJob(MigrationJob.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.createMigrationJobCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateMigrationJobRequest,Operation> |
createMigrationJobOperationCallable()
public final OperationCallable<CreateMigrationJobRequest,MigrationJob,OperationMetadata> createMigrationJobOperationCallable()
Creates a new migration job in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreateMigrationJobRequest request =
CreateMigrationJobRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setMigrationJobId("migrationJobId1870575242")
.setMigrationJob(MigrationJob.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<MigrationJob, OperationMetadata> future =
dataMigrationServiceClient.createMigrationJobOperationCallable().futureCall(request);
// Do something.
MigrationJob response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateMigrationJobRequest,MigrationJob,OperationMetadata> |
createPrivateConnectionAsync(CreatePrivateConnectionRequest request)
public final OperationFuture<PrivateConnection,OperationMetadata> createPrivateConnectionAsync(CreatePrivateConnectionRequest request)
Creates a new private connection in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreatePrivateConnectionRequest request =
CreatePrivateConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPrivateConnectionId("privateConnectionId-1926654532")
.setPrivateConnection(PrivateConnection.newBuilder().build())
.setRequestId("requestId693933066")
.setSkipValidation(true)
.build();
PrivateConnection response =
dataMigrationServiceClient.createPrivateConnectionAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | CreatePrivateConnectionRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateConnection,OperationMetadata> |
createPrivateConnectionAsync(LocationName parent, PrivateConnection privateConnection, String privateConnectionId)
public final OperationFuture<PrivateConnection,OperationMetadata> createPrivateConnectionAsync(LocationName parent, PrivateConnection privateConnection, String privateConnectionId)
Creates a new private connection in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
PrivateConnection privateConnection = PrivateConnection.newBuilder().build();
String privateConnectionId = "privateConnectionId-1926654532";
PrivateConnection response =
dataMigrationServiceClient
.createPrivateConnectionAsync(parent, privateConnection, privateConnectionId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent that owns the collection of PrivateConnections. |
privateConnection | PrivateConnection Required. The private connection resource to create. |
privateConnectionId | String Required. The private connection identifier. |
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateConnection,OperationMetadata> |
createPrivateConnectionAsync(String parent, PrivateConnection privateConnection, String privateConnectionId)
public final OperationFuture<PrivateConnection,OperationMetadata> createPrivateConnectionAsync(String parent, PrivateConnection privateConnection, String privateConnectionId)
Creates a new private connection in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
PrivateConnection privateConnection = PrivateConnection.newBuilder().build();
String privateConnectionId = "privateConnectionId-1926654532";
PrivateConnection response =
dataMigrationServiceClient
.createPrivateConnectionAsync(parent, privateConnection, privateConnectionId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent that owns the collection of PrivateConnections. |
privateConnection | PrivateConnection Required. The private connection resource to create. |
privateConnectionId | String Required. The private connection identifier. |
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateConnection,OperationMetadata> |
createPrivateConnectionCallable()
public final UnaryCallable<CreatePrivateConnectionRequest,Operation> createPrivateConnectionCallable()
Creates a new private connection in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreatePrivateConnectionRequest request =
CreatePrivateConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPrivateConnectionId("privateConnectionId-1926654532")
.setPrivateConnection(PrivateConnection.newBuilder().build())
.setRequestId("requestId693933066")
.setSkipValidation(true)
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.createPrivateConnectionCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreatePrivateConnectionRequest,Operation> |
createPrivateConnectionOperationCallable()
public final OperationCallable<CreatePrivateConnectionRequest,PrivateConnection,OperationMetadata> createPrivateConnectionOperationCallable()
Creates a new private connection in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
CreatePrivateConnectionRequest request =
CreatePrivateConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPrivateConnectionId("privateConnectionId-1926654532")
.setPrivateConnection(PrivateConnection.newBuilder().build())
.setRequestId("requestId693933066")
.setSkipValidation(true)
.build();
OperationFuture<PrivateConnection, OperationMetadata> future =
dataMigrationServiceClient.createPrivateConnectionOperationCallable().futureCall(request);
// Do something.
PrivateConnection response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreatePrivateConnectionRequest,PrivateConnection,OperationMetadata> |
deleteConnectionProfileAsync(ConnectionProfileName name)
public final OperationFuture<Empty,OperationMetadata> deleteConnectionProfileAsync(ConnectionProfileName name)
Deletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConnectionProfileName name =
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]");
dataMigrationServiceClient.deleteConnectionProfileAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | ConnectionProfileName Required. Name of the connection profile resource to delete. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConnectionProfileAsync(DeleteConnectionProfileRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteConnectionProfileAsync(DeleteConnectionProfileRequest request)
Deletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteConnectionProfileRequest request =
DeleteConnectionProfileRequest.newBuilder()
.setName(
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
.toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
dataMigrationServiceClient.deleteConnectionProfileAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | DeleteConnectionProfileRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConnectionProfileAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteConnectionProfileAsync(String name)
Deletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String name =
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]").toString();
dataMigrationServiceClient.deleteConnectionProfileAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | String Required. Name of the connection profile resource to delete. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConnectionProfileCallable()
public final UnaryCallable<DeleteConnectionProfileRequest,Operation> deleteConnectionProfileCallable()
Deletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteConnectionProfileRequest request =
DeleteConnectionProfileRequest.newBuilder()
.setName(
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
.toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.deleteConnectionProfileCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteConnectionProfileRequest,Operation> |
deleteConnectionProfileOperationCallable()
public final OperationCallable<DeleteConnectionProfileRequest,Empty,OperationMetadata> deleteConnectionProfileOperationCallable()
Deletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteConnectionProfileRequest request =
DeleteConnectionProfileRequest.newBuilder()
.setName(
ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
.toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
OperationFuture<Empty, OperationMetadata> future =
dataMigrationServiceClient.deleteConnectionProfileOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteConnectionProfileRequest,Empty,OperationMetadata> |
deleteConversionWorkspaceAsync(ConversionWorkspaceName name)
public final OperationFuture<Empty,OperationMetadata> deleteConversionWorkspaceAsync(ConversionWorkspaceName name)
Deletes a single conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConversionWorkspaceName name =
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]");
dataMigrationServiceClient.deleteConversionWorkspaceAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | ConversionWorkspaceName Required. Name of the conversion workspace resource to delete. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConversionWorkspaceAsync(DeleteConversionWorkspaceRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteConversionWorkspaceAsync(DeleteConversionWorkspaceRequest request)
Deletes a single conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteConversionWorkspaceRequest request =
DeleteConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
dataMigrationServiceClient.deleteConversionWorkspaceAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | DeleteConversionWorkspaceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConversionWorkspaceAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteConversionWorkspaceAsync(String name)
Deletes a single conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String name =
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString();
dataMigrationServiceClient.deleteConversionWorkspaceAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | String Required. Name of the conversion workspace resource to delete. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConversionWorkspaceCallable()
public final UnaryCallable<DeleteConversionWorkspaceRequest,Operation> deleteConversionWorkspaceCallable()
Deletes a single conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteConversionWorkspaceRequest request =
DeleteConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.deleteConversionWorkspaceCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteConversionWorkspaceRequest,Operation> |
deleteConversionWorkspaceOperationCallable()
public final OperationCallable<DeleteConversionWorkspaceRequest,Empty,OperationMetadata> deleteConversionWorkspaceOperationCallable()
Deletes a single conversion workspace.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteConversionWorkspaceRequest request =
DeleteConversionWorkspaceRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
OperationFuture<Empty, OperationMetadata> future =
dataMigrationServiceClient
.deleteConversionWorkspaceOperationCallable()
.futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteConversionWorkspaceRequest,Empty,OperationMetadata> |
deleteMappingRule(ConversionWorkspaceName name)
public final void deleteMappingRule(ConversionWorkspaceName name)
Deletes a single mapping rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
ConversionWorkspaceName name =
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]");
dataMigrationServiceClient.deleteMappingRule(name);
}
Parameter | |
---|---|
Name | Description |
name | ConversionWorkspaceName Required. Name of the mapping rule resource to delete. |
deleteMappingRule(DeleteMappingRuleRequest request)
public final void deleteMappingRule(DeleteMappingRuleRequest request)
Deletes a single mapping rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteMappingRuleRequest request =
DeleteMappingRuleRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setRequestId("requestId693933066")
.build();
dataMigrationServiceClient.deleteMappingRule(request);
}
Parameter | |
---|---|
Name | Description |
request | DeleteMappingRuleRequest The request object containing all of the parameters for the API call. |
deleteMappingRule(String name)
public final void deleteMappingRule(String name)
Deletes a single mapping rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String name =
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString();
dataMigrationServiceClient.deleteMappingRule(name);
}
Parameter | |
---|---|
Name | Description |
name | String Required. Name of the mapping rule resource to delete. |
deleteMappingRuleCallable()
public final UnaryCallable<DeleteMappingRuleRequest,Empty> deleteMappingRuleCallable()
Deletes a single mapping rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteMappingRuleRequest request =
DeleteMappingRuleRequest.newBuilder()
.setName(
ConversionWorkspaceName.of("[PROJECT]", "[LOCATION]", "[CONVERSION_WORKSPACE]")
.toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Empty> future =
dataMigrationServiceClient.deleteMappingRuleCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteMappingRuleRequest,Empty> |
deleteMigrationJobAsync(DeleteMigrationJobRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteMigrationJobAsync(DeleteMigrationJobRequest request)
Deletes a single migration job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteMigrationJobRequest request =
DeleteMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
dataMigrationServiceClient.deleteMigrationJobAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | DeleteMigrationJobRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteMigrationJobAsync(MigrationJobName name)
public final OperationFuture<Empty,OperationMetadata> deleteMigrationJobAsync(MigrationJobName name)
Deletes a single migration job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
MigrationJobName name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]");
dataMigrationServiceClient.deleteMigrationJobAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | MigrationJobName Required. Name of the migration job resource to delete. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteMigrationJobAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteMigrationJobAsync(String name)
Deletes a single migration job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
String name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString();
dataMigrationServiceClient.deleteMigrationJobAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | String Required. Name of the migration job resource to delete. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteMigrationJobCallable()
public final UnaryCallable<DeleteMigrationJobRequest,Operation> deleteMigrationJobCallable()
Deletes a single migration job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteMigrationJobRequest request =
DeleteMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
ApiFuture<Operation> future =
dataMigrationServiceClient.deleteMigrationJobCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteMigrationJobRequest,Operation> |
deleteMigrationJobOperationCallable()
public final OperationCallable<DeleteMigrationJobRequest,Empty,OperationMetadata> deleteMigrationJobOperationCallable()
Deletes a single migration job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeleteMigrationJobRequest request =
DeleteMigrationJobRequest.newBuilder()
.setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
.setRequestId("requestId693933066")
.setForce(true)
.build();
OperationFuture<Empty, OperationMetadata> future =
dataMigrationServiceClient.deleteMigrationJobOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteMigrationJobRequest,Empty,OperationMetadata> |
deletePrivateConnectionAsync(DeletePrivateConnectionRequest request)
public final OperationFuture<Empty,OperationMetadata> deletePrivateConnectionAsync(DeletePrivateConnectionRequest request)
Deletes a single Database Migration Service private connection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataMigrationServiceClient dataMigrationServiceClient =
DataMigrationServiceClient.create()) {
DeletePrivateConnectionRequest request =
DeletePrivateConnectionRequest.newBuilder()
.setName(
PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
.toString())
.setRequestId("requestId693933066")
.build();
dataMigrationServiceClient.deletePrivateConnectionAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | DeletePrivateConnectionRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | PrivateConnectionName Required. The name of the private connection to delete. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | String Required. The name of the private connection to delete. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | DescribeConversionWorkspaceRevisionsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | DescribeDatabaseEntitiesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | FetchStaticIpsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | LocationName Required. The resource name for the location for which static IPs should be
returned. Must be in the format |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | String Required. The resource name for the location for which static IPs should be
returned. Must be in the format |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | GenerateSshScriptRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | GenerateTcpProxyScriptRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | ConnectionProfileName Required. Name of the connection profile resource to get. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | GetConnectionProfileRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | String Required. Name of the connection profile resource to get. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | ConversionWorkspaceName Required. Name of the conversion workspace resource to get. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | GetConversionWorkspaceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | String Required. Name of the conversion workspace resource to get. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | GetMappingRuleRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | MappingRuleName 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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | String 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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | GetMigrationJobRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | MigrationJobName Required. Name of the migration job resource to get. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | String Required. Name of the migration job resource to get. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
UnaryCallable<GetMigrationJobRequest,MigrationJob> |
getOperationsClient()
public final OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | GetPrivateConnectionRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | PrivateConnectionName Required. The name of the private connection to get. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | String Required. The name of the private connection to get. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
UnaryCallable<GetPrivateConnectionRequest,PrivateConnection> |
getSettings()
public final DataMigrationServiceSettings getSettings()
Returns | |
---|---|
Type | Description |
DataMigrationServiceSettings |
getStub()
public DataMigrationServiceStub getStub()
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | ImportMappingRulesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
OperationCallable<ImportMappingRulesRequest,ConversionWorkspace,OperationMetadata> |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | ListConnectionProfilesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
parent | LocationName Required. The parent which owns this collection of connection profiles. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
parent | String Required. The parent which owns this collection of connection profiles. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | ListConversionWorkspacesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
parent | LocationName Required. The parent which owns this collection of conversion workspaces. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
parent | String Required. The parent which owns this collection of conversion workspaces. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
parent | ConversionWorkspaceName Required. Name of the conversion workspace resource whose mapping rules are listed in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | ListMappingRulesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
parent | String Required. Name of the conversion workspace resource whose mapping rules are listed in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | ListMigrationJobsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
DataMigrationServiceClient.ListMigrationJobsPagedResponse |
listMigrationJobs(LocationName parent)
public final DataMigrationServiceClient.ListMigrationJobsPagedResponse listMigrationJobs(LocationName parent)
Lists migration jobs in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Name | Description |
parent | LocationName Required. The parent which owns this collection of migrationJobs. |
Returns | |
---|---|
Type | Description |
DataMigrationServiceClient.ListMigrationJobsPagedResponse |
listMigrationJobs(String parent)
public final DataMigrationServiceClient.ListMigrationJobsPagedResponse listMigrationJobs(String parent)
Lists migration jobs in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Name | Description |
parent | String Required. The parent which owns this collection of migrationJobs. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | ListPrivateConnectionsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
parent | LocationName Required. The parent that owns the collection of private connections. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
parent | String Required. The parent that owns the collection of private connections. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | PromoteMigrationJobRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
promoteMigrationJobCallable()
public final UnaryCallable<PromoteMigrationJobRequest,Operation> promoteMigrationJobCallable()
Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Type | Description |
UnaryCallable<PromoteMigrationJobRequest,Operation> |
promoteMigrationJobOperationCallable()
public final OperationCallable<PromoteMigrationJobRequest,MigrationJob,OperationMetadata> promoteMigrationJobOperationCallable()
Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Type | Description |
OperationCallable<PromoteMigrationJobRequest,MigrationJob,OperationMetadata> |
restartMigrationJobAsync(RestartMigrationJobRequest request)
public final OperationFuture<MigrationJob,OperationMetadata> restartMigrationJobAsync(RestartMigrationJobRequest request)
Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Name | Description |
request | RestartMigrationJobRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
restartMigrationJobCallable()
public final UnaryCallable<RestartMigrationJobRequest,Operation> restartMigrationJobCallable()
Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Type | Description |
UnaryCallable<RestartMigrationJobRequest,Operation> |
restartMigrationJobOperationCallable()
public final OperationCallable<RestartMigrationJobRequest,MigrationJob,OperationMetadata> restartMigrationJobOperationCallable()
Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Type | Description |
OperationCallable<RestartMigrationJobRequest,MigrationJob,OperationMetadata> |
resumeMigrationJobAsync(ResumeMigrationJobRequest request)
public final OperationFuture<MigrationJob,OperationMetadata> resumeMigrationJobAsync(ResumeMigrationJobRequest request)
Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Name | Description |
request | ResumeMigrationJobRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
resumeMigrationJobCallable()
public final UnaryCallable<ResumeMigrationJobRequest,Operation> resumeMigrationJobCallable()
Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Type | Description |
UnaryCallable<ResumeMigrationJobRequest,Operation> |
resumeMigrationJobOperationCallable()
public final OperationCallable<ResumeMigrationJobRequest,MigrationJob,OperationMetadata> resumeMigrationJobOperationCallable()
Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | RollbackConversionWorkspaceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | SearchBackgroundJobsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | SeedConversionWorkspaceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | StartMigrationJobRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | StopMigrationJobRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
OperationCallable<StopMigrationJobRequest,MigrationJob,OperationMetadata> |
updateConnectionProfileAsync(ConnectionProfile connectionProfile, FieldMask updateMask)
public final OperationFuture<ConnectionProfile,OperationMetadata> updateConnectionProfileAsync(ConnectionProfile connectionProfile, FieldMask updateMask)
Update the configuration of a single connection profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Name | Description |
connectionProfile | ConnectionProfile Required. The connection profile parameters to update. |
updateMask | FieldMask Required. Field mask is used to specify the fields to be overwritten by the update in the conversion workspace resource. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConnectionProfile,OperationMetadata> |
updateConnectionProfileAsync(UpdateConnectionProfileRequest request)
public final OperationFuture<ConnectionProfile,OperationMetadata> updateConnectionProfileAsync(UpdateConnectionProfileRequest request)
Update the configuration of a single connection profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Name | Description |
request | UpdateConnectionProfileRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
conversionWorkspace | ConversionWorkspace Required. The conversion workspace parameters to update. |
updateMask | FieldMask Required. Field mask is used to specify the fields to be overwritten by the update in the conversion workspace resource. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | UpdateConversionWorkspaceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
migrationJob | MigrationJob Required. The migration job parameters to update. |
updateMask | FieldMask Required. Field mask is used to specify the fields to be overwritten by the update in the conversion workspace resource. |
Returns | |
---|---|
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
updateMigrationJobAsync(UpdateMigrationJobRequest request)
public final OperationFuture<MigrationJob,OperationMetadata> updateMigrationJobAsync(UpdateMigrationJobRequest request)
Updates the parameters of a single migration job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Name | Description |
request | UpdateMigrationJobRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
OperationCallable<UpdateMigrationJobRequest,MigrationJob,OperationMetadata> |
verifyMigrationJobAsync(VerifyMigrationJobRequest request)
public final OperationFuture<MigrationJob,OperationMetadata> verifyMigrationJobAsync(VerifyMigrationJobRequest request)
Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Name | Description |
request | VerifyMigrationJobRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<MigrationJob,OperationMetadata> |
verifyMigrationJobCallable()
public final UnaryCallable<VerifyMigrationJobRequest,Operation> verifyMigrationJobCallable()
Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Type | Description |
UnaryCallable<VerifyMigrationJobRequest,Operation> |
verifyMigrationJobOperationCallable()
public final OperationCallable<VerifyMigrationJobRequest,MigrationJob,OperationMetadata> verifyMigrationJobOperationCallable()
Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 | |
---|---|
Type | Description |
OperationCallable<VerifyMigrationJobRequest,MigrationJob,OperationMetadata> |