Class VmMigrationClient (1.45.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().

Methods
Method Description Method 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
Type Description
VmMigrationClient
Exceptions
Type Description
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
Name Description
settings VmMigrationSettings
Returns
Type Description
VmMigrationClient
Exceptions
Type Description
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
Name Description
stub VmMigrationStub
Returns
Type Description
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
Name Description
settings VmMigrationSettings

VmMigrationClient(VmMigrationStub stub)

protected VmMigrationClient(VmMigrationStub stub)
Parameter
Name Description
stub VmMigrationStub

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
Name Description
request AddGroupMigrationRequest

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

Returns
Type Description
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
Name Description
group GroupName

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

Returns
Type Description
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
Name Description
group String

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

Returns
Type Description
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
Type Description
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
Type Description
OperationCallable<AddGroupMigrationRequest,AddGroupMigrationResponse,OperationMetadata>

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

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
Name Description
request CancelCloneJobRequest

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

Returns
Type Description
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
Name Description
name CloneJobName

Required. The clone job id

Returns
Type Description
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
Name Description
name String

Required. The clone job id

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
request CancelCutoverJobRequest

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

Returns
Type Description
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
Name Description
name CutoverJobName

Required. The cutover job id

Returns
Type Description
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
Name Description
name String

Required. The cutover job id

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
request CreateCloneJobRequest

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

Returns
Type Description
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
Name Description
parent MigratingVmName

Required. The Clone's parent.

cloneJob CloneJob

Required. The clone request body.

cloneJobId String

Required. The clone job identifier.

Returns
Type Description
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
Name Description
parent String

Required. The Clone's parent.

cloneJob CloneJob

Required. The clone request body.

cloneJobId String

Required. The clone job identifier.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
request CreateCutoverJobRequest

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

Returns
Type Description
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
Name Description
parent MigratingVmName

Required. The Cutover's parent.

cutoverJob CutoverJob

Required. The cutover request body.

cutoverJobId String

Required. The cutover job identifier.

Returns
Type Description
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
Name Description
parent String

Required. The Cutover's parent.

cutoverJob CutoverJob

Required. The cutover request body.

cutoverJobId String

Required. The cutover job identifier.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
request CreateDatacenterConnectorRequest

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

Returns
Type Description
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
Name Description
parent SourceName

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

datacenterConnector DatacenterConnector

Required. The create request body.

datacenterConnectorId String

Required. The datacenterConnector identifier.

Returns
Type Description
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
Name Description
parent String

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

datacenterConnector DatacenterConnector

Required. The create request body.

datacenterConnectorId String

Required. The datacenterConnector identifier.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
request CreateGroupRequest

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

Returns
Type Description
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
Name Description
parent LocationName

Required. The Group's parent.

group Group

Required. The create request body.

groupId String

Required. The group identifier.

Returns
Type Description
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
Name Description
parent String

Required. The Group's parent.

group Group

Required. The create request body.

groupId String

Required. The group identifier.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
request CreateMigratingVmRequest

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

Returns
Type Description
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
Name Description
parent SourceName

Required. The MigratingVm's parent.

migratingVm MigratingVm

Required. The create request body.

migratingVmId String

Required. The migratingVm identifier.

Returns
Type Description
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
Name Description
parent String

Required. The MigratingVm's parent.

migratingVm MigratingVm

Required. The create request body.

migratingVmId String

Required. The migratingVm identifier.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
request CreateSourceRequest

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

Returns
Type Description
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
Name Description
parent LocationName

Required. The Source's parent.

source Source

Required. The create request body.

sourceId String

Required. The source identifier.

Returns
Type Description
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
Name Description
parent String

Required. The Source's parent.

source Source

Required. The create request body.

sourceId String

Required. The source identifier.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
request CreateTargetProjectRequest

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

Returns
Type Description
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
Name Description
parent LocationName

Required. The TargetProject's parent.

targetProject TargetProject

Required. The create request body.

targetProjectId String

Required. The target_project identifier.

Returns
Type Description
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
Name Description
parent String

Required. The TargetProject's parent.

targetProject TargetProject

Required. The create request body.

targetProjectId String

Required. The target_project identifier.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
request CreateUtilizationReportRequest

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

Returns
Type Description
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
Name Description
parent SourceName

Required. The Utilization Report's parent.

utilizationReport UtilizationReport

Required. The report to create.

utilizationReportId String

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
Type Description
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
Name Description
parent String

Required. The Utilization Report's parent.

utilizationReport UtilizationReport

Required. The report to create.

utilizationReportId String

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
Type Description
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
Type Description
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
Type Description
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 =
       DatacenterConnectorName.of(
           "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]");
   vmMigrationClient.deleteDatacenterConnectorAsync(name).get();
 }
 
Parameter
Name Description
name DatacenterConnectorName

Required. The DatacenterConnector name.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteDatacenterConnectorAsync(DeleteDatacenterConnectorRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteDatacenterConnectorAsync(DeleteDatacenterConnectorRequest request)

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()) {
   DeleteDatacenterConnectorRequest request =
       DeleteDatacenterConnectorRequest.newBuilder()
           .setName(
               DatacenterConnectorName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   vmMigrationClient.deleteDatacenterConnectorAsync(request).get();
 }
 
Parameter
Name Description
request DeleteDatacenterConnectorRequest

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

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteDatacenterConnectorAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteDatacenterConnectorAsync(String 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()) {
   String name =
       DatacenterConnectorName.of(
               "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
           .toString();
   vmMigrationClient.deleteDatacenterConnectorAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The DatacenterConnector name.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteDatacenterConnectorCallable()

public final UnaryCallable<DeleteDatacenterConnectorRequest,Operation> deleteDatacenterConnectorCallable()

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()) {
   DeleteDatacenterConnectorRequest request =
       DeleteDatacenterConnectorRequest.newBuilder()
           .setName(
               DatacenterConnectorName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.deleteDatacenterConnectorCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteDatacenterConnectorRequest,Operation>

deleteDatacenterConnectorOperationCallable()

public final OperationCallable<DeleteDatacenterConnectorRequest,Empty,OperationMetadata> deleteDatacenterConnectorOperationCallable()

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()) {
   DeleteDatacenterConnectorRequest request =
       DeleteDatacenterConnectorRequest.newBuilder()
           .setName(
               DatacenterConnectorName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       vmMigrationClient.deleteDatacenterConnectorOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteDatacenterConnectorRequest,Empty,OperationMetadata>

deleteGroupAsync(DeleteGroupRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteGroupAsync(DeleteGroupRequest request)

Deletes a single 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()) {
   DeleteGroupRequest request =
       DeleteGroupRequest.newBuilder()
           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
           .setRequestId("requestId693933066")
           .build();
   vmMigrationClient.deleteGroupAsync(request).get();
 }
 
Parameter
Name Description
request DeleteGroupRequest

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

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGroupAsync(GroupName name)

public final OperationFuture<Empty,OperationMetadata> deleteGroupAsync(GroupName name)

Deletes a single 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 name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
   vmMigrationClient.deleteGroupAsync(name).get();
 }
 
Parameter
Name Description
name GroupName

Required. The Group name.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGroupAsync(String name)

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

Deletes a single 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 name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
   vmMigrationClient.deleteGroupAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The Group name.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGroupCallable()

public final UnaryCallable<DeleteGroupRequest,Operation> deleteGroupCallable()

Deletes a single 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()) {
   DeleteGroupRequest request =
       DeleteGroupRequest.newBuilder()
           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = vmMigrationClient.deleteGroupCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteGroupRequest,Operation>

deleteGroupOperationCallable()

public final OperationCallable<DeleteGroupRequest,Empty,OperationMetadata> deleteGroupOperationCallable()

Deletes a single 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()) {
   DeleteGroupRequest request =
       DeleteGroupRequest.newBuilder()
           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       vmMigrationClient.deleteGroupOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteGroupRequest,Empty,OperationMetadata>

deleteMigratingVmAsync(DeleteMigratingVmRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteMigratingVmAsync(DeleteMigratingVmRequest request)

Deletes a single MigratingVm.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   DeleteMigratingVmRequest request =
       DeleteMigratingVmRequest.newBuilder()
           .setName(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   vmMigrationClient.deleteMigratingVmAsync(request).get();
 }
 
Parameter
Name Description
request DeleteMigratingVmRequest

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

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteMigratingVmAsync(MigratingVmName name)

public final OperationFuture<Empty,OperationMetadata> deleteMigratingVmAsync(MigratingVmName name)

Deletes a single MigratingVm.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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 name =
       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   vmMigrationClient.deleteMigratingVmAsync(name).get();
 }
 
Parameter
Name Description
name MigratingVmName

Required. The name of the MigratingVm.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteMigratingVmAsync(String name)

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

Deletes a single MigratingVm.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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 =
       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   vmMigrationClient.deleteMigratingVmAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the MigratingVm.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteMigratingVmCallable()

public final UnaryCallable<DeleteMigratingVmRequest,Operation> deleteMigratingVmCallable()

Deletes a single MigratingVm.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   DeleteMigratingVmRequest request =
       DeleteMigratingVmRequest.newBuilder()
           .setName(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.deleteMigratingVmCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteMigratingVmRequest,Operation>

deleteMigratingVmOperationCallable()

public final OperationCallable<DeleteMigratingVmRequest,Empty,OperationMetadata> deleteMigratingVmOperationCallable()

Deletes a single MigratingVm.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   DeleteMigratingVmRequest request =
       DeleteMigratingVmRequest.newBuilder()
           .setName(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       vmMigrationClient.deleteMigratingVmOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteMigratingVmRequest,Empty,OperationMetadata>

deleteSourceAsync(DeleteSourceRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteSourceAsync(DeleteSourceRequest request)

Deletes a single 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()) {
   DeleteSourceRequest request =
       DeleteSourceRequest.newBuilder()
           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setRequestId("requestId693933066")
           .build();
   vmMigrationClient.deleteSourceAsync(request).get();
 }
 
Parameter
Name Description
request DeleteSourceRequest

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

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteSourceAsync(SourceName name)

public final OperationFuture<Empty,OperationMetadata> deleteSourceAsync(SourceName name)

Deletes a single 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 name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   vmMigrationClient.deleteSourceAsync(name).get();
 }
 
Parameter
Name Description
name SourceName

Required. The Source name.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteSourceAsync(String name)

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

Deletes a single 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 name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   vmMigrationClient.deleteSourceAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The Source name.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteSourceCallable()

public final UnaryCallable<DeleteSourceRequest,Operation> deleteSourceCallable()

Deletes a single 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()) {
   DeleteSourceRequest request =
       DeleteSourceRequest.newBuilder()
           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = vmMigrationClient.deleteSourceCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteSourceRequest,Operation>

deleteSourceOperationCallable()

public final OperationCallable<DeleteSourceRequest,Empty,OperationMetadata> deleteSourceOperationCallable()

Deletes a single 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()) {
   DeleteSourceRequest request =
       DeleteSourceRequest.newBuilder()
           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       vmMigrationClient.deleteSourceOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteSourceRequest,Empty,OperationMetadata>

deleteTargetProjectAsync(DeleteTargetProjectRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteTargetProjectAsync(DeleteTargetProjectRequest request)

Deletes a single TargetProject.

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()) {
   DeleteTargetProjectRequest request =
       DeleteTargetProjectRequest.newBuilder()
           .setName(
               TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]").toString())
           .setRequestId("requestId693933066")
           .build();
   vmMigrationClient.deleteTargetProjectAsync(request).get();
 }
 
Parameter
Name Description
request DeleteTargetProjectRequest

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

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteTargetProjectAsync(TargetProjectName name)

public final OperationFuture<Empty,OperationMetadata> deleteTargetProjectAsync(TargetProjectName name)

Deletes a single TargetProject.

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()) {
   TargetProjectName name = TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]");
   vmMigrationClient.deleteTargetProjectAsync(name).get();
 }
 
Parameter
Name Description
name TargetProjectName

Required. The TargetProject name.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteTargetProjectAsync(String name)

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

Deletes a single TargetProject.

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 name = TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]").toString();
   vmMigrationClient.deleteTargetProjectAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The TargetProject name.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteTargetProjectCallable()

public final UnaryCallable<DeleteTargetProjectRequest,Operation> deleteTargetProjectCallable()

Deletes a single TargetProject.

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()) {
   DeleteTargetProjectRequest request =
       DeleteTargetProjectRequest.newBuilder()
           .setName(
               TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]").toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.deleteTargetProjectCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteTargetProjectRequest,Operation>

deleteTargetProjectOperationCallable()

public final OperationCallable<DeleteTargetProjectRequest,Empty,OperationMetadata> deleteTargetProjectOperationCallable()

Deletes a single TargetProject.

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()) {
   DeleteTargetProjectRequest request =
       DeleteTargetProjectRequest.newBuilder()
           .setName(
               TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]").toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       vmMigrationClient.deleteTargetProjectOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteTargetProjectRequest,Empty,OperationMetadata>

deleteUtilizationReportAsync(DeleteUtilizationReportRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteUtilizationReportAsync(DeleteUtilizationReportRequest request)

Deletes a single Utilization Report.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   DeleteUtilizationReportRequest request =
       DeleteUtilizationReportRequest.newBuilder()
           .setName(
               UtilizationReportName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   vmMigrationClient.deleteUtilizationReportAsync(request).get();
 }
 
Parameter
Name Description
request DeleteUtilizationReportRequest

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

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteUtilizationReportAsync(UtilizationReportName name)

public final OperationFuture<Empty,OperationMetadata> deleteUtilizationReportAsync(UtilizationReportName name)

Deletes a single Utilization Report.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   UtilizationReportName name =
       UtilizationReportName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]");
   vmMigrationClient.deleteUtilizationReportAsync(name).get();
 }
 
Parameter
Name Description
name UtilizationReportName

Required. The Utilization Report name.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteUtilizationReportAsync(String name)

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

Deletes a single Utilization Report.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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 =
       UtilizationReportName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]")
           .toString();
   vmMigrationClient.deleteUtilizationReportAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The Utilization Report name.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteUtilizationReportCallable()

public final UnaryCallable<DeleteUtilizationReportRequest,Operation> deleteUtilizationReportCallable()

Deletes a single Utilization Report.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   DeleteUtilizationReportRequest request =
       DeleteUtilizationReportRequest.newBuilder()
           .setName(
               UtilizationReportName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.deleteUtilizationReportCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteUtilizationReportRequest,Operation>

deleteUtilizationReportOperationCallable()

public final OperationCallable<DeleteUtilizationReportRequest,Empty,OperationMetadata> deleteUtilizationReportOperationCallable()

Deletes a single Utilization Report.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   DeleteUtilizationReportRequest request =
       DeleteUtilizationReportRequest.newBuilder()
           .setName(
               UtilizationReportName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       vmMigrationClient.deleteUtilizationReportOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteUtilizationReportRequest,Empty,OperationMetadata>

fetchInventory(FetchInventoryRequest request)

public final FetchInventoryResponse fetchInventory(FetchInventoryRequest request)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   FetchInventoryRequest request =
       FetchInventoryRequest.newBuilder()
           .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setForceRefresh(true)
           .build();
   FetchInventoryResponse response = vmMigrationClient.fetchInventory(request);
 }
 
Parameter
Name Description
request FetchInventoryRequest

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

Returns
Type Description
FetchInventoryResponse

fetchInventory(SourceName source)

public final FetchInventoryResponse fetchInventory(SourceName source)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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 source = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   FetchInventoryResponse response = vmMigrationClient.fetchInventory(source);
 }
 
Parameter
Name Description
source SourceName

Required. The name of the Source.

Returns
Type Description
FetchInventoryResponse

fetchInventory(String source)

public final FetchInventoryResponse fetchInventory(String source)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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 source = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   FetchInventoryResponse response = vmMigrationClient.fetchInventory(source);
 }
 
Parameter
Name Description
source String

Required. The name of the Source.

Returns
Type Description
FetchInventoryResponse

fetchInventoryCallable()

public final UnaryCallable<FetchInventoryRequest,FetchInventoryResponse> fetchInventoryCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   FetchInventoryRequest request =
       FetchInventoryRequest.newBuilder()
           .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setForceRefresh(true)
           .build();
   ApiFuture<FetchInventoryResponse> future =
       vmMigrationClient.fetchInventoryCallable().futureCall(request);
   // Do something.
   FetchInventoryResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<FetchInventoryRequest,FetchInventoryResponse>

finalizeMigrationAsync(FinalizeMigrationRequest request)

public final OperationFuture<FinalizeMigrationResponse,OperationMetadata> finalizeMigrationAsync(FinalizeMigrationRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   FinalizeMigrationRequest request =
       FinalizeMigrationRequest.newBuilder()
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   FinalizeMigrationResponse response = vmMigrationClient.finalizeMigrationAsync(request).get();
 }
 
Parameter
Name Description
request FinalizeMigrationRequest

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

Returns
Type Description
OperationFuture<FinalizeMigrationResponse,OperationMetadata>

finalizeMigrationAsync(MigratingVmName migratingVm)

public final OperationFuture<FinalizeMigrationResponse,OperationMetadata> finalizeMigrationAsync(MigratingVmName migratingVm)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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 migratingVm =
       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   FinalizeMigrationResponse response =
       vmMigrationClient.finalizeMigrationAsync(migratingVm).get();
 }
 
Parameter
Name Description
migratingVm MigratingVmName

Required. The name of the MigratingVm.

Returns
Type Description
OperationFuture<FinalizeMigrationResponse,OperationMetadata>

finalizeMigrationAsync(String migratingVm)

public final OperationFuture<FinalizeMigrationResponse,OperationMetadata> finalizeMigrationAsync(String migratingVm)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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 migratingVm =
       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   FinalizeMigrationResponse response =
       vmMigrationClient.finalizeMigrationAsync(migratingVm).get();
 }
 
Parameter
Name Description
migratingVm String

Required. The name of the MigratingVm.

Returns
Type Description
OperationFuture<FinalizeMigrationResponse,OperationMetadata>

finalizeMigrationCallable()

public final UnaryCallable<FinalizeMigrationRequest,Operation> finalizeMigrationCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   FinalizeMigrationRequest request =
       FinalizeMigrationRequest.newBuilder()
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.finalizeMigrationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<FinalizeMigrationRequest,Operation>

finalizeMigrationOperationCallable()

public final OperationCallable<FinalizeMigrationRequest,FinalizeMigrationResponse,OperationMetadata> finalizeMigrationOperationCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   FinalizeMigrationRequest request =
       FinalizeMigrationRequest.newBuilder()
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   OperationFuture<FinalizeMigrationResponse, OperationMetadata> future =
       vmMigrationClient.finalizeMigrationOperationCallable().futureCall(request);
   // Do something.
   FinalizeMigrationResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<FinalizeMigrationRequest,FinalizeMigrationResponse,OperationMetadata>

getCloneJob(CloneJobName name)

public final CloneJob getCloneJob(CloneJobName name)

Gets details of a single CloneJob.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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]");
   CloneJob response = vmMigrationClient.getCloneJob(name);
 }
 
Parameter
Name Description
name CloneJobName

Required. The name of the CloneJob.

Returns
Type Description
CloneJob

getCloneJob(GetCloneJobRequest request)

public final CloneJob getCloneJob(GetCloneJobRequest request)

Gets details of a single CloneJob.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   GetCloneJobRequest request =
       GetCloneJobRequest.newBuilder()
           .setName(
               CloneJobName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]")
                   .toString())
           .build();
   CloneJob response = vmMigrationClient.getCloneJob(request);
 }
 
Parameter
Name Description
request GetCloneJobRequest

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

Returns
Type Description
CloneJob

getCloneJob(String name)

public final CloneJob getCloneJob(String name)

Gets details of a single CloneJob.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
   CloneJob response = vmMigrationClient.getCloneJob(name);
 }
 
Parameter
Name Description
name String

Required. The name of the CloneJob.

Returns
Type Description
CloneJob

getCloneJobCallable()

public final UnaryCallable<GetCloneJobRequest,CloneJob> getCloneJobCallable()

Gets details of a single CloneJob.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   GetCloneJobRequest request =
       GetCloneJobRequest.newBuilder()
           .setName(
               CloneJobName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]")
                   .toString())
           .build();
   ApiFuture<CloneJob> future = vmMigrationClient.getCloneJobCallable().futureCall(request);
   // Do something.
   CloneJob response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetCloneJobRequest,CloneJob>

getCutoverJob(CutoverJobName name)

public final CutoverJob getCutoverJob(CutoverJobName name)

Gets details of a single CutoverJob.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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]");
   CutoverJob response = vmMigrationClient.getCutoverJob(name);
 }
 
Parameter
Name Description
name CutoverJobName

Required. The name of the CutoverJob.

Returns
Type Description
CutoverJob

getCutoverJob(GetCutoverJobRequest request)

public final CutoverJob getCutoverJob(GetCutoverJobRequest request)

Gets details of a single CutoverJob.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   GetCutoverJobRequest request =
       GetCutoverJobRequest.newBuilder()
           .setName(
               CutoverJobName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]")
                   .toString())
           .build();
   CutoverJob response = vmMigrationClient.getCutoverJob(request);
 }
 
Parameter
Name Description
request GetCutoverJobRequest

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

Returns
Type Description
CutoverJob

getCutoverJob(String name)

public final CutoverJob getCutoverJob(String name)

Gets details of a single CutoverJob.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
   CutoverJob response = vmMigrationClient.getCutoverJob(name);
 }
 
Parameter
Name Description
name String

Required. The name of the CutoverJob.

Returns
Type Description
CutoverJob

getCutoverJobCallable()

public final UnaryCallable<GetCutoverJobRequest,CutoverJob> getCutoverJobCallable()

Gets details of a single CutoverJob.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   GetCutoverJobRequest request =
       GetCutoverJobRequest.newBuilder()
           .setName(
               CutoverJobName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]")
                   .toString())
           .build();
   ApiFuture<CutoverJob> future = vmMigrationClient.getCutoverJobCallable().futureCall(request);
   // Do something.
   CutoverJob response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetCutoverJobRequest,CutoverJob>

getDatacenterConnector(DatacenterConnectorName name)

public final DatacenterConnector getDatacenterConnector(DatacenterConnectorName name)

Gets details of 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 =
       DatacenterConnectorName.of(
           "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]");
   DatacenterConnector response = vmMigrationClient.getDatacenterConnector(name);
 }
 
Parameter
Name Description
name DatacenterConnectorName

Required. The name of the DatacenterConnector.

Returns
Type Description
DatacenterConnector

getDatacenterConnector(GetDatacenterConnectorRequest request)

public final DatacenterConnector getDatacenterConnector(GetDatacenterConnectorRequest request)

Gets details of 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()) {
   GetDatacenterConnectorRequest request =
       GetDatacenterConnectorRequest.newBuilder()
           .setName(
               DatacenterConnectorName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
                   .toString())
           .build();
   DatacenterConnector response = vmMigrationClient.getDatacenterConnector(request);
 }
 
Parameter
Name Description
request GetDatacenterConnectorRequest

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

Returns
Type Description
DatacenterConnector

getDatacenterConnector(String name)

public final DatacenterConnector getDatacenterConnector(String name)

Gets details of 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()) {
   String name =
       DatacenterConnectorName.of(
               "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
           .toString();
   DatacenterConnector response = vmMigrationClient.getDatacenterConnector(name);
 }
 
Parameter
Name Description
name String

Required. The name of the DatacenterConnector.

Returns
Type Description
DatacenterConnector

getDatacenterConnectorCallable()

public final UnaryCallable<GetDatacenterConnectorRequest,DatacenterConnector> getDatacenterConnectorCallable()

Gets details of 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()) {
   GetDatacenterConnectorRequest request =
       GetDatacenterConnectorRequest.newBuilder()
           .setName(
               DatacenterConnectorName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
                   .toString())
           .build();
   ApiFuture<DatacenterConnector> future =
       vmMigrationClient.getDatacenterConnectorCallable().futureCall(request);
   // Do something.
   DatacenterConnector response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetDatacenterConnectorRequest,DatacenterConnector>

getGroup(GetGroupRequest request)

public final Group getGroup(GetGroupRequest request)

Gets details of a single 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()) {
   GetGroupRequest request =
       GetGroupRequest.newBuilder()
           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
           .build();
   Group response = vmMigrationClient.getGroup(request);
 }
 
Parameter
Name Description
request GetGroupRequest

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

Returns
Type Description
Group

getGroup(GroupName name)

public final Group getGroup(GroupName name)

Gets details of a single 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 name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
   Group response = vmMigrationClient.getGroup(name);
 }
 
Parameter
Name Description
name GroupName

Required. The group name.

Returns
Type Description
Group

getGroup(String name)

public final Group getGroup(String name)

Gets details of a single 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 name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
   Group response = vmMigrationClient.getGroup(name);
 }
 
Parameter
Name Description
name String

Required. The group name.

Returns
Type Description
Group

getGroupCallable()

public final UnaryCallable<GetGroupRequest,Group> getGroupCallable()

Gets details of a single 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()) {
   GetGroupRequest request =
       GetGroupRequest.newBuilder()
           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
           .build();
   ApiFuture<Group> future = vmMigrationClient.getGroupCallable().futureCall(request);
   // Do something.
   Group response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetGroupRequest,Group>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

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

Returns
Type Description
OperationsClient

getLocation(GetLocationRequest request)

public final Location getLocation(GetLocationRequest request)

Gets information about a 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()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   Location response = vmMigrationClient.getLocation(request);
 }
 
Parameter
Name Description
request com.google.cloud.location.GetLocationRequest

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

Returns
Type Description
com.google.cloud.location.Location

getLocationCallable()

public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a 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()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   ApiFuture<Location> future = vmMigrationClient.getLocationCallable().futureCall(request);
   // Do something.
   Location response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

getMigratingVm(GetMigratingVmRequest request)

public final MigratingVm getMigratingVm(GetMigratingVmRequest request)

Gets details of a single MigratingVm.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   GetMigratingVmRequest request =
       GetMigratingVmRequest.newBuilder()
           .setName(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setView(MigratingVmView.forNumber(0))
           .build();
   MigratingVm response = vmMigrationClient.getMigratingVm(request);
 }
 
Parameter
Name Description
request GetMigratingVmRequest

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

Returns
Type Description
MigratingVm

getMigratingVm(MigratingVmName name)

public final MigratingVm getMigratingVm(MigratingVmName name)

Gets details of a single MigratingVm.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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 name =
       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   MigratingVm response = vmMigrationClient.getMigratingVm(name);
 }
 
Parameter
Name Description
name MigratingVmName

Required. The name of the MigratingVm.

Returns
Type Description
MigratingVm

getMigratingVm(String name)

public final MigratingVm getMigratingVm(String name)

Gets details of a single MigratingVm.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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 =
       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   MigratingVm response = vmMigrationClient.getMigratingVm(name);
 }
 
Parameter
Name Description
name String

Required. The name of the MigratingVm.

Returns
Type Description
MigratingVm

getMigratingVmCallable()

public final UnaryCallable<GetMigratingVmRequest,MigratingVm> getMigratingVmCallable()

Gets details of a single MigratingVm.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   GetMigratingVmRequest request =
       GetMigratingVmRequest.newBuilder()
           .setName(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setView(MigratingVmView.forNumber(0))
           .build();
   ApiFuture<MigratingVm> future =
       vmMigrationClient.getMigratingVmCallable().futureCall(request);
   // Do something.
   MigratingVm response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetMigratingVmRequest,MigratingVm>

getOperationsClient()

public final OperationsClient getOperationsClient()

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

Returns
Type Description
OperationsClient

getReplicationCycle(GetReplicationCycleRequest request)

public final ReplicationCycle getReplicationCycle(GetReplicationCycleRequest request)

Gets details of a single ReplicationCycle.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   GetReplicationCycleRequest request =
       GetReplicationCycleRequest.newBuilder()
           .setName(
               ReplicationCycleName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[SOURCE]",
                       "[MIGRATING_VM]",
                       "[REPLICATION_CYCLE]")
                   .toString())
           .build();
   ReplicationCycle response = vmMigrationClient.getReplicationCycle(request);
 }
 
Parameter
Name Description
request GetReplicationCycleRequest

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

Returns
Type Description
ReplicationCycle

getReplicationCycle(ReplicationCycleName name)

public final ReplicationCycle getReplicationCycle(ReplicationCycleName name)

Gets details of a single ReplicationCycle.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   ReplicationCycleName name =
       ReplicationCycleName.of(
           "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[REPLICATION_CYCLE]");
   ReplicationCycle response = vmMigrationClient.getReplicationCycle(name);
 }
 
Parameter
Name Description
name ReplicationCycleName

Required. The name of the ReplicationCycle.

Returns
Type Description
ReplicationCycle

getReplicationCycle(String name)

public final ReplicationCycle getReplicationCycle(String name)

Gets details of a single ReplicationCycle.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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 =
       ReplicationCycleName.of(
               "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[REPLICATION_CYCLE]")
           .toString();
   ReplicationCycle response = vmMigrationClient.getReplicationCycle(name);
 }
 
Parameter
Name Description
name String

Required. The name of the ReplicationCycle.

Returns
Type Description
ReplicationCycle

getReplicationCycleCallable()

public final UnaryCallable<GetReplicationCycleRequest,ReplicationCycle> getReplicationCycleCallable()

Gets details of a single ReplicationCycle.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   GetReplicationCycleRequest request =
       GetReplicationCycleRequest.newBuilder()
           .setName(
               ReplicationCycleName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[SOURCE]",
                       "[MIGRATING_VM]",
                       "[REPLICATION_CYCLE]")
                   .toString())
           .build();
   ApiFuture<ReplicationCycle> future =
       vmMigrationClient.getReplicationCycleCallable().futureCall(request);
   // Do something.
   ReplicationCycle response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetReplicationCycleRequest,ReplicationCycle>

getSettings()

public final VmMigrationSettings getSettings()
Returns
Type Description
VmMigrationSettings

getSource(GetSourceRequest request)

public final Source getSource(GetSourceRequest request)

Gets details of a single 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()) {
   GetSourceRequest request =
       GetSourceRequest.newBuilder()
           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .build();
   Source response = vmMigrationClient.getSource(request);
 }
 
Parameter
Name Description
request GetSourceRequest

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

Returns
Type Description
Source

getSource(SourceName name)

public final Source getSource(SourceName name)

Gets details of a single 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 name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   Source response = vmMigrationClient.getSource(name);
 }
 
Parameter
Name Description
name SourceName

Required. The Source name.

Returns
Type Description
Source

getSource(String name)

public final Source getSource(String name)

Gets details of a single 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 name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   Source response = vmMigrationClient.getSource(name);
 }
 
Parameter
Name Description
name String

Required. The Source name.

Returns
Type Description
Source

getSourceCallable()

public final UnaryCallable<GetSourceRequest,Source> getSourceCallable()

Gets details of a single 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()) {
   GetSourceRequest request =
       GetSourceRequest.newBuilder()
           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .build();
   ApiFuture<Source> future = vmMigrationClient.getSourceCallable().futureCall(request);
   // Do something.
   Source response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetSourceRequest,Source>

getStub()

public VmMigrationStub getStub()
Returns
Type Description
VmMigrationStub

getTargetProject(GetTargetProjectRequest request)

public final TargetProject getTargetProject(GetTargetProjectRequest request)

Gets details of a single TargetProject.

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()) {
   GetTargetProjectRequest request =
       GetTargetProjectRequest.newBuilder()
           .setName(
               TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]").toString())
           .build();
   TargetProject response = vmMigrationClient.getTargetProject(request);
 }
 
Parameter
Name Description
request GetTargetProjectRequest

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

Returns
Type Description
TargetProject

getTargetProject(TargetProjectName name)

public final TargetProject getTargetProject(TargetProjectName name)

Gets details of a single TargetProject.

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()) {
   TargetProjectName name = TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]");
   TargetProject response = vmMigrationClient.getTargetProject(name);
 }
 
Parameter
Name Description
name TargetProjectName

Required. The TargetProject name.

Returns
Type Description
TargetProject

getTargetProject(String name)

public final TargetProject getTargetProject(String name)

Gets details of a single TargetProject.

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 name = TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]").toString();
   TargetProject response = vmMigrationClient.getTargetProject(name);
 }
 
Parameter
Name Description
name String

Required. The TargetProject name.

Returns
Type Description
TargetProject

getTargetProjectCallable()

public final UnaryCallable<GetTargetProjectRequest,TargetProject> getTargetProjectCallable()

Gets details of a single TargetProject.

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()) {
   GetTargetProjectRequest request =
       GetTargetProjectRequest.newBuilder()
           .setName(
               TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]").toString())
           .build();
   ApiFuture<TargetProject> future =
       vmMigrationClient.getTargetProjectCallable().futureCall(request);
   // Do something.
   TargetProject response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetTargetProjectRequest,TargetProject>

getUtilizationReport(GetUtilizationReportRequest request)

public final UtilizationReport getUtilizationReport(GetUtilizationReportRequest request)

Gets a single Utilization Report.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   GetUtilizationReportRequest request =
       GetUtilizationReportRequest.newBuilder()
           .setName(
               UtilizationReportName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]")
                   .toString())
           .setView(UtilizationReportView.forNumber(0))
           .build();
   UtilizationReport response = vmMigrationClient.getUtilizationReport(request);
 }
 
Parameter
Name Description
request GetUtilizationReportRequest

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

Returns
Type Description
UtilizationReport

getUtilizationReport(UtilizationReportName name)

public final UtilizationReport getUtilizationReport(UtilizationReportName name)

Gets a single Utilization Report.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   UtilizationReportName name =
       UtilizationReportName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]");
   UtilizationReport response = vmMigrationClient.getUtilizationReport(name);
 }
 
Parameter
Name Description
name UtilizationReportName

Required. The Utilization Report name.

Returns
Type Description
UtilizationReport

getUtilizationReport(String name)

public final UtilizationReport getUtilizationReport(String name)

Gets a single Utilization Report.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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 =
       UtilizationReportName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]")
           .toString();
   UtilizationReport response = vmMigrationClient.getUtilizationReport(name);
 }
 
Parameter
Name Description
name String

Required. The Utilization Report name.

Returns
Type Description
UtilizationReport

getUtilizationReportCallable()

public final UnaryCallable<GetUtilizationReportRequest,UtilizationReport> getUtilizationReportCallable()

Gets a single Utilization Report.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   GetUtilizationReportRequest request =
       GetUtilizationReportRequest.newBuilder()
           .setName(
               UtilizationReportName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]")
                   .toString())
           .setView(UtilizationReportView.forNumber(0))
           .build();
   ApiFuture<UtilizationReport> future =
       vmMigrationClient.getUtilizationReportCallable().futureCall(request);
   // Do something.
   UtilizationReport response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetUtilizationReportRequest,UtilizationReport>

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listCloneJobs(ListCloneJobsRequest request)

public final VmMigrationClient.ListCloneJobsPagedResponse listCloneJobs(ListCloneJobsRequest request)

Lists CloneJobs of a given 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()) {
   ListCloneJobsRequest request =
       ListCloneJobsRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (CloneJob element : vmMigrationClient.listCloneJobs(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListCloneJobsRequest

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

Returns
Type Description
VmMigrationClient.ListCloneJobsPagedResponse

listCloneJobs(MigratingVmName parent)

public final VmMigrationClient.ListCloneJobsPagedResponse listCloneJobs(MigratingVmName parent)

Lists CloneJobs of a given 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]");
   for (CloneJob element : vmMigrationClient.listCloneJobs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent MigratingVmName

Required. The parent, which owns this collection of source VMs.

Returns
Type Description
VmMigrationClient.ListCloneJobsPagedResponse

listCloneJobs(String parent)

public final VmMigrationClient.ListCloneJobsPagedResponse listCloneJobs(String parent)

Lists CloneJobs of a given 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();
   for (CloneJob element : vmMigrationClient.listCloneJobs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of source VMs.

Returns
Type Description
VmMigrationClient.ListCloneJobsPagedResponse

listCloneJobsCallable()

public final UnaryCallable<ListCloneJobsRequest,ListCloneJobsResponse> listCloneJobsCallable()

Lists CloneJobs of a given 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()) {
   ListCloneJobsRequest request =
       ListCloneJobsRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListCloneJobsResponse response = vmMigrationClient.listCloneJobsCallable().call(request);
     for (CloneJob element : response.getCloneJobsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListCloneJobsRequest,ListCloneJobsResponse>

listCloneJobsPagedCallable()

public final UnaryCallable<ListCloneJobsRequest,VmMigrationClient.ListCloneJobsPagedResponse> listCloneJobsPagedCallable()

Lists CloneJobs of a given 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()) {
   ListCloneJobsRequest request =
       ListCloneJobsRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<CloneJob> future =
       vmMigrationClient.listCloneJobsPagedCallable().futureCall(request);
   // Do something.
   for (CloneJob element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListCloneJobsRequest,ListCloneJobsPagedResponse>

listCutoverJobs(ListCutoverJobsRequest request)

public final VmMigrationClient.ListCutoverJobsPagedResponse listCutoverJobs(ListCutoverJobsRequest request)

Lists CutoverJobs of a given 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()) {
   ListCutoverJobsRequest request =
       ListCutoverJobsRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (CutoverJob element : vmMigrationClient.listCutoverJobs(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListCutoverJobsRequest

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

Returns
Type Description
VmMigrationClient.ListCutoverJobsPagedResponse

listCutoverJobs(MigratingVmName parent)

public final VmMigrationClient.ListCutoverJobsPagedResponse listCutoverJobs(MigratingVmName parent)

Lists CutoverJobs of a given 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]");
   for (CutoverJob element : vmMigrationClient.listCutoverJobs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent MigratingVmName

Required. The parent, which owns this collection of migrating VMs.

Returns
Type Description
VmMigrationClient.ListCutoverJobsPagedResponse

listCutoverJobs(String parent)

public final VmMigrationClient.ListCutoverJobsPagedResponse listCutoverJobs(String parent)

Lists CutoverJobs of a given 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();
   for (CutoverJob element : vmMigrationClient.listCutoverJobs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of migrating VMs.

Returns
Type Description
VmMigrationClient.ListCutoverJobsPagedResponse

listCutoverJobsCallable()

public final UnaryCallable<ListCutoverJobsRequest,ListCutoverJobsResponse> listCutoverJobsCallable()

Lists CutoverJobs of a given 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()) {
   ListCutoverJobsRequest request =
       ListCutoverJobsRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListCutoverJobsResponse response =
         vmMigrationClient.listCutoverJobsCallable().call(request);
     for (CutoverJob element : response.getCutoverJobsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListCutoverJobsRequest,ListCutoverJobsResponse>

listCutoverJobsPagedCallable()

public final UnaryCallable<ListCutoverJobsRequest,VmMigrationClient.ListCutoverJobsPagedResponse> listCutoverJobsPagedCallable()

Lists CutoverJobs of a given 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()) {
   ListCutoverJobsRequest request =
       ListCutoverJobsRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<CutoverJob> future =
       vmMigrationClient.listCutoverJobsPagedCallable().futureCall(request);
   // Do something.
   for (CutoverJob element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListCutoverJobsRequest,ListCutoverJobsPagedResponse>

listDatacenterConnectors(ListDatacenterConnectorsRequest request)

public final VmMigrationClient.ListDatacenterConnectorsPagedResponse listDatacenterConnectors(ListDatacenterConnectorsRequest request)

Lists DatacenterConnectors 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()) {
   ListDatacenterConnectorsRequest request =
       ListDatacenterConnectorsRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (DatacenterConnector element :
       vmMigrationClient.listDatacenterConnectors(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListDatacenterConnectorsRequest

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

Returns
Type Description
VmMigrationClient.ListDatacenterConnectorsPagedResponse

listDatacenterConnectors(SourceName parent)

public final VmMigrationClient.ListDatacenterConnectorsPagedResponse listDatacenterConnectors(SourceName parent)

Lists DatacenterConnectors 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]");
   for (DatacenterConnector element :
       vmMigrationClient.listDatacenterConnectors(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent SourceName

Required. The parent, which owns this collection of connectors.

Returns
Type Description
VmMigrationClient.ListDatacenterConnectorsPagedResponse

listDatacenterConnectors(String parent)

public final VmMigrationClient.ListDatacenterConnectorsPagedResponse listDatacenterConnectors(String parent)

Lists DatacenterConnectors 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();
   for (DatacenterConnector element :
       vmMigrationClient.listDatacenterConnectors(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of connectors.

Returns
Type Description
VmMigrationClient.ListDatacenterConnectorsPagedResponse

listDatacenterConnectorsCallable()

public final UnaryCallable<ListDatacenterConnectorsRequest,ListDatacenterConnectorsResponse> listDatacenterConnectorsCallable()

Lists DatacenterConnectors 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()) {
   ListDatacenterConnectorsRequest request =
       ListDatacenterConnectorsRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListDatacenterConnectorsResponse response =
         vmMigrationClient.listDatacenterConnectorsCallable().call(request);
     for (DatacenterConnector element : response.getDatacenterConnectorsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListDatacenterConnectorsRequest,ListDatacenterConnectorsResponse>

listDatacenterConnectorsPagedCallable()

public final UnaryCallable<ListDatacenterConnectorsRequest,VmMigrationClient.ListDatacenterConnectorsPagedResponse> listDatacenterConnectorsPagedCallable()

Lists DatacenterConnectors 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()) {
   ListDatacenterConnectorsRequest request =
       ListDatacenterConnectorsRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<DatacenterConnector> future =
       vmMigrationClient.listDatacenterConnectorsPagedCallable().futureCall(request);
   // Do something.
   for (DatacenterConnector element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListDatacenterConnectorsRequest,ListDatacenterConnectorsPagedResponse>

listGroups(ListGroupsRequest request)

public final VmMigrationClient.ListGroupsPagedResponse listGroups(ListGroupsRequest request)

Lists Groups 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()) {
   ListGroupsRequest request =
       ListGroupsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (Group element : vmMigrationClient.listGroups(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListGroupsRequest

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

Returns
Type Description
VmMigrationClient.ListGroupsPagedResponse

listGroups(LocationName parent)

public final VmMigrationClient.ListGroupsPagedResponse listGroups(LocationName parent)

Lists Groups 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]");
   for (Group element : vmMigrationClient.listGroups(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The parent, which owns this collection of groups.

Returns
Type Description
VmMigrationClient.ListGroupsPagedResponse

listGroups(String parent)

public final VmMigrationClient.ListGroupsPagedResponse listGroups(String parent)

Lists Groups 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();
   for (Group element : vmMigrationClient.listGroups(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of groups.

Returns
Type Description
VmMigrationClient.ListGroupsPagedResponse

listGroupsCallable()

public final UnaryCallable<ListGroupsRequest,ListGroupsResponse> listGroupsCallable()

Lists Groups 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()) {
   ListGroupsRequest request =
       ListGroupsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListGroupsResponse response = vmMigrationClient.listGroupsCallable().call(request);
     for (Group element : response.getGroupsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListGroupsRequest,ListGroupsResponse>

listGroupsPagedCallable()

public final UnaryCallable<ListGroupsRequest,VmMigrationClient.ListGroupsPagedResponse> listGroupsPagedCallable()

Lists Groups 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()) {
   ListGroupsRequest request =
       ListGroupsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<Group> future = vmMigrationClient.listGroupsPagedCallable().futureCall(request);
   // Do something.
   for (Group element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListGroupsRequest,ListGroupsPagedResponse>

listLocations(ListLocationsRequest request)

public final VmMigrationClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Location element : vmMigrationClient.listLocations(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request com.google.cloud.location.ListLocationsRequest

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

Returns
Type Description
VmMigrationClient.ListLocationsPagedResponse

listLocationsCallable()

public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListLocationsResponse response = vmMigrationClient.listLocationsCallable().call(request);
     for (Location element : response.getLocationsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

listLocationsPagedCallable()

public final UnaryCallable<ListLocationsRequest,VmMigrationClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Location> future =
       vmMigrationClient.listLocationsPagedCallable().futureCall(request);
   // Do something.
   for (Location element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>

listMigratingVms(ListMigratingVmsRequest request)

public final VmMigrationClient.ListMigratingVmsPagedResponse listMigratingVms(ListMigratingVmsRequest request)

Lists MigratingVms 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()) {
   ListMigratingVmsRequest request =
       ListMigratingVmsRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setView(MigratingVmView.forNumber(0))
           .build();
   for (MigratingVm element : vmMigrationClient.listMigratingVms(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListMigratingVmsRequest

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

Returns
Type Description
VmMigrationClient.ListMigratingVmsPagedResponse

listMigratingVms(SourceName parent)

public final VmMigrationClient.ListMigratingVmsPagedResponse listMigratingVms(SourceName parent)

Lists MigratingVms 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]");
   for (MigratingVm element : vmMigrationClient.listMigratingVms(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent SourceName

Required. The parent, which owns this collection of MigratingVms.

Returns
Type Description
VmMigrationClient.ListMigratingVmsPagedResponse

listMigratingVms(String parent)

public final VmMigrationClient.ListMigratingVmsPagedResponse listMigratingVms(String parent)

Lists MigratingVms 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();
   for (MigratingVm element : vmMigrationClient.listMigratingVms(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of MigratingVms.

Returns
Type Description
VmMigrationClient.ListMigratingVmsPagedResponse

listMigratingVmsCallable()

public final UnaryCallable<ListMigratingVmsRequest,ListMigratingVmsResponse> listMigratingVmsCallable()

Lists MigratingVms 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()) {
   ListMigratingVmsRequest request =
       ListMigratingVmsRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setView(MigratingVmView.forNumber(0))
           .build();
   while (true) {
     ListMigratingVmsResponse response =
         vmMigrationClient.listMigratingVmsCallable().call(request);
     for (MigratingVm element : response.getMigratingVmsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListMigratingVmsRequest,ListMigratingVmsResponse>

listMigratingVmsPagedCallable()

public final UnaryCallable<ListMigratingVmsRequest,VmMigrationClient.ListMigratingVmsPagedResponse> listMigratingVmsPagedCallable()

Lists MigratingVms 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()) {
   ListMigratingVmsRequest request =
       ListMigratingVmsRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setView(MigratingVmView.forNumber(0))
           .build();
   ApiFuture<MigratingVm> future =
       vmMigrationClient.listMigratingVmsPagedCallable().futureCall(request);
   // Do something.
   for (MigratingVm element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListMigratingVmsRequest,ListMigratingVmsPagedResponse>

listReplicationCycles(ListReplicationCyclesRequest request)

public final VmMigrationClient.ListReplicationCyclesPagedResponse listReplicationCycles(ListReplicationCyclesRequest request)

Lists ReplicationCycles in a given MigratingVM.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   ListReplicationCyclesRequest request =
       ListReplicationCyclesRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (ReplicationCycle element :
       vmMigrationClient.listReplicationCycles(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListReplicationCyclesRequest

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

Returns
Type Description
VmMigrationClient.ListReplicationCyclesPagedResponse

listReplicationCycles(MigratingVmName parent)

public final VmMigrationClient.ListReplicationCyclesPagedResponse listReplicationCycles(MigratingVmName parent)

Lists ReplicationCycles in a given MigratingVM.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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]");
   for (ReplicationCycle element :
       vmMigrationClient.listReplicationCycles(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent MigratingVmName

Required. The parent, which owns this collection of ReplicationCycles.

Returns
Type Description
VmMigrationClient.ListReplicationCyclesPagedResponse

listReplicationCycles(String parent)

public final VmMigrationClient.ListReplicationCyclesPagedResponse listReplicationCycles(String parent)

Lists ReplicationCycles in a given MigratingVM.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
   for (ReplicationCycle element :
       vmMigrationClient.listReplicationCycles(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of ReplicationCycles.

Returns
Type Description
VmMigrationClient.ListReplicationCyclesPagedResponse

listReplicationCyclesCallable()

public final UnaryCallable<ListReplicationCyclesRequest,ListReplicationCyclesResponse> listReplicationCyclesCallable()

Lists ReplicationCycles in a given MigratingVM.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   ListReplicationCyclesRequest request =
       ListReplicationCyclesRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListReplicationCyclesResponse response =
         vmMigrationClient.listReplicationCyclesCallable().call(request);
     for (ReplicationCycle element : response.getReplicationCyclesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListReplicationCyclesRequest,ListReplicationCyclesResponse>

listReplicationCyclesPagedCallable()

public final UnaryCallable<ListReplicationCyclesRequest,VmMigrationClient.ListReplicationCyclesPagedResponse> listReplicationCyclesPagedCallable()

Lists ReplicationCycles in a given MigratingVM.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   ListReplicationCyclesRequest request =
       ListReplicationCyclesRequest.newBuilder()
           .setParent(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<ReplicationCycle> future =
       vmMigrationClient.listReplicationCyclesPagedCallable().futureCall(request);
   // Do something.
   for (ReplicationCycle element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListReplicationCyclesRequest,ListReplicationCyclesPagedResponse>

listSources(ListSourcesRequest request)

public final VmMigrationClient.ListSourcesPagedResponse listSources(ListSourcesRequest request)

Lists Sources 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()) {
   ListSourcesRequest request =
       ListSourcesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (Source element : vmMigrationClient.listSources(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListSourcesRequest

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

Returns
Type Description
VmMigrationClient.ListSourcesPagedResponse

listSources(LocationName parent)

public final VmMigrationClient.ListSourcesPagedResponse listSources(LocationName parent)

Lists Sources 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]");
   for (Source element : vmMigrationClient.listSources(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The parent, which owns this collection of sources.

Returns
Type Description
VmMigrationClient.ListSourcesPagedResponse

listSources(String parent)

public final VmMigrationClient.ListSourcesPagedResponse listSources(String parent)

Lists Sources 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();
   for (Source element : vmMigrationClient.listSources(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of sources.

Returns
Type Description
VmMigrationClient.ListSourcesPagedResponse

listSourcesCallable()

public final UnaryCallable<ListSourcesRequest,ListSourcesResponse> listSourcesCallable()

Lists Sources 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()) {
   ListSourcesRequest request =
       ListSourcesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListSourcesResponse response = vmMigrationClient.listSourcesCallable().call(request);
     for (Source element : response.getSourcesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListSourcesRequest,ListSourcesResponse>

listSourcesPagedCallable()

public final UnaryCallable<ListSourcesRequest,VmMigrationClient.ListSourcesPagedResponse> listSourcesPagedCallable()

Lists Sources 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()) {
   ListSourcesRequest request =
       ListSourcesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<Source> future = vmMigrationClient.listSourcesPagedCallable().futureCall(request);
   // Do something.
   for (Source element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListSourcesRequest,ListSourcesPagedResponse>

listTargetProjects(ListTargetProjectsRequest request)

public final VmMigrationClient.ListTargetProjectsPagedResponse listTargetProjects(ListTargetProjectsRequest request)

Lists TargetProjects 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()) {
   ListTargetProjectsRequest request =
       ListTargetProjectsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (TargetProject element : vmMigrationClient.listTargetProjects(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListTargetProjectsRequest

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

Returns
Type Description
VmMigrationClient.ListTargetProjectsPagedResponse

listTargetProjects(LocationName parent)

public final VmMigrationClient.ListTargetProjectsPagedResponse listTargetProjects(LocationName parent)

Lists TargetProjects 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]");
   for (TargetProject element : vmMigrationClient.listTargetProjects(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The parent, which owns this collection of targets.

Returns
Type Description
VmMigrationClient.ListTargetProjectsPagedResponse

listTargetProjects(String parent)

public final VmMigrationClient.ListTargetProjectsPagedResponse listTargetProjects(String parent)

Lists TargetProjects 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();
   for (TargetProject element : vmMigrationClient.listTargetProjects(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of targets.

Returns
Type Description
VmMigrationClient.ListTargetProjectsPagedResponse

listTargetProjectsCallable()

public final UnaryCallable<ListTargetProjectsRequest,ListTargetProjectsResponse> listTargetProjectsCallable()

Lists TargetProjects 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()) {
   ListTargetProjectsRequest request =
       ListTargetProjectsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListTargetProjectsResponse response =
         vmMigrationClient.listTargetProjectsCallable().call(request);
     for (TargetProject element : response.getTargetProjectsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListTargetProjectsRequest,ListTargetProjectsResponse>

listTargetProjectsPagedCallable()

public final UnaryCallable<ListTargetProjectsRequest,VmMigrationClient.ListTargetProjectsPagedResponse> listTargetProjectsPagedCallable()

Lists TargetProjects 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()) {
   ListTargetProjectsRequest request =
       ListTargetProjectsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<TargetProject> future =
       vmMigrationClient.listTargetProjectsPagedCallable().futureCall(request);
   // Do something.
   for (TargetProject element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListTargetProjectsRequest,ListTargetProjectsPagedResponse>

listUtilizationReports(ListUtilizationReportsRequest request)

public final VmMigrationClient.ListUtilizationReportsPagedResponse listUtilizationReports(ListUtilizationReportsRequest request)

Lists Utilization Reports of the 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()) {
   ListUtilizationReportsRequest request =
       ListUtilizationReportsRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setView(UtilizationReportView.forNumber(0))
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (UtilizationReport element :
       vmMigrationClient.listUtilizationReports(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListUtilizationReportsRequest

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

Returns
Type Description
VmMigrationClient.ListUtilizationReportsPagedResponse

listUtilizationReports(SourceName parent)

public final VmMigrationClient.ListUtilizationReportsPagedResponse listUtilizationReports(SourceName parent)

Lists Utilization Reports of the 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]");
   for (UtilizationReport element :
       vmMigrationClient.listUtilizationReports(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent SourceName

Required. The Utilization Reports parent.

Returns
Type Description
VmMigrationClient.ListUtilizationReportsPagedResponse

listUtilizationReports(String parent)

public final VmMigrationClient.ListUtilizationReportsPagedResponse listUtilizationReports(String parent)

Lists Utilization Reports of the 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();
   for (UtilizationReport element :
       vmMigrationClient.listUtilizationReports(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The Utilization Reports parent.

Returns
Type Description
VmMigrationClient.ListUtilizationReportsPagedResponse

listUtilizationReportsCallable()

public final UnaryCallable<ListUtilizationReportsRequest,ListUtilizationReportsResponse> listUtilizationReportsCallable()

Lists Utilization Reports of the 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()) {
   ListUtilizationReportsRequest request =
       ListUtilizationReportsRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setView(UtilizationReportView.forNumber(0))
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListUtilizationReportsResponse response =
         vmMigrationClient.listUtilizationReportsCallable().call(request);
     for (UtilizationReport element : response.getUtilizationReportsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListUtilizationReportsRequest,ListUtilizationReportsResponse>

listUtilizationReportsPagedCallable()

public final UnaryCallable<ListUtilizationReportsRequest,VmMigrationClient.ListUtilizationReportsPagedResponse> listUtilizationReportsPagedCallable()

Lists Utilization Reports of the 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()) {
   ListUtilizationReportsRequest request =
       ListUtilizationReportsRequest.newBuilder()
           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
           .setView(UtilizationReportView.forNumber(0))
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<UtilizationReport> future =
       vmMigrationClient.listUtilizationReportsPagedCallable().futureCall(request);
   // Do something.
   for (UtilizationReport element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListUtilizationReportsRequest,ListUtilizationReportsPagedResponse>

pauseMigrationAsync(PauseMigrationRequest request)

public final OperationFuture<PauseMigrationResponse,OperationMetadata> pauseMigrationAsync(PauseMigrationRequest request)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   PauseMigrationRequest request =
       PauseMigrationRequest.newBuilder()
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   PauseMigrationResponse response = vmMigrationClient.pauseMigrationAsync(request).get();
 }
 
Parameter
Name Description
request PauseMigrationRequest

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

Returns
Type Description
OperationFuture<PauseMigrationResponse,OperationMetadata>

pauseMigrationCallable()

public final UnaryCallable<PauseMigrationRequest,Operation> pauseMigrationCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   PauseMigrationRequest request =
       PauseMigrationRequest.newBuilder()
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   ApiFuture<Operation> future = vmMigrationClient.pauseMigrationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<PauseMigrationRequest,Operation>

pauseMigrationOperationCallable()

public final OperationCallable<PauseMigrationRequest,PauseMigrationResponse,OperationMetadata> pauseMigrationOperationCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   PauseMigrationRequest request =
       PauseMigrationRequest.newBuilder()
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   OperationFuture<PauseMigrationResponse, OperationMetadata> future =
       vmMigrationClient.pauseMigrationOperationCallable().futureCall(request);
   // Do something.
   PauseMigrationResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<PauseMigrationRequest,PauseMigrationResponse,OperationMetadata>

removeGroupMigrationAsync(GroupName group)

public final OperationFuture<RemoveGroupMigrationResponse,OperationMetadata> removeGroupMigrationAsync(GroupName group)

Removes a MigratingVm from 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]");
   RemoveGroupMigrationResponse response =
       vmMigrationClient.removeGroupMigrationAsync(group).get();
 }
 
Parameter
Name Description
group GroupName

Required. The name of the Group.

Returns
Type Description
OperationFuture<RemoveGroupMigrationResponse,OperationMetadata>

removeGroupMigrationAsync(RemoveGroupMigrationRequest request)

public final OperationFuture<RemoveGroupMigrationResponse,OperationMetadata> removeGroupMigrationAsync(RemoveGroupMigrationRequest request)

Removes a MigratingVm from 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()) {
   RemoveGroupMigrationRequest request =
       RemoveGroupMigrationRequest.newBuilder()
           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   RemoveGroupMigrationResponse response =
       vmMigrationClient.removeGroupMigrationAsync(request).get();
 }
 
Parameter
Name Description
request RemoveGroupMigrationRequest

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

Returns
Type Description
OperationFuture<RemoveGroupMigrationResponse,OperationMetadata>

removeGroupMigrationAsync(String group)

public final OperationFuture<RemoveGroupMigrationResponse,OperationMetadata> removeGroupMigrationAsync(String group)

Removes a MigratingVm from 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();
   RemoveGroupMigrationResponse response =
       vmMigrationClient.removeGroupMigrationAsync(group).get();
 }
 
Parameter
Name Description
group String

Required. The name of the Group.

Returns
Type Description
OperationFuture<RemoveGroupMigrationResponse,OperationMetadata>

removeGroupMigrationCallable()

public final UnaryCallable<RemoveGroupMigrationRequest,Operation> removeGroupMigrationCallable()

Removes a MigratingVm from 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()) {
   RemoveGroupMigrationRequest request =
       RemoveGroupMigrationRequest.newBuilder()
           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.removeGroupMigrationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<RemoveGroupMigrationRequest,Operation>

removeGroupMigrationOperationCallable()

public final OperationCallable<RemoveGroupMigrationRequest,RemoveGroupMigrationResponse,OperationMetadata> removeGroupMigrationOperationCallable()

Removes a MigratingVm from 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()) {
   RemoveGroupMigrationRequest request =
       RemoveGroupMigrationRequest.newBuilder()
           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   OperationFuture<RemoveGroupMigrationResponse, OperationMetadata> future =
       vmMigrationClient.removeGroupMigrationOperationCallable().futureCall(request);
   // Do something.
   RemoveGroupMigrationResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<RemoveGroupMigrationRequest,RemoveGroupMigrationResponse,OperationMetadata>

resumeMigrationAsync(ResumeMigrationRequest request)

public final OperationFuture<ResumeMigrationResponse,OperationMetadata> resumeMigrationAsync(ResumeMigrationRequest request)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   ResumeMigrationRequest request =
       ResumeMigrationRequest.newBuilder()
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   ResumeMigrationResponse response = vmMigrationClient.resumeMigrationAsync(request).get();
 }
 
Parameter
Name Description
request ResumeMigrationRequest

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

Returns
Type Description
OperationFuture<ResumeMigrationResponse,OperationMetadata>

resumeMigrationCallable()

public final UnaryCallable<ResumeMigrationRequest,Operation> resumeMigrationCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   ResumeMigrationRequest request =
       ResumeMigrationRequest.newBuilder()
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   ApiFuture<Operation> future = vmMigrationClient.resumeMigrationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<ResumeMigrationRequest,Operation>

resumeMigrationOperationCallable()

public final OperationCallable<ResumeMigrationRequest,ResumeMigrationResponse,OperationMetadata> resumeMigrationOperationCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   ResumeMigrationRequest request =
       ResumeMigrationRequest.newBuilder()
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   OperationFuture<ResumeMigrationResponse, OperationMetadata> future =
       vmMigrationClient.resumeMigrationOperationCallable().futureCall(request);
   // Do something.
   ResumeMigrationResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<ResumeMigrationRequest,ResumeMigrationResponse,OperationMetadata>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

startMigrationAsync(MigratingVmName migratingVm)

public final OperationFuture<StartMigrationResponse,OperationMetadata> startMigrationAsync(MigratingVmName migratingVm)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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 migratingVm =
       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   StartMigrationResponse response = vmMigrationClient.startMigrationAsync(migratingVm).get();
 }
 
Parameter
Name Description
migratingVm MigratingVmName

Required. The name of the MigratingVm.

Returns
Type Description
OperationFuture<StartMigrationResponse,OperationMetadata>

startMigrationAsync(StartMigrationRequest request)

public final OperationFuture<StartMigrationResponse,OperationMetadata> startMigrationAsync(StartMigrationRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   StartMigrationRequest request =
       StartMigrationRequest.newBuilder()
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   StartMigrationResponse response = vmMigrationClient.startMigrationAsync(request).get();
 }
 
Parameter
Name Description
request StartMigrationRequest

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

Returns
Type Description
OperationFuture<StartMigrationResponse,OperationMetadata>

startMigrationAsync(String migratingVm)

public final OperationFuture<StartMigrationResponse,OperationMetadata> startMigrationAsync(String migratingVm)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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 migratingVm =
       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   StartMigrationResponse response = vmMigrationClient.startMigrationAsync(migratingVm).get();
 }
 
Parameter
Name Description
migratingVm String

Required. The name of the MigratingVm.

Returns
Type Description
OperationFuture<StartMigrationResponse,OperationMetadata>

startMigrationCallable()

public final UnaryCallable<StartMigrationRequest,Operation> startMigrationCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   StartMigrationRequest request =
       StartMigrationRequest.newBuilder()
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   ApiFuture<Operation> future = vmMigrationClient.startMigrationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<StartMigrationRequest,Operation>

startMigrationOperationCallable()

public final OperationCallable<StartMigrationRequest,StartMigrationResponse,OperationMetadata> startMigrationOperationCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   StartMigrationRequest request =
       StartMigrationRequest.newBuilder()
           .setMigratingVm(
               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
                   .toString())
           .build();
   OperationFuture<StartMigrationResponse, OperationMetadata> future =
       vmMigrationClient.startMigrationOperationCallable().futureCall(request);
   // Do something.
   StartMigrationResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<StartMigrationRequest,StartMigrationResponse,OperationMetadata>

updateGroupAsync(Group group, FieldMask updateMask)

public final OperationFuture<Group,OperationMetadata> updateGroupAsync(Group group, FieldMask updateMask)

Updates the parameters of a single 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()) {
   Group group = Group.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Group response = vmMigrationClient.updateGroupAsync(group, updateMask).get();
 }
 
Parameters
Name Description
group Group

Required. The update request body.

updateMask FieldMask

Field mask is used to specify the fields to be overwritten in the Group resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

Returns
Type Description
OperationFuture<Group,OperationMetadata>

updateGroupAsync(UpdateGroupRequest request)

public final OperationFuture<Group,OperationMetadata> updateGroupAsync(UpdateGroupRequest request)

Updates the parameters of a single 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()) {
   UpdateGroupRequest request =
       UpdateGroupRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setGroup(Group.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Group response = vmMigrationClient.updateGroupAsync(request).get();
 }
 
Parameter
Name Description
request UpdateGroupRequest

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

Returns
Type Description
OperationFuture<Group,OperationMetadata>

updateGroupCallable()

public final UnaryCallable<UpdateGroupRequest,Operation> updateGroupCallable()

Updates the parameters of a single 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()) {
   UpdateGroupRequest request =
       UpdateGroupRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setGroup(Group.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = vmMigrationClient.updateGroupCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateGroupRequest,Operation>

updateGroupOperationCallable()

public final OperationCallable<UpdateGroupRequest,Group,OperationMetadata> updateGroupOperationCallable()

Updates the parameters of a single 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()) {
   UpdateGroupRequest request =
       UpdateGroupRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setGroup(Group.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Group, OperationMetadata> future =
       vmMigrationClient.updateGroupOperationCallable().futureCall(request);
   // Do something.
   Group response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateGroupRequest,Group,OperationMetadata>

updateMigratingVmAsync(MigratingVm migratingVm, FieldMask updateMask)

public final OperationFuture<MigratingVm,OperationMetadata> updateMigratingVmAsync(MigratingVm migratingVm, FieldMask updateMask)

Updates the parameters of a single MigratingVm.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   MigratingVm migratingVm = MigratingVm.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   MigratingVm response =
       vmMigrationClient.updateMigratingVmAsync(migratingVm, updateMask).get();
 }
 
Parameters
Name Description
migratingVm MigratingVm

Required. The update request body.

updateMask FieldMask

Field mask is used to specify the fields to be overwritten in the MigratingVm resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

Returns
Type Description
OperationFuture<MigratingVm,OperationMetadata>

updateMigratingVmAsync(UpdateMigratingVmRequest request)

public final OperationFuture<MigratingVm,OperationMetadata> updateMigratingVmAsync(UpdateMigratingVmRequest request)

Updates the parameters of a single MigratingVm.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   UpdateMigratingVmRequest request =
       UpdateMigratingVmRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setMigratingVm(MigratingVm.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   MigratingVm response = vmMigrationClient.updateMigratingVmAsync(request).get();
 }
 
Parameter
Name Description
request UpdateMigratingVmRequest

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

Returns
Type Description
OperationFuture<MigratingVm,OperationMetadata>

updateMigratingVmCallable()

public final UnaryCallable<UpdateMigratingVmRequest,Operation> updateMigratingVmCallable()

Updates the parameters of a single MigratingVm.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   UpdateMigratingVmRequest request =
       UpdateMigratingVmRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setMigratingVm(MigratingVm.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.updateMigratingVmCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateMigratingVmRequest,Operation>

updateMigratingVmOperationCallable()

public final OperationCallable<UpdateMigratingVmRequest,MigratingVm,OperationMetadata> updateMigratingVmOperationCallable()

Updates the parameters of a single MigratingVm.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   UpdateMigratingVmRequest request =
       UpdateMigratingVmRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setMigratingVm(MigratingVm.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<MigratingVm, OperationMetadata> future =
       vmMigrationClient.updateMigratingVmOperationCallable().futureCall(request);
   // Do something.
   MigratingVm response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateMigratingVmRequest,MigratingVm,OperationMetadata>

updateSourceAsync(Source source, FieldMask updateMask)

public final OperationFuture<Source,OperationMetadata> updateSourceAsync(Source source, FieldMask updateMask)

Updates the parameters of a single 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()) {
   Source source = Source.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Source response = vmMigrationClient.updateSourceAsync(source, updateMask).get();
 }
 
Parameters
Name Description
source Source

Required. The update request body.

updateMask FieldMask

Field mask is used to specify the fields to be overwritten in the Source resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

Returns
Type Description
OperationFuture<Source,OperationMetadata>

updateSourceAsync(UpdateSourceRequest request)

public final OperationFuture<Source,OperationMetadata> updateSourceAsync(UpdateSourceRequest request)

Updates the parameters of a single 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()) {
   UpdateSourceRequest request =
       UpdateSourceRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setSource(Source.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Source response = vmMigrationClient.updateSourceAsync(request).get();
 }
 
Parameter
Name Description
request UpdateSourceRequest

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

Returns
Type Description
OperationFuture<Source,OperationMetadata>

updateSourceCallable()

public final UnaryCallable<UpdateSourceRequest,Operation> updateSourceCallable()

Updates the parameters of a single 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()) {
   UpdateSourceRequest request =
       UpdateSourceRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setSource(Source.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = vmMigrationClient.updateSourceCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateSourceRequest,Operation>

updateSourceOperationCallable()

public final OperationCallable<UpdateSourceRequest,Source,OperationMetadata> updateSourceOperationCallable()

Updates the parameters of a single 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()) {
   UpdateSourceRequest request =
       UpdateSourceRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setSource(Source.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Source, OperationMetadata> future =
       vmMigrationClient.updateSourceOperationCallable().futureCall(request);
   // Do something.
   Source response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateSourceRequest,Source,OperationMetadata>

updateTargetProjectAsync(TargetProject targetProject, FieldMask updateMask)

public final OperationFuture<TargetProject,OperationMetadata> updateTargetProjectAsync(TargetProject targetProject, FieldMask updateMask)

Updates the parameters of a single TargetProject.

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()) {
   TargetProject targetProject = TargetProject.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   TargetProject response =
       vmMigrationClient.updateTargetProjectAsync(targetProject, updateMask).get();
 }
 
Parameters
Name Description
targetProject TargetProject

Required. The update request body.

updateMask FieldMask

Field mask is used to specify the fields to be overwritten in the TargetProject resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

Returns
Type Description
OperationFuture<TargetProject,OperationMetadata>

updateTargetProjectAsync(UpdateTargetProjectRequest request)

public final OperationFuture<TargetProject,OperationMetadata> updateTargetProjectAsync(UpdateTargetProjectRequest request)

Updates the parameters of a single TargetProject.

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()) {
   UpdateTargetProjectRequest request =
       UpdateTargetProjectRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setTargetProject(TargetProject.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   TargetProject response = vmMigrationClient.updateTargetProjectAsync(request).get();
 }
 
Parameter
Name Description
request UpdateTargetProjectRequest

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

Returns
Type Description
OperationFuture<TargetProject,OperationMetadata>

updateTargetProjectCallable()

public final UnaryCallable<UpdateTargetProjectRequest,Operation> updateTargetProjectCallable()

Updates the parameters of a single TargetProject.

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()) {
   UpdateTargetProjectRequest request =
       UpdateTargetProjectRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setTargetProject(TargetProject.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.updateTargetProjectCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateTargetProjectRequest,Operation>

updateTargetProjectOperationCallable()

public final OperationCallable<UpdateTargetProjectRequest,TargetProject,OperationMetadata> updateTargetProjectOperationCallable()

Updates the parameters of a single TargetProject.

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()) {
   UpdateTargetProjectRequest request =
       UpdateTargetProjectRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setTargetProject(TargetProject.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<TargetProject, OperationMetadata> future =
       vmMigrationClient.updateTargetProjectOperationCallable().futureCall(request);
   // Do something.
   TargetProject response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateTargetProjectRequest,TargetProject,OperationMetadata>

upgradeApplianceAsync(UpgradeApplianceRequest request)

public final OperationFuture<UpgradeApplianceResponse,OperationMetadata> upgradeApplianceAsync(UpgradeApplianceRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   UpgradeApplianceRequest request =
       UpgradeApplianceRequest.newBuilder()
           .setDatacenterConnector(
               DatacenterConnectorName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   UpgradeApplianceResponse response = vmMigrationClient.upgradeApplianceAsync(request).get();
 }
 
Parameter
Name Description
request UpgradeApplianceRequest

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

Returns
Type Description
OperationFuture<UpgradeApplianceResponse,OperationMetadata>

upgradeApplianceCallable()

public final UnaryCallable<UpgradeApplianceRequest,Operation> upgradeApplianceCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   UpgradeApplianceRequest request =
       UpgradeApplianceRequest.newBuilder()
           .setDatacenterConnector(
               DatacenterConnectorName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       vmMigrationClient.upgradeApplianceCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpgradeApplianceRequest,Operation>

upgradeApplianceOperationCallable()

public final OperationCallable<UpgradeApplianceRequest,UpgradeApplianceResponse,OperationMetadata> upgradeApplianceOperationCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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()) {
   UpgradeApplianceRequest request =
       UpgradeApplianceRequest.newBuilder()
           .setDatacenterConnector(
               DatacenterConnectorName.of(
                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<UpgradeApplianceResponse, OperationMetadata> future =
       vmMigrationClient.upgradeApplianceOperationCallable().futureCall(request);
   // Do something.
   UpgradeApplianceResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpgradeApplianceRequest,UpgradeApplianceResponse,OperationMetadata>