Skip to main content

clone_jobs

Creates, updates, deletes, gets or lists a clone_jobs resource.

Overview

Nameclone_jobs
TypeResource
Idgoogle.vmmigration.clone_jobs

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The name of the clone.
computeEngineDisksTargetDetailsobjectOutput only. Details of the target Persistent Disks in Compute Engine. (id: ComputeEngineDisksTargetDetails)
computeEngineTargetDetailsobjectOutput only. Details of the target VM in Compute Engine. (id: ComputeEngineTargetDetails)
createTimestring (google-datetime)Output only. The time the clone job was created (as an API call, not when it was actually created in the target).
endTimestring (google-datetime)Output only. The time the clone job was ended.
errorobjectOutput only. Provides details for the errors that led to the Clone Job's state. (id: Status)
statestringOutput only. State of the clone job.
stateTimestring (google-datetime)Output only. The time the state was last updated.
stepsarrayOutput only. The clone steps list representing its progress.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, sourcesId, migratingVmsId, cloneJobsIdGets details of a single CloneJob.
listselectprojectsId, locationsId, sourcesId, migratingVmsIdpageSize, pageToken, filter, orderByLists the CloneJobs of a migrating VM. Only 25 most recent CloneJobs are listed.
createinsertprojectsId, locationsId, sourcesId, migratingVmsIdcloneJobId, requestIdInitiates a Clone of a specific migrating VM.
cancelexecprojectsId, locationsId, sourcesId, migratingVmsId, cloneJobsIdInitiates the cancellation of a running clone job.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
cloneJobsIdstring
locationsIdstring
migratingVmsIdstring
projectsIdstring
sourcesIdstring
cloneJobIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring

SELECT examples

Gets details of a single CloneJob.

SELECT
name,
computeEngineDisksTargetDetails,
computeEngineTargetDetails,
createTime,
endTime,
error,
state,
stateTime,
steps
FROM google.vmmigration.clone_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND sourcesId = '{{ sourcesId }}' -- required
AND migratingVmsId = '{{ migratingVmsId }}' -- required
AND cloneJobsId = '{{ cloneJobsId }}' -- required;

INSERT examples

Initiates a Clone of a specific migrating VM.

INSERT INTO google.vmmigration.clone_jobs (
projectsId,
locationsId,
sourcesId,
migratingVmsId,
cloneJobId,
requestId
)
SELECT
'{{ projectsId }}',
'{{ locationsId }}',
'{{ sourcesId }}',
'{{ migratingVmsId }}',
'{{ cloneJobId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

Lifecycle Methods

Initiates the cancellation of a running clone job.

EXEC google.vmmigration.clone_jobs.cancel 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@sourcesId='{{ sourcesId }}' --required,
@migratingVmsId='{{ migratingVmsId }}' --required,
@cloneJobsId='{{ cloneJobsId }}' --required;