Class VmMigrationClient (1.33.0)

GitHub RepositoryProduct Reference

Service Description: VM 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   Source response = vmMigrationClient.getSource(name);
 }
 

Note: close() needs to be called on the VmMigrationClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

MethodDescriptionMethod Variants
ListSources

Lists Sources in a given project and location.

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

  • listSources(ListSourcesRequest request)

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

  • listSources(LocationName parent)
  • listSources(String parent)

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

  • listSourcesPagedCallable()
  • listSourcesCallable()
GetSource

Gets details of a single Source.

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

  • getSource(GetSourceRequest request)

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

  • getSource(SourceName name)
  • getSource(String name)

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

  • getSourceCallable()
CreateSource

Creates a new Source in a given project and location.

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

  • createSourceAsync(CreateSourceRequest request)

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

  • createSourceAsync(LocationName parent, Source source, String sourceId)
  • createSourceAsync(String parent, Source source, String sourceId)

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

  • createSourceOperationCallable()
  • createSourceCallable()
UpdateSource

Updates the parameters of a single Source.

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

  • updateSourceAsync(UpdateSourceRequest request)

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

  • updateSourceAsync(Source source, FieldMask updateMask)

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

  • updateSourceOperationCallable()
  • updateSourceCallable()
DeleteSource

Deletes a single Source.

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

  • deleteSourceAsync(DeleteSourceRequest request)

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

  • deleteSourceAsync(SourceName name)
  • deleteSourceAsync(String name)

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

  • deleteSourceOperationCallable()
  • deleteSourceCallable()
FetchInventory

List remote source's inventory of VMs. The remote source is the onprem vCenter (remote in the sense it's not in Compute Engine). The inventory describes the list of existing VMs in that source. Note that this operation lists the VMs on the remote source, as opposed to listing the MigratingVms resources in the vmmigration service.

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

  • fetchInventory(FetchInventoryRequest request)

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

  • fetchInventory(SourceName source)
  • fetchInventory(String source)

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

  • fetchInventoryCallable()
ListUtilizationReports

Lists Utilization Reports of the given Source.

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

  • listUtilizationReports(ListUtilizationReportsRequest request)

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

  • listUtilizationReports(SourceName parent)
  • listUtilizationReports(String parent)

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

  • listUtilizationReportsPagedCallable()
  • listUtilizationReportsCallable()
GetUtilizationReport

Gets a single Utilization Report.

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

  • getUtilizationReport(GetUtilizationReportRequest request)

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

  • getUtilizationReport(UtilizationReportName name)
  • getUtilizationReport(String name)

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

  • getUtilizationReportCallable()
CreateUtilizationReport

Creates a new UtilizationReport.

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

  • createUtilizationReportAsync(CreateUtilizationReportRequest request)

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

  • createUtilizationReportAsync(SourceName parent, UtilizationReport utilizationReport, String utilizationReportId)
  • createUtilizationReportAsync(String parent, UtilizationReport utilizationReport, String utilizationReportId)

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

  • createUtilizationReportOperationCallable()
  • createUtilizationReportCallable()
DeleteUtilizationReport

Deletes a single Utilization Report.

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

  • deleteUtilizationReportAsync(DeleteUtilizationReportRequest request)

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

  • deleteUtilizationReportAsync(UtilizationReportName name)
  • deleteUtilizationReportAsync(String name)

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

  • deleteUtilizationReportOperationCallable()
  • deleteUtilizationReportCallable()
ListDatacenterConnectors

Lists DatacenterConnectors in a given Source.

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

  • listDatacenterConnectors(ListDatacenterConnectorsRequest request)

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

  • listDatacenterConnectors(SourceName parent)
  • listDatacenterConnectors(String parent)

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

  • listDatacenterConnectorsPagedCallable()
  • listDatacenterConnectorsCallable()
GetDatacenterConnector

Gets details of a single DatacenterConnector.

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

  • getDatacenterConnector(GetDatacenterConnectorRequest request)

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

  • getDatacenterConnector(DatacenterConnectorName name)
  • getDatacenterConnector(String name)

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

  • getDatacenterConnectorCallable()
CreateDatacenterConnector

Creates a new DatacenterConnector in a given Source.

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

  • createDatacenterConnectorAsync(CreateDatacenterConnectorRequest request)

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

  • createDatacenterConnectorAsync(SourceName parent, DatacenterConnector datacenterConnector, String datacenterConnectorId)
  • createDatacenterConnectorAsync(String parent, DatacenterConnector datacenterConnector, String datacenterConnectorId)

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

  • createDatacenterConnectorOperationCallable()
  • createDatacenterConnectorCallable()
DeleteDatacenterConnector

Deletes a single DatacenterConnector.

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

  • deleteDatacenterConnectorAsync(DeleteDatacenterConnectorRequest request)

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

  • deleteDatacenterConnectorAsync(DatacenterConnectorName name)
  • deleteDatacenterConnectorAsync(String name)

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

  • deleteDatacenterConnectorOperationCallable()
  • deleteDatacenterConnectorCallable()
UpgradeAppliance

Upgrades the appliance relate to this DatacenterConnector to the in-place updateable version.

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

  • upgradeApplianceAsync(UpgradeApplianceRequest request)

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

  • upgradeApplianceOperationCallable()
  • upgradeApplianceCallable()
CreateMigratingVm

Creates a new MigratingVm in a given Source.

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

  • createMigratingVmAsync(CreateMigratingVmRequest request)

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

  • createMigratingVmAsync(SourceName parent, MigratingVm migratingVm, String migratingVmId)
  • createMigratingVmAsync(String parent, MigratingVm migratingVm, String migratingVmId)

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

  • createMigratingVmOperationCallable()
  • createMigratingVmCallable()
ListMigratingVms

Lists MigratingVms in a given Source.

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

  • listMigratingVms(ListMigratingVmsRequest request)

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

  • listMigratingVms(SourceName parent)
  • listMigratingVms(String parent)

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

  • listMigratingVmsPagedCallable()
  • listMigratingVmsCallable()
GetMigratingVm

Gets details of a single MigratingVm.

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

  • getMigratingVm(GetMigratingVmRequest request)

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

  • getMigratingVm(MigratingVmName name)
  • getMigratingVm(String name)

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

  • getMigratingVmCallable()
UpdateMigratingVm

Updates the parameters of a single MigratingVm.

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

  • updateMigratingVmAsync(UpdateMigratingVmRequest request)

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

  • updateMigratingVmAsync(MigratingVm migratingVm, FieldMask updateMask)

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

  • updateMigratingVmOperationCallable()
  • updateMigratingVmCallable()
DeleteMigratingVm

Deletes a single MigratingVm.

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

  • deleteMigratingVmAsync(DeleteMigratingVmRequest request)

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

  • deleteMigratingVmAsync(MigratingVmName name)
  • deleteMigratingVmAsync(String name)

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

  • deleteMigratingVmOperationCallable()
  • deleteMigratingVmCallable()
StartMigration

Starts migration for a VM. Starts the process of uploading data and creating snapshots, in replication cycles scheduled by the policy.

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

  • startMigrationAsync(StartMigrationRequest request)

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

  • startMigrationAsync(MigratingVmName migratingVm)
  • startMigrationAsync(String migratingVm)

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

  • startMigrationOperationCallable()
  • startMigrationCallable()
ResumeMigration

Resumes a migration for a VM. When called on a paused migration, will start the process of uploading data and creating snapshots; when called on a completed cut-over migration, will update the migration to active state and start the process of uploading data and creating snapshots.

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

  • resumeMigrationAsync(ResumeMigrationRequest request)

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

  • resumeMigrationOperationCallable()
  • resumeMigrationCallable()
PauseMigration

Pauses a migration for a VM. If cycle tasks are running they will be cancelled, preserving source task data. Further replication cycles will not be triggered while the VM is paused.

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

  • pauseMigrationAsync(PauseMigrationRequest request)

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

  • pauseMigrationOperationCallable()
  • pauseMigrationCallable()
FinalizeMigration

Marks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done.

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

  • finalizeMigrationAsync(FinalizeMigrationRequest request)

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

  • finalizeMigrationAsync(MigratingVmName migratingVm)
  • finalizeMigrationAsync(String migratingVm)

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

  • finalizeMigrationOperationCallable()
  • finalizeMigrationCallable()
CreateCloneJob

Initiates a Clone of a specific migrating VM.

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

  • createCloneJobAsync(CreateCloneJobRequest request)

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

  • createCloneJobAsync(MigratingVmName parent, CloneJob cloneJob, String cloneJobId)
  • createCloneJobAsync(String parent, CloneJob cloneJob, String cloneJobId)

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

  • createCloneJobOperationCallable()
  • createCloneJobCallable()
CancelCloneJob

Initiates the cancellation of a running clone job.

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

  • cancelCloneJobAsync(CancelCloneJobRequest request)

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

  • cancelCloneJobAsync(CloneJobName name)
  • cancelCloneJobAsync(String name)

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

  • cancelCloneJobOperationCallable()
  • cancelCloneJobCallable()
ListCloneJobs

Lists CloneJobs of a given migrating VM.

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

  • listCloneJobs(ListCloneJobsRequest request)

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

  • listCloneJobs(MigratingVmName parent)
  • listCloneJobs(String parent)

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

  • listCloneJobsPagedCallable()
  • listCloneJobsCallable()
GetCloneJob

Gets details of a single CloneJob.

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

  • getCloneJob(GetCloneJobRequest request)

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

  • getCloneJob(CloneJobName name)
  • getCloneJob(String name)

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

  • getCloneJobCallable()
CreateCutoverJob

Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover job resource is created and the job is initiated.

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

  • createCutoverJobAsync(CreateCutoverJobRequest request)

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

  • createCutoverJobAsync(MigratingVmName parent, CutoverJob cutoverJob, String cutoverJobId)
  • createCutoverJobAsync(String parent, CutoverJob cutoverJob, String cutoverJobId)

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

  • createCutoverJobOperationCallable()
  • createCutoverJobCallable()
CancelCutoverJob

Initiates the cancellation of a running cutover job.

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

  • cancelCutoverJobAsync(CancelCutoverJobRequest request)

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

  • cancelCutoverJobAsync(CutoverJobName name)
  • cancelCutoverJobAsync(String name)

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

  • cancelCutoverJobOperationCallable()
  • cancelCutoverJobCallable()
ListCutoverJobs

Lists CutoverJobs of a given migrating VM.

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

  • listCutoverJobs(ListCutoverJobsRequest request)

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

  • listCutoverJobs(MigratingVmName parent)
  • listCutoverJobs(String parent)

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

  • listCutoverJobsPagedCallable()
  • listCutoverJobsCallable()
GetCutoverJob

Gets details of a single CutoverJob.

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

  • getCutoverJob(GetCutoverJobRequest request)

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

  • getCutoverJob(CutoverJobName name)
  • getCutoverJob(String name)

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

  • getCutoverJobCallable()
ListGroups

Lists Groups in a given project and location.

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

  • listGroups(ListGroupsRequest request)

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

  • listGroups(LocationName parent)
  • listGroups(String parent)

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

  • listGroupsPagedCallable()
  • listGroupsCallable()
GetGroup

Gets details of a single Group.

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

  • getGroup(GetGroupRequest request)

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

  • getGroup(GroupName name)
  • getGroup(String name)

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

  • getGroupCallable()
CreateGroup

Creates a new Group in a given project and location.

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

  • createGroupAsync(CreateGroupRequest request)

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

  • createGroupAsync(LocationName parent, Group group, String groupId)
  • createGroupAsync(String parent, Group group, String groupId)

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

  • createGroupOperationCallable()
  • createGroupCallable()
UpdateGroup

Updates the parameters of a single Group.

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

  • updateGroupAsync(UpdateGroupRequest request)

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

  • updateGroupAsync(Group group, FieldMask updateMask)

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

  • updateGroupOperationCallable()
  • updateGroupCallable()
DeleteGroup

Deletes a single Group.

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

  • deleteGroupAsync(DeleteGroupRequest request)

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

  • deleteGroupAsync(GroupName name)
  • deleteGroupAsync(String name)

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

  • deleteGroupOperationCallable()
  • deleteGroupCallable()
AddGroupMigration

Adds a MigratingVm to a Group.

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

  • addGroupMigrationAsync(AddGroupMigrationRequest request)

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

  • addGroupMigrationAsync(GroupName group)
  • addGroupMigrationAsync(String group)

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

  • addGroupMigrationOperationCallable()
  • addGroupMigrationCallable()
RemoveGroupMigration

Removes a MigratingVm from a Group.

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

  • removeGroupMigrationAsync(RemoveGroupMigrationRequest request)

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

  • removeGroupMigrationAsync(GroupName group)
  • removeGroupMigrationAsync(String group)

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

  • removeGroupMigrationOperationCallable()
  • removeGroupMigrationCallable()
ListTargetProjects

Lists TargetProjects in a given project.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

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

  • listTargetProjects(ListTargetProjectsRequest request)

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

  • listTargetProjects(LocationName parent)
  • listTargetProjects(String parent)

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

  • listTargetProjectsPagedCallable()
  • listTargetProjectsCallable()
GetTargetProject

Gets details of a single TargetProject.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

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

  • getTargetProject(GetTargetProjectRequest request)

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

  • getTargetProject(TargetProjectName name)
  • getTargetProject(String name)

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

  • getTargetProjectCallable()
CreateTargetProject

Creates a new TargetProject in a given project.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

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

  • createTargetProjectAsync(CreateTargetProjectRequest request)

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

  • createTargetProjectAsync(LocationName parent, TargetProject targetProject, String targetProjectId)
  • createTargetProjectAsync(String parent, TargetProject targetProject, String targetProjectId)

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

  • createTargetProjectOperationCallable()
  • createTargetProjectCallable()
UpdateTargetProject

Updates the parameters of a single TargetProject.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

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

  • updateTargetProjectAsync(UpdateTargetProjectRequest request)

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

  • updateTargetProjectAsync(TargetProject targetProject, FieldMask updateMask)

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

  • updateTargetProjectOperationCallable()
  • updateTargetProjectCallable()
DeleteTargetProject

Deletes a single TargetProject.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

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

  • deleteTargetProjectAsync(DeleteTargetProjectRequest request)

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

  • deleteTargetProjectAsync(TargetProjectName name)
  • deleteTargetProjectAsync(String name)

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

  • deleteTargetProjectOperationCallable()
  • deleteTargetProjectCallable()
ListReplicationCycles

Lists ReplicationCycles in a given MigratingVM.

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

  • listReplicationCycles(ListReplicationCyclesRequest request)

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

  • listReplicationCycles(MigratingVmName parent)
  • listReplicationCycles(String parent)

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

  • listReplicationCyclesPagedCallable()
  • listReplicationCyclesCallable()
GetReplicationCycle

Gets details of a single ReplicationCycle.

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

  • getReplicationCycle(GetReplicationCycleRequest request)

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

  • getReplicationCycle(ReplicationCycleName name)
  • getReplicationCycle(String name)

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

  • getReplicationCycleCallable()
ListLocations

Lists information about the supported locations for this service.

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

  • listLocations(ListLocationsRequest request)

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

  • listLocationsPagedCallable()
  • listLocationsCallable()
GetLocation

Gets information about a location.

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

  • getLocation(GetLocationRequest request)

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

  • getLocationCallable()

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 VmMigrationSettings 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
 VmMigrationSettings vmMigrationSettings =
     VmMigrationSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 VmMigrationClient vmMigrationClient = VmMigrationClient.create(vmMigrationSettings);
 

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
 VmMigrationSettings vmMigrationSettings =
     VmMigrationSettings.newBuilder().setEndpoint(myEndpoint).build();
 VmMigrationClient vmMigrationClient = VmMigrationClient.create(vmMigrationSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 VmMigrationSettings vmMigrationSettings = VmMigrationSettings.newHttpJsonBuilder().build();
 VmMigrationClient vmMigrationClient = VmMigrationClient.create(vmMigrationSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > VmMigrationClient

Static Methods

create()

public static final VmMigrationClient create()

Constructs an instance of VmMigrationClient with default settings.

Returns
TypeDescription
VmMigrationClient
Exceptions
TypeDescription
IOException

create(VmMigrationSettings settings)

public static final VmMigrationClient create(VmMigrationSettings settings)

Constructs an instance of VmMigrationClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
NameDescription
settingsVmMigrationSettings
Returns
TypeDescription
VmMigrationClient
Exceptions
TypeDescription
IOException

create(VmMigrationStub stub)

public static final VmMigrationClient create(VmMigrationStub stub)

Constructs an instance of VmMigrationClient, using the given stub for making calls. This is for advanced usage - prefer using create(VmMigrationSettings).

Parameter
NameDescription
stubVmMigrationStub
Returns
TypeDescription
VmMigrationClient

Constructors

VmMigrationClient(VmMigrationSettings settings)

protected VmMigrationClient(VmMigrationSettings settings)

Constructs an instance of VmMigrationClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
NameDescription
settingsVmMigrationSettings

VmMigrationClient(VmMigrationStub stub)

protected VmMigrationClient(VmMigrationStub stub)
Parameter
NameDescription
stubVmMigrationStub

Methods

addGroupMigrationAsync(AddGroupMigrationRequest request)

public final OperationFuture<AddGroupMigrationResponse,OperationMetadata> addGroupMigrationAsync(AddGroupMigrationRequest request)

Adds a MigratingVm to a Group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   AddGroupMigrationRequest request =
       AddGroupMigrationRequest.newBuilder()
           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   AddGroupMigrationResponse response = vmMigrationClient.addGroupMigrationAsync(request).get();
 }
 
Parameter
NameDescription
requestAddGroupMigrationRequest

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

Returns
TypeDescription
OperationFuture<AddGroupMigrationResponse,OperationMetadata>

addGroupMigrationAsync(GroupName group)

public final OperationFuture<AddGroupMigrationResponse,OperationMetadata> addGroupMigrationAsync(GroupName group)

Adds a MigratingVm to a Group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
   AddGroupMigrationResponse response = vmMigrationClient.addGroupMigrationAsync(group).get();
 }
 
Parameter
NameDescription
groupGroupName

Required. The full path name of the Group to add to.

Returns
TypeDescription
OperationFuture<AddGroupMigrationResponse,OperationMetadata>

addGroupMigrationAsync(String group)

public final OperationFuture<AddGroupMigrationResponse,OperationMetadata> addGroupMigrationAsync(String group)

Adds a MigratingVm to a Group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   String group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
   AddGroupMigrationResponse response = vmMigrationClient.addGroupMigrationAsync(group).get();
 }
 
Parameter
NameDescription
groupString

Required. The full path name of the Group to add to.

Returns
TypeDescription
OperationFuture<AddGroupMigrationResponse,OperationMetadata>

addGroupMigrationCallable()

public final UnaryCallable<AddGroupMigrationRequest,Operation> addGroupMigrationCallable()

Adds a MigratingVm to a Group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   AddGroupMigrationRequest request =
       AddGroupMigrationRequest.newBuilder()
           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.addGroupMigrationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<AddGroupMigrationRequest,Operation>

addGroupMigrationOperationCallable()

public final OperationCallable<AddGroupMigrationRequest,AddGroupMigrationResponse,OperationMetadata> addGroupMigrationOperationCallable()

Adds a MigratingVm to a Group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   AddGroupMigrationRequest request =
       AddGroupMigrationRequest.newBuilder()
           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   OperationFuture<AddGroupMigrationResponse, OperationMetadata> future =
       vmMigrationClient.addGroupMigrationOperationCallable().futureCall(request);
   // Do something.
   AddGroupMigrationResponse response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<AddGroupMigrationRequest,AddGroupMigrationResponse,OperationMetadata>

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

cancelCloneJobAsync(CancelCloneJobRequest request)

public final OperationFuture<CancelCloneJobResponse,OperationMetadata> cancelCloneJobAsync(CancelCloneJobRequest request)

Initiates the cancellation of a running clone 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CancelCloneJobRequest request =
       CancelCloneJobRequest.newBuilder()
           .setName(
               CloneJobName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]")
                   .toString())
           .build();
   CancelCloneJobResponse response = vmMigrationClient.cancelCloneJobAsync(request).get();
 }
 
Parameter
NameDescription
requestCancelCloneJobRequest

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

Returns
TypeDescription
OperationFuture<CancelCloneJobResponse,OperationMetadata>

cancelCloneJobAsync(CloneJobName name)

public final OperationFuture<CancelCloneJobResponse,OperationMetadata> cancelCloneJobAsync(CloneJobName name)

Initiates the cancellation of a running clone 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CloneJobName name =
       CloneJobName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]");
   CancelCloneJobResponse response = vmMigrationClient.cancelCloneJobAsync(name).get();
 }
 
Parameter
NameDescription
nameCloneJobName

Required. The clone job id

Returns
TypeDescription
OperationFuture<CancelCloneJobResponse,OperationMetadata>

cancelCloneJobAsync(String name)

public final OperationFuture<CancelCloneJobResponse,OperationMetadata> cancelCloneJobAsync(String name)

Initiates the cancellation of a running clone 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   String name =
       CloneJobName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]")
           .toString();
   CancelCloneJobResponse response = vmMigrationClient.cancelCloneJobAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The clone job id

Returns
TypeDescription
OperationFuture<CancelCloneJobResponse,OperationMetadata>

cancelCloneJobCallable()

public final UnaryCallable<CancelCloneJobRequest,Operation> cancelCloneJobCallable()

Initiates the cancellation of a running clone 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CancelCloneJobRequest request =
       CancelCloneJobRequest.newBuilder()
           .setName(
               CloneJobName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]")
                   .toString())
           .build();
   ApiFuture<Operation> future = vmMigrationClient.cancelCloneJobCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CancelCloneJobRequest,Operation>

cancelCloneJobOperationCallable()

public final OperationCallable<CancelCloneJobRequest,CancelCloneJobResponse,OperationMetadata> cancelCloneJobOperationCallable()

Initiates the cancellation of a running clone 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CancelCloneJobRequest request =
       CancelCloneJobRequest.newBuilder()
           .setName(
               CloneJobName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]")
                   .toString())
           .build();
   OperationFuture<CancelCloneJobResponse, OperationMetadata> future =
       vmMigrationClient.cancelCloneJobOperationCallable().futureCall(request);
   // Do something.
   CancelCloneJobResponse response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CancelCloneJobRequest,CancelCloneJobResponse,OperationMetadata>

cancelCutoverJobAsync(CancelCutoverJobRequest request)

public final OperationFuture<CancelCutoverJobResponse,OperationMetadata> cancelCutoverJobAsync(CancelCutoverJobRequest request)

Initiates the cancellation of a running cutover 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CancelCutoverJobRequest request =
       CancelCutoverJobRequest.newBuilder()
           .setName(
               CutoverJobName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]")
                   .toString())
           .build();
   CancelCutoverJobResponse response = vmMigrationClient.cancelCutoverJobAsync(request).get();
 }
 
Parameter
NameDescription
requestCancelCutoverJobRequest

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

Returns
TypeDescription
OperationFuture<CancelCutoverJobResponse,OperationMetadata>

cancelCutoverJobAsync(CutoverJobName name)

public final OperationFuture<CancelCutoverJobResponse,OperationMetadata> cancelCutoverJobAsync(CutoverJobName name)

Initiates the cancellation of a running cutover 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CutoverJobName name =
       CutoverJobName.of(
           "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]");
   CancelCutoverJobResponse response = vmMigrationClient.cancelCutoverJobAsync(name).get();
 }
 
Parameter
NameDescription
nameCutoverJobName

Required. The cutover job id

Returns
TypeDescription
OperationFuture<CancelCutoverJobResponse,OperationMetadata>

cancelCutoverJobAsync(String name)

public final OperationFuture<CancelCutoverJobResponse,OperationMetadata> cancelCutoverJobAsync(String name)

Initiates the cancellation of a running cutover 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   String name =
       CutoverJobName.of(
               "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]")
           .toString();
   CancelCutoverJobResponse response = vmMigrationClient.cancelCutoverJobAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The cutover job id

Returns
TypeDescription
OperationFuture<CancelCutoverJobResponse,OperationMetadata>

cancelCutoverJobCallable()

public final UnaryCallable<CancelCutoverJobRequest,Operation> cancelCutoverJobCallable()

Initiates the cancellation of a running cutover 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CancelCutoverJobRequest request =
       CancelCutoverJobRequest.newBuilder()
           .setName(
               CutoverJobName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]")
                   .toString())
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.cancelCutoverJobCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CancelCutoverJobRequest,Operation>

cancelCutoverJobOperationCallable()

public final OperationCallable<CancelCutoverJobRequest,CancelCutoverJobResponse,OperationMetadata> cancelCutoverJobOperationCallable()

Initiates the cancellation of a running cutover 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CancelCutoverJobRequest request =
       CancelCutoverJobRequest.newBuilder()
           .setName(
               CutoverJobName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]")
                   .toString())
           .build();
   OperationFuture<CancelCutoverJobResponse, OperationMetadata> future =
       vmMigrationClient.cancelCutoverJobOperationCallable().futureCall(request);
   // Do something.
   CancelCutoverJobResponse response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CancelCutoverJobRequest,CancelCutoverJobResponse,OperationMetadata>

close()

public final void close()

createCloneJobAsync(CreateCloneJobRequest request)

public final OperationFuture<CloneJob,OperationMetadata> createCloneJobAsync(CreateCloneJobRequest request)

Initiates a Clone of a specific migrating VM.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateCloneJobRequest request =
       CreateCloneJobRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setCloneJobId("cloneJobId2071309915")
           .setCloneJob(CloneJob.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   CloneJob response = vmMigrationClient.createCloneJobAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateCloneJobRequest

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

Returns
TypeDescription
OperationFuture<CloneJob,OperationMetadata>

createCloneJobAsync(MigratingVmName parent, CloneJob cloneJob, String cloneJobId)

public final OperationFuture<CloneJob,OperationMetadata> createCloneJobAsync(MigratingVmName parent, CloneJob cloneJob, String cloneJobId)

Initiates a Clone of a specific migrating VM.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   MigratingVmName parent =
       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   CloneJob cloneJob = CloneJob.newBuilder().build();
   String cloneJobId = "cloneJobId2071309915";
   CloneJob response = vmMigrationClient.createCloneJobAsync(parent, cloneJob, cloneJobId).get();
 }
 
Parameters
NameDescription
parentMigratingVmName

Required. The Clone's parent.

cloneJobCloneJob

Required. The clone request body.

cloneJobIdString

Required. The clone job identifier.

Returns
TypeDescription
OperationFuture<CloneJob,OperationMetadata>

createCloneJobAsync(String parent, CloneJob cloneJob, String cloneJobId)

public final OperationFuture<CloneJob,OperationMetadata> createCloneJobAsync(String parent, CloneJob cloneJob, String cloneJobId)

Initiates a Clone of a specific migrating VM.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   String parent =
       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   CloneJob cloneJob = CloneJob.newBuilder().build();
   String cloneJobId = "cloneJobId2071309915";
   CloneJob response = vmMigrationClient.createCloneJobAsync(parent, cloneJob, cloneJobId).get();
 }
 
Parameters
NameDescription
parentString

Required. The Clone's parent.

cloneJobCloneJob

Required. The clone request body.

cloneJobIdString

Required. The clone job identifier.

Returns
TypeDescription
OperationFuture<CloneJob,OperationMetadata>

createCloneJobCallable()

public final UnaryCallable<CreateCloneJobRequest,Operation> createCloneJobCallable()

Initiates a Clone of a specific migrating VM.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateCloneJobRequest request =
       CreateCloneJobRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setCloneJobId("cloneJobId2071309915")
           .setCloneJob(CloneJob.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = vmMigrationClient.createCloneJobCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateCloneJobRequest,Operation>

createCloneJobOperationCallable()

public final OperationCallable<CreateCloneJobRequest,CloneJob,OperationMetadata> createCloneJobOperationCallable()

Initiates a Clone of a specific migrating VM.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateCloneJobRequest request =
       CreateCloneJobRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setCloneJobId("cloneJobId2071309915")
           .setCloneJob(CloneJob.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<CloneJob, OperationMetadata> future =
       vmMigrationClient.createCloneJobOperationCallable().futureCall(request);
   // Do something.
   CloneJob response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateCloneJobRequest,CloneJob,OperationMetadata>

createCutoverJobAsync(CreateCutoverJobRequest request)

public final OperationFuture<CutoverJob,OperationMetadata> createCutoverJobAsync(CreateCutoverJobRequest request)

Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover job resource is created and the job is initiated.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateCutoverJobRequest request =
       CreateCutoverJobRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setCutoverJobId("cutoverJobId-2003089086")
           .setCutoverJob(CutoverJob.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   CutoverJob response = vmMigrationClient.createCutoverJobAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateCutoverJobRequest

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

Returns
TypeDescription
OperationFuture<CutoverJob,OperationMetadata>

createCutoverJobAsync(MigratingVmName parent, CutoverJob cutoverJob, String cutoverJobId)

public final OperationFuture<CutoverJob,OperationMetadata> createCutoverJobAsync(MigratingVmName parent, CutoverJob cutoverJob, String cutoverJobId)

Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover job resource is created and the job is initiated.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   MigratingVmName parent =
       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   CutoverJob cutoverJob = CutoverJob.newBuilder().build();
   String cutoverJobId = "cutoverJobId-2003089086";
   CutoverJob response =
       vmMigrationClient.createCutoverJobAsync(parent, cutoverJob, cutoverJobId).get();
 }
 
Parameters
NameDescription
parentMigratingVmName

Required. The Cutover's parent.

cutoverJobCutoverJob

Required. The cutover request body.

cutoverJobIdString

Required. The cutover job identifier.

Returns
TypeDescription
OperationFuture<CutoverJob,OperationMetadata>

createCutoverJobAsync(String parent, CutoverJob cutoverJob, String cutoverJobId)

public final OperationFuture<CutoverJob,OperationMetadata> createCutoverJobAsync(String parent, CutoverJob cutoverJob, String cutoverJobId)

Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover job resource is created and the job is initiated.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   String parent =
       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   CutoverJob cutoverJob = CutoverJob.newBuilder().build();
   String cutoverJobId = "cutoverJobId-2003089086";
   CutoverJob response =
       vmMigrationClient.createCutoverJobAsync(parent, cutoverJob, cutoverJobId).get();
 }
 
Parameters
NameDescription
parentString

Required. The Cutover's parent.

cutoverJobCutoverJob

Required. The cutover request body.

cutoverJobIdString

Required. The cutover job identifier.

Returns
TypeDescription
OperationFuture<CutoverJob,OperationMetadata>

createCutoverJobCallable()

public final UnaryCallable<CreateCutoverJobRequest,Operation> createCutoverJobCallable()

Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover job resource is created and the job is initiated.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateCutoverJobRequest request =
       CreateCutoverJobRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setCutoverJobId("cutoverJobId-2003089086")
           .setCutoverJob(CutoverJob.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.createCutoverJobCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateCutoverJobRequest,Operation>

createCutoverJobOperationCallable()

public final OperationCallable<CreateCutoverJobRequest,CutoverJob,OperationMetadata> createCutoverJobOperationCallable()

Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover job resource is created and the job is initiated.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateCutoverJobRequest request =
       CreateCutoverJobRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setCutoverJobId("cutoverJobId-2003089086")
           .setCutoverJob(CutoverJob.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<CutoverJob, OperationMetadata> future =
       vmMigrationClient.createCutoverJobOperationCallable().futureCall(request);
   // Do something.
   CutoverJob response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateCutoverJobRequest,CutoverJob,OperationMetadata>

createDatacenterConnectorAsync(CreateDatacenterConnectorRequest request)

public final OperationFuture<DatacenterConnector,OperationMetadata> createDatacenterConnectorAsync(CreateDatacenterConnectorRequest request)

Creates a new DatacenterConnector in a given Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateDatacenterConnectorRequest request =
       CreateDatacenterConnectorRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setDatacenterConnectorId("datacenterConnectorId-761889719")
           .setDatacenterConnector(DatacenterConnector.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   DatacenterConnector response =
       vmMigrationClient.createDatacenterConnectorAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateDatacenterConnectorRequest

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

Returns
TypeDescription
OperationFuture<DatacenterConnector,OperationMetadata>

createDatacenterConnectorAsync(SourceName parent, DatacenterConnector datacenterConnector, String datacenterConnectorId)

public final OperationFuture<DatacenterConnector,OperationMetadata> createDatacenterConnectorAsync(SourceName parent, DatacenterConnector datacenterConnector, String datacenterConnectorId)

Creates a new DatacenterConnector in a given Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   DatacenterConnector datacenterConnector = DatacenterConnector.newBuilder().build();
   String datacenterConnectorId = "datacenterConnectorId-761889719";
   DatacenterConnector response =
       vmMigrationClient
           .createDatacenterConnectorAsync(parent, datacenterConnector, datacenterConnectorId)
           .get();
 }
 
Parameters
NameDescription
parentSourceName

Required. The DatacenterConnector's parent. Required. The Source in where the new DatacenterConnector will be created. For example: projects/my-project/locations/us-central1/sources/my-source

datacenterConnectorDatacenterConnector

Required. The create request body.

datacenterConnectorIdString

Required. The datacenterConnector identifier.

Returns
TypeDescription
OperationFuture<DatacenterConnector,OperationMetadata>

createDatacenterConnectorAsync(String parent, DatacenterConnector datacenterConnector, String datacenterConnectorId)

public final OperationFuture<DatacenterConnector,OperationMetadata> createDatacenterConnectorAsync(String parent, DatacenterConnector datacenterConnector, String datacenterConnectorId)

Creates a new DatacenterConnector in a given Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   String parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   DatacenterConnector datacenterConnector = DatacenterConnector.newBuilder().build();
   String datacenterConnectorId = "datacenterConnectorId-761889719";
   DatacenterConnector response =
       vmMigrationClient
           .createDatacenterConnectorAsync(parent, datacenterConnector, datacenterConnectorId)
           .get();
 }
 
Parameters
NameDescription
parentString

Required. The DatacenterConnector's parent. Required. The Source in where the new DatacenterConnector will be created. For example: projects/my-project/locations/us-central1/sources/my-source

datacenterConnectorDatacenterConnector

Required. The create request body.

datacenterConnectorIdString

Required. The datacenterConnector identifier.

Returns
TypeDescription
OperationFuture<DatacenterConnector,OperationMetadata>

createDatacenterConnectorCallable()

public final UnaryCallable<CreateDatacenterConnectorRequest,Operation> createDatacenterConnectorCallable()

Creates a new DatacenterConnector in a given Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateDatacenterConnectorRequest request =
       CreateDatacenterConnectorRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setDatacenterConnectorId("datacenterConnectorId-761889719")
           .setDatacenterConnector(DatacenterConnector.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.createDatacenterConnectorCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateDatacenterConnectorRequest,Operation>

createDatacenterConnectorOperationCallable()

public final OperationCallable<CreateDatacenterConnectorRequest,DatacenterConnector,OperationMetadata> createDatacenterConnectorOperationCallable()

Creates a new DatacenterConnector in a given Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateDatacenterConnectorRequest request =
       CreateDatacenterConnectorRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setDatacenterConnectorId("datacenterConnectorId-761889719")
           .setDatacenterConnector(DatacenterConnector.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<DatacenterConnector, OperationMetadata> future =
       vmMigrationClient.createDatacenterConnectorOperationCallable().futureCall(request);
   // Do something.
   DatacenterConnector response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateDatacenterConnectorRequest,DatacenterConnector,OperationMetadata>

createGroupAsync(CreateGroupRequest request)

public final OperationFuture<Group,OperationMetadata> createGroupAsync(CreateGroupRequest request)

Creates a new Group 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateGroupRequest request =
       CreateGroupRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setGroupId("groupId293428218")
           .setGroup(Group.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Group response = vmMigrationClient.createGroupAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateGroupRequest

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

Returns
TypeDescription
OperationFuture<Group,OperationMetadata>

createGroupAsync(LocationName parent, Group group, String groupId)

public final OperationFuture<Group,OperationMetadata> createGroupAsync(LocationName parent, Group group, String groupId)

Creates a new Group 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Group group = Group.newBuilder().build();
   String groupId = "groupId293428218";
   Group response = vmMigrationClient.createGroupAsync(parent, group, groupId).get();
 }
 
Parameters
NameDescription
parentLocationName

Required. The Group's parent.

groupGroup

Required. The create request body.

groupIdString

Required. The group identifier.

Returns
TypeDescription
OperationFuture<Group,OperationMetadata>

createGroupAsync(String parent, Group group, String groupId)

public final OperationFuture<Group,OperationMetadata> createGroupAsync(String parent, Group group, String groupId)

Creates a new Group 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Group group = Group.newBuilder().build();
   String groupId = "groupId293428218";
   Group response = vmMigrationClient.createGroupAsync(parent, group, groupId).get();
 }
 
Parameters
NameDescription
parentString

Required. The Group's parent.

groupGroup

Required. The create request body.

groupIdString

Required. The group identifier.

Returns
TypeDescription
OperationFuture<Group,OperationMetadata>

createGroupCallable()

public final UnaryCallable<CreateGroupRequest,Operation> createGroupCallable()

Creates a new Group 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateGroupRequest request =
       CreateGroupRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setGroupId("groupId293428218")
           .setGroup(Group.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = vmMigrationClient.createGroupCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateGroupRequest,Operation>

createGroupOperationCallable()

public final OperationCallable<CreateGroupRequest,Group,OperationMetadata> createGroupOperationCallable()

Creates a new Group 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateGroupRequest request =
       CreateGroupRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setGroupId("groupId293428218")
           .setGroup(Group.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Group, OperationMetadata> future =
       vmMigrationClient.createGroupOperationCallable().futureCall(request);
   // Do something.
   Group response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateGroupRequest,Group,OperationMetadata>

createMigratingVmAsync(CreateMigratingVmRequest request)

public final OperationFuture<MigratingVm,OperationMetadata> createMigratingVmAsync(CreateMigratingVmRequest request)

Creates a new MigratingVm in a given Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateMigratingVmRequest request =
       CreateMigratingVmRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setMigratingVmId("migratingVmId441244154")
           .setMigratingVm(MigratingVm.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   MigratingVm response = vmMigrationClient.createMigratingVmAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateMigratingVmRequest

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

Returns
TypeDescription
OperationFuture<MigratingVm,OperationMetadata>

createMigratingVmAsync(SourceName parent, MigratingVm migratingVm, String migratingVmId)

public final OperationFuture<MigratingVm,OperationMetadata> createMigratingVmAsync(SourceName parent, MigratingVm migratingVm, String migratingVmId)

Creates a new MigratingVm in a given Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   MigratingVm migratingVm = MigratingVm.newBuilder().build();
   String migratingVmId = "migratingVmId441244154";
   MigratingVm response =
       vmMigrationClient.createMigratingVmAsync(parent, migratingVm, migratingVmId).get();
 }
 
Parameters
NameDescription
parentSourceName

Required. The MigratingVm's parent.

migratingVmMigratingVm

Required. The create request body.

migratingVmIdString

Required. The migratingVm identifier.

Returns
TypeDescription
OperationFuture<MigratingVm,OperationMetadata>

createMigratingVmAsync(String parent, MigratingVm migratingVm, String migratingVmId)

public final OperationFuture<MigratingVm,OperationMetadata> createMigratingVmAsync(String parent, MigratingVm migratingVm, String migratingVmId)

Creates a new MigratingVm in a given Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   String parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   MigratingVm migratingVm = MigratingVm.newBuilder().build();
   String migratingVmId = "migratingVmId441244154";
   MigratingVm response =
       vmMigrationClient.createMigratingVmAsync(parent, migratingVm, migratingVmId).get();
 }
 
Parameters
NameDescription
parentString

Required. The MigratingVm's parent.

migratingVmMigratingVm

Required. The create request body.

migratingVmIdString

Required. The migratingVm identifier.

Returns
TypeDescription
OperationFuture<MigratingVm,OperationMetadata>

createMigratingVmCallable()

public final UnaryCallable<CreateMigratingVmRequest,Operation> createMigratingVmCallable()

Creates a new MigratingVm in a given Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateMigratingVmRequest request =
       CreateMigratingVmRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setMigratingVmId("migratingVmId441244154")
           .setMigratingVm(MigratingVm.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.createMigratingVmCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateMigratingVmRequest,Operation>

createMigratingVmOperationCallable()

public final OperationCallable<CreateMigratingVmRequest,MigratingVm,OperationMetadata> createMigratingVmOperationCallable()

Creates a new MigratingVm in a given Source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateMigratingVmRequest request =
       CreateMigratingVmRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setMigratingVmId("migratingVmId441244154")
           .setMigratingVm(MigratingVm.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<MigratingVm, OperationMetadata> future =
       vmMigrationClient.createMigratingVmOperationCallable().futureCall(request);
   // Do something.
   MigratingVm response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateMigratingVmRequest,MigratingVm,OperationMetadata>

createSourceAsync(CreateSourceRequest request)

public final OperationFuture<Source,OperationMetadata> createSourceAsync(CreateSourceRequest request)

Creates a new Source 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateSourceRequest request =
       CreateSourceRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setSourceId("sourceId1746327190")
           .setSource(Source.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Source response = vmMigrationClient.createSourceAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateSourceRequest

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

Returns
TypeDescription
OperationFuture<Source,OperationMetadata>

createSourceAsync(LocationName parent, Source source, String sourceId)

public final OperationFuture<Source,OperationMetadata> createSourceAsync(LocationName parent, Source source, String sourceId)

Creates a new Source 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Source source = Source.newBuilder().build();
   String sourceId = "sourceId1746327190";
   Source response = vmMigrationClient.createSourceAsync(parent, source, sourceId).get();
 }
 
Parameters
NameDescription
parentLocationName

Required. The Source's parent.

sourceSource

Required. The create request body.

sourceIdString

Required. The source identifier.

Returns
TypeDescription
OperationFuture<Source,OperationMetadata>

createSourceAsync(String parent, Source source, String sourceId)

public final OperationFuture<Source,OperationMetadata> createSourceAsync(String parent, Source source, String sourceId)

Creates a new Source 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Source source = Source.newBuilder().build();
   String sourceId = "sourceId1746327190";
   Source response = vmMigrationClient.createSourceAsync(parent, source, sourceId).get();
 }
 
Parameters
NameDescription
parentString

Required. The Source's parent.

sourceSource

Required. The create request body.

sourceIdString

Required. The source identifier.

Returns
TypeDescription
OperationFuture<Source,OperationMetadata>

createSourceCallable()

public final UnaryCallable<CreateSourceRequest,Operation> createSourceCallable()

Creates a new Source 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateSourceRequest request =
       CreateSourceRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setSourceId("sourceId1746327190")
           .setSource(Source.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = vmMigrationClient.createSourceCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateSourceRequest,Operation>

createSourceOperationCallable()

public final OperationCallable<CreateSourceRequest,Source,OperationMetadata> createSourceOperationCallable()

Creates a new Source 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 (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateSourceRequest request =
       CreateSourceRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setSourceId("sourceId1746327190")
           .setSource(Source.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Source, OperationMetadata> future =
       vmMigrationClient.createSourceOperationCallable().futureCall(request);
   // Do something.
   Source response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateSourceRequest,Source,OperationMetadata>

createTargetProjectAsync(CreateTargetProjectRequest request)

public final OperationFuture<TargetProject,OperationMetadata> createTargetProjectAsync(CreateTargetProjectRequest request)

Creates a new TargetProject in a given project.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateTargetProjectRequest request =
       CreateTargetProjectRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setTargetProjectId("targetProjectId1290130307")
           .setTargetProject(TargetProject.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   TargetProject response = vmMigrationClient.createTargetProjectAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateTargetProjectRequest

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

Returns
TypeDescription
OperationFuture<TargetProject,OperationMetadata>

createTargetProjectAsync(LocationName parent, TargetProject targetProject, String targetProjectId)

public final OperationFuture<TargetProject,OperationMetadata> createTargetProjectAsync(LocationName parent, TargetProject targetProject, String targetProjectId)

Creates a new TargetProject in a given project.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   TargetProject targetProject = TargetProject.newBuilder().build();
   String targetProjectId = "targetProjectId1290130307";
   TargetProject response =
       vmMigrationClient.createTargetProjectAsync(parent, targetProject, targetProjectId).get();
 }
 
Parameters
NameDescription
parentLocationName

Required. The TargetProject's parent.

targetProjectTargetProject

Required. The create request body.

targetProjectIdString

Required. The target_project identifier.

Returns
TypeDescription
OperationFuture<TargetProject,OperationMetadata>

createTargetProjectAsync(String parent, TargetProject targetProject, String targetProjectId)

public final OperationFuture<TargetProject,OperationMetadata> createTargetProjectAsync(String parent, TargetProject targetProject, String targetProjectId)

Creates a new TargetProject in a given project.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   TargetProject targetProject = TargetProject.newBuilder().build();
   String targetProjectId = "targetProjectId1290130307";
   TargetProject response =
       vmMigrationClient.createTargetProjectAsync(parent, targetProject, targetProjectId).get();
 }
 
Parameters
NameDescription
parentString

Required. The TargetProject's parent.

targetProjectTargetProject

Required. The create request body.

targetProjectIdString

Required. The target_project identifier.

Returns
TypeDescription
OperationFuture<TargetProject,OperationMetadata>

createTargetProjectCallable()

public final UnaryCallable<CreateTargetProjectRequest,Operation> createTargetProjectCallable()

Creates a new TargetProject in a given project.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateTargetProjectRequest request =
       CreateTargetProjectRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setTargetProjectId("targetProjectId1290130307")
           .setTargetProject(TargetProject.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.createTargetProjectCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateTargetProjectRequest,Operation>

createTargetProjectOperationCallable()

public final OperationCallable<CreateTargetProjectRequest,TargetProject,OperationMetadata> createTargetProjectOperationCallable()

Creates a new TargetProject in a given project.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateTargetProjectRequest request =
       CreateTargetProjectRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setTargetProjectId("targetProjectId1290130307")
           .setTargetProject(TargetProject.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<TargetProject, OperationMetadata> future =
       vmMigrationClient.createTargetProjectOperationCallable().futureCall(request);
   // Do something.
   TargetProject response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateTargetProjectRequest,TargetProject,OperationMetadata>

createUtilizationReportAsync(CreateUtilizationReportRequest request)

public final OperationFuture<UtilizationReport,OperationMetadata> createUtilizationReportAsync(CreateUtilizationReportRequest request)

Creates a new UtilizationReport.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateUtilizationReportRequest request =
       CreateUtilizationReportRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setUtilizationReport(UtilizationReport.newBuilder().build())
           .setUtilizationReportId("utilizationReportId1215771057")
           .setRequestId("requestId693933066")
           .build();
   UtilizationReport response = vmMigrationClient.createUtilizationReportAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateUtilizationReportRequest

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

Returns
TypeDescription
OperationFuture<UtilizationReport,OperationMetadata>

createUtilizationReportAsync(SourceName parent, UtilizationReport utilizationReport, String utilizationReportId)

public final OperationFuture<UtilizationReport,OperationMetadata> createUtilizationReportAsync(SourceName parent, UtilizationReport utilizationReport, String utilizationReportId)

Creates a new UtilizationReport.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   UtilizationReport utilizationReport = UtilizationReport.newBuilder().build();
   String utilizationReportId = "utilizationReportId1215771057";
   UtilizationReport response =
       vmMigrationClient
           .createUtilizationReportAsync(parent, utilizationReport, utilizationReportId)
           .get();
 }
 
Parameters
NameDescription
parentSourceName

Required. The Utilization Report's parent.

utilizationReportUtilizationReport

Required. The report to create.

utilizationReportIdString

Required. The ID to use for the report, which will become the final component of the reports's resource name.

This value maximum length is 63 characters, and valid characters are /a-z-/. It must start with an english letter and must not end with a hyphen.

Returns
TypeDescription
OperationFuture<UtilizationReport,OperationMetadata>

createUtilizationReportAsync(String parent, UtilizationReport utilizationReport, String utilizationReportId)

public final OperationFuture<UtilizationReport,OperationMetadata> createUtilizationReportAsync(String parent, UtilizationReport utilizationReport, String utilizationReportId)

Creates a new UtilizationReport.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   String parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   UtilizationReport utilizationReport = UtilizationReport.newBuilder().build();
   String utilizationReportId = "utilizationReportId1215771057";
   UtilizationReport response =
       vmMigrationClient
           .createUtilizationReportAsync(parent, utilizationReport, utilizationReportId)
           .get();
 }
 
Parameters
NameDescription
parentString

Required. The Utilization Report's parent.

utilizationReportUtilizationReport

Required. The report to create.

utilizationReportIdString

Required. The ID to use for the report, which will become the final component of the reports's resource name.

This value maximum length is 63 characters, and valid characters are /a-z-/. It must start with an english letter and must not end with a hyphen.

Returns
TypeDescription
OperationFuture<UtilizationReport,OperationMetadata>

createUtilizationReportCallable()

public final UnaryCallable<CreateUtilizationReportRequest,Operation> createUtilizationReportCallable()

Creates a new UtilizationReport.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateUtilizationReportRequest request =
       CreateUtilizationReportRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setUtilizationReport(UtilizationReport.newBuilder().build())
           .setUtilizationReportId("utilizationReportId1215771057")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.createUtilizationReportCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateUtilizationReportRequest,Operation>

createUtilizationReportOperationCallable()

public final OperationCallable<CreateUtilizationReportRequest,UtilizationReport,OperationMetadata> createUtilizationReportOperationCallable()

Creates a new UtilizationReport.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   CreateUtilizationReportRequest request =
       CreateUtilizationReportRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setUtilizationReport(UtilizationReport.newBuilder().build())
           .setUtilizationReportId("utilizationReportId1215771057")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<UtilizationReport, OperationMetadata> future =
       vmMigrationClient.createUtilizationReportOperationCallable().futureCall(request);
   // Do something.
   UtilizationReport response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateUtilizationReportRequest,UtilizationReport,OperationMetadata>

deleteDatacenterConnectorAsync(DatacenterConnectorName name)

public final OperationFuture<Empty,OperationMetadata> deleteDatacenterConnectorAsync(DatacenterConnectorName name)

Deletes a single DatacenterConnector.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   DatacenterConnectorName name