VM Migration Service v1
Package
@google-cloud/vmmigrationConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of VmMigrationClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
auth: gax.GoogleAuth;
descriptors
descriptors: Descriptors;
iamClient
iamClient: IamClient;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
locationsClient
locationsClient: LocationsClient;
operationsClient
operationsClient: gax.OperationsClient;
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
port
static get port(): number;
The port for this API service.
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;
The DNS address for this API service.
vmMigrationStub
vmMigrationStub?: Promise<{
[name: string]: Function;
}>;
warn
warn: (code: string, message: string, warnType?: string) => void;
Methods
addGroupMigration(request, options)
addGroupMigration(request?: protos.google.cloud.vmmigration.v1.IAddGroupMigrationRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.vmmigration.v1.IAddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Adds a MigratingVm to a Group.
Parameters | |
---|---|
Name | Description |
request |
IAddGroupMigrationRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.vmmigration.v1.IAddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The full path name of the Group to add to.
*/
// const group = 'abc123'
/**
* The full path name of the MigratingVm to add.
*/
// const migratingVm = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callAddGroupMigration() {
// Construct request
const request = {
group,
};
// Run request
const [operation] = await vmmigrationClient.addGroupMigration(request);
const [response] = await operation.promise();
console.log(response);
}
callAddGroupMigration();
addGroupMigration(request, options, callback)
addGroupMigration(request: protos.google.cloud.vmmigration.v1.IAddGroupMigrationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IAddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IAddGroupMigrationRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.IAddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
addGroupMigration(request, callback)
addGroupMigration(request: protos.google.cloud.vmmigration.v1.IAddGroupMigrationRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IAddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IAddGroupMigrationRequest
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.IAddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
cancelCloneJob(request, options)
cancelCloneJob(request?: protos.google.cloud.vmmigration.v1.ICancelCloneJobRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.vmmigration.v1.ICancelCloneJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Initiates the cancellation of a running clone job.
Parameters | |
---|---|
Name | Description |
request |
ICancelCloneJobRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.vmmigration.v1.ICancelCloneJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The clone job id
*/
// const name = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCancelCloneJob() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await vmmigrationClient.cancelCloneJob(request);
const [response] = await operation.promise();
console.log(response);
}
callCancelCloneJob();
cancelCloneJob(request, options, callback)
cancelCloneJob(request: protos.google.cloud.vmmigration.v1.ICancelCloneJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCloneJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICancelCloneJobRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCloneJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
cancelCloneJob(request, callback)
cancelCloneJob(request: protos.google.cloud.vmmigration.v1.ICancelCloneJobRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCloneJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICancelCloneJobRequest
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCloneJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
cancelCutoverJob(request, options)
cancelCutoverJob(request?: protos.google.cloud.vmmigration.v1.ICancelCutoverJobRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.vmmigration.v1.ICancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Initiates the cancellation of a running cutover job.
Parameters | |
---|---|
Name | Description |
request |
ICancelCutoverJobRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.vmmigration.v1.ICancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The cutover job id
*/
// const name = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCancelCutoverJob() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await vmmigrationClient.cancelCutoverJob(request);
const [response] = await operation.promise();
console.log(response);
}
callCancelCutoverJob();
cancelCutoverJob(request, options, callback)
cancelCutoverJob(request: protos.google.cloud.vmmigration.v1.ICancelCutoverJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICancelCutoverJobRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
cancelCutoverJob(request, callback)
cancelCutoverJob(request: protos.google.cloud.vmmigration.v1.ICancelCutoverJobRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICancelCutoverJobRequest
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
cancelOperation(request, options, callback)
cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED
.
Parameters | |
---|---|
Name | Description |
request |
CancelOperationRequest
The request object that will be sent. |
options |
CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<protos.google.protobuf.Empty> |
const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});
checkAddGroupMigrationProgress(name)
checkAddGroupMigrationProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.AddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by addGroupMigration()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.AddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The full path name of the Group to add to.
*/
// const group = 'abc123'
/**
* The full path name of the MigratingVm to add.
*/
// const migratingVm = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callAddGroupMigration() {
// Construct request
const request = {
group,
};
// Run request
const [operation] = await vmmigrationClient.addGroupMigration(request);
const [response] = await operation.promise();
console.log(response);
}
callAddGroupMigration();
checkCancelCloneJobProgress(name)
checkCancelCloneJobProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.CancelCloneJobResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by cancelCloneJob()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.CancelCloneJobResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The clone job id
*/
// const name = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCancelCloneJob() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await vmmigrationClient.cancelCloneJob(request);
const [response] = await operation.promise();
console.log(response);
}
callCancelCloneJob();
checkCancelCutoverJobProgress(name)
checkCancelCutoverJobProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.CancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by cancelCutoverJob()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.CancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The cutover job id
*/
// const name = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCancelCutoverJob() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await vmmigrationClient.cancelCutoverJob(request);
const [response] = await operation.promise();
console.log(response);
}
callCancelCutoverJob();
checkCreateCloneJobProgress(name)
checkCreateCloneJobProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.CloneJob, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by createCloneJob()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.CloneJob, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Clone's parent.
*/
// const parent = 'abc123'
/**
* Required. The clone job identifier.
*/
// const cloneJobId = 'abc123'
/**
* Required. The clone request body.
*/
// const cloneJob = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateCloneJob() {
// Construct request
const request = {
parent,
cloneJobId,
cloneJob,
};
// Run request
const [operation] = await vmmigrationClient.createCloneJob(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateCloneJob();
checkCreateCutoverJobProgress(name)
checkCreateCutoverJobProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.CutoverJob, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by createCutoverJob()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.CutoverJob, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Cutover's parent.
*/
// const parent = 'abc123'
/**
* Required. The cutover job identifier.
*/
// const cutoverJobId = 'abc123'
/**
* Required. The cutover request body.
*/
// const cutoverJob = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateCutoverJob() {
// Construct request
const request = {
parent,
cutoverJobId,
cutoverJob,
};
// Run request
const [operation] = await vmmigrationClient.createCutoverJob(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateCutoverJob();
checkCreateDatacenterConnectorProgress(name)
checkCreateDatacenterConnectorProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.DatacenterConnector, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by createDatacenterConnector()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.DatacenterConnector, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const parent = 'abc123'
/**
* Required. The datacenterConnector identifier.
*/
// const datacenterConnectorId = 'abc123'
/**
* Required. The create request body.
*/
// const datacenterConnector = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateDatacenterConnector() {
// Construct request
const request = {
parent,
datacenterConnectorId,
datacenterConnector,
};
// Run request
const [operation] = await vmmigrationClient.createDatacenterConnector(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateDatacenterConnector();
checkCreateGroupProgress(name)
checkCreateGroupProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.Group, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by createGroup()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.Group, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Group's parent.
*/
// const parent = 'abc123'
/**
* Required. The group identifier.
*/
// const groupId = 'abc123'
/**
* Required. The create request body.
*/
// const group = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateGroup() {
// Construct request
const request = {
parent,
groupId,
group,
};
// Run request
const [operation] = await vmmigrationClient.createGroup(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateGroup();
checkCreateMigratingVmProgress(name)
checkCreateMigratingVmProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.MigratingVm, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by createMigratingVm()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.MigratingVm, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The MigratingVm's parent.
*/
// const parent = 'abc123'
/**
* Required. The migratingVm identifier.
*/
// const migratingVmId = 'abc123'
/**
* Required. The create request body.
*/
// const migratingVm = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateMigratingVm() {
// Construct request
const request = {
parent,
migratingVmId,
migratingVm,
};
// Run request
const [operation] = await vmmigrationClient.createMigratingVm(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateMigratingVm();
checkCreateSourceProgress(name)
checkCreateSourceProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.Source, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by createSource()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.Source, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Source's parent.
*/
// const parent = 'abc123'
/**
* Required. The source identifier.
*/
// const sourceId = 'abc123'
/**
* Required. The create request body.
*/
// const source = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateSource() {
// Construct request
const request = {
parent,
sourceId,
source,
};
// Run request
const [operation] = await vmmigrationClient.createSource(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateSource();
checkCreateTargetProjectProgress(name)
checkCreateTargetProjectProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.TargetProject, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by createTargetProject()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.TargetProject, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The TargetProject's parent.
*/
// const parent = 'abc123'
/**
* Required. The target_project identifier.
*/
// const targetProjectId = 'abc123'
/**
* Required. The create request body.
*/
// const targetProject = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateTargetProject() {
// Construct request
const request = {
parent,
targetProjectId,
targetProject,
};
// Run request
const [operation] = await vmmigrationClient.createTargetProject(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateTargetProject();
checkCreateUtilizationReportProgress(name)
checkCreateUtilizationReportProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.UtilizationReport, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by createUtilizationReport()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.UtilizationReport, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Utilization Report's parent.
*/
// const parent = 'abc123'
/**
* Required. The report to create.
*/
// const utilizationReport = {}
/**
* 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][0-9]-/. It must start with an english letter and must not
* end with a hyphen.
*/
// const utilizationReportId = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateUtilizationReport() {
// Construct request
const request = {
parent,
utilizationReport,
utilizationReportId,
};
// Run request
const [operation] = await vmmigrationClient.createUtilizationReport(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateUtilizationReport();
checkDeleteDatacenterConnectorProgress(name)
checkDeleteDatacenterConnectorProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by deleteDatacenterConnector()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The DatacenterConnector name.
*/
// const name = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callDeleteDatacenterConnector() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await vmmigrationClient.deleteDatacenterConnector(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteDatacenterConnector();
checkDeleteGroupProgress(name)
checkDeleteGroupProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by deleteGroup()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Group name.
*/
// const name = 'abc123'
/**
* Optional. A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callDeleteGroup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await vmmigrationClient.deleteGroup(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteGroup();
checkDeleteMigratingVmProgress(name)
checkDeleteMigratingVmProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by deleteMigratingVm()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the MigratingVm.
*/
// const name = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callDeleteMigratingVm() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await vmmigrationClient.deleteMigratingVm(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteMigratingVm();
checkDeleteSourceProgress(name)
checkDeleteSourceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by deleteSource()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Source name.
*/
// const name = 'abc123'
/**
* Optional. A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callDeleteSource() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await vmmigrationClient.deleteSource(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteSource();
checkDeleteTargetProjectProgress(name)
checkDeleteTargetProjectProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by deleteTargetProject()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The TargetProject name.
*/
// const name = 'abc123'
/**
* Optional. A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callDeleteTargetProject() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await vmmigrationClient.deleteTargetProject(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteTargetProject();
checkDeleteUtilizationReportProgress(name)
checkDeleteUtilizationReportProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by deleteUtilizationReport()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Utilization Report name.
*/
// const name = 'abc123'
/**
* Optional. A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callDeleteUtilizationReport() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await vmmigrationClient.deleteUtilizationReport(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteUtilizationReport();
checkFinalizeMigrationProgress(name)
checkFinalizeMigrationProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.FinalizeMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by finalizeMigration()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.FinalizeMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the MigratingVm.
*/
// const migratingVm = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callFinalizeMigration() {
// Construct request
const request = {
migratingVm,
};
// Run request
const [operation] = await vmmigrationClient.finalizeMigration(request);
const [response] = await operation.promise();
console.log(response);
}
callFinalizeMigration();
checkPauseMigrationProgress(name)
checkPauseMigrationProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.PauseMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by pauseMigration()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.PauseMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the MigratingVm.
*/
// const migratingVm = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callPauseMigration() {
// Construct request
const request = {
migratingVm,
};
// Run request
const [operation] = await vmmigrationClient.pauseMigration(request);
const [response] = await operation.promise();
console.log(response);
}
callPauseMigration();
checkRemoveGroupMigrationProgress(name)
checkRemoveGroupMigrationProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.RemoveGroupMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by removeGroupMigration()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.RemoveGroupMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the Group.
*/
// const group = 'abc123'
/**
* The MigratingVm to remove.
*/
// const migratingVm = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callRemoveGroupMigration() {
// Construct request
const request = {
group,
};
// Run request
const [operation] = await vmmigrationClient.removeGroupMigration(request);
const [response] = await operation.promise();
console.log(response);
}
callRemoveGroupMigration();
checkResumeMigrationProgress(name)
checkResumeMigrationProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.ResumeMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by resumeMigration()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.ResumeMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the MigratingVm.
*/
// const migratingVm = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callResumeMigration() {
// Construct request
const request = {
migratingVm,
};
// Run request
const [operation] = await vmmigrationClient.resumeMigration(request);
const [response] = await operation.promise();
console.log(response);
}
callResumeMigration();
checkStartMigrationProgress(name)
checkStartMigrationProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.StartMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by startMigration()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.StartMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the MigratingVm.
*/
// const migratingVm = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callStartMigration() {
// Construct request
const request = {
migratingVm,
};
// Run request
const [operation] = await vmmigrationClient.startMigration(request);
const [response] = await operation.promise();
console.log(response);
}
callStartMigration();
checkUpdateGroupProgress(name)
checkUpdateGroupProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.Group, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by updateGroup()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.Group, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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.
*/
// const updateMask = {}
/**
* Required. The update request body.
*/
// const group = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callUpdateGroup() {
// Construct request
const request = {
group,
};
// Run request
const [operation] = await vmmigrationClient.updateGroup(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateGroup();
checkUpdateMigratingVmProgress(name)
checkUpdateMigratingVmProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.MigratingVm, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by updateMigratingVm()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.MigratingVm, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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.
*/
// const updateMask = {}
/**
* Required. The update request body.
*/
// const migratingVm = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callUpdateMigratingVm() {
// Construct request
const request = {
migratingVm,
};
// Run request
const [operation] = await vmmigrationClient.updateMigratingVm(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateMigratingVm();
checkUpdateSourceProgress(name)
checkUpdateSourceProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.Source, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by updateSource()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.Source, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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.
*/
// const updateMask = {}
/**
* Required. The update request body.
*/
// const source = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callUpdateSource() {
// Construct request
const request = {
source,
};
// Run request
const [operation] = await vmmigrationClient.updateSource(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateSource();
checkUpdateTargetProjectProgress(name)
checkUpdateTargetProjectProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.TargetProject, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by updateTargetProject()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.TargetProject, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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.
*/
// const updateMask = {}
/**
* Required. The update request body.
*/
// const targetProject = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callUpdateTargetProject() {
// Construct request
const request = {
targetProject,
};
// Run request
const [operation] = await vmmigrationClient.updateTargetProject(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateTargetProject();
checkUpgradeApplianceProgress(name)
checkUpgradeApplianceProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.UpgradeApplianceResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;
Check the status of the long running operation returned by upgradeAppliance()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.vmmigration.v1.UpgradeApplianceResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The DatacenterConnector name.
*/
// const datacenterConnector = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callUpgradeAppliance() {
// Construct request
const request = {
datacenterConnector,
};
// Run request
const [operation] = await vmmigrationClient.upgradeAppliance(request);
const [response] = await operation.promise();
console.log(response);
}
callUpgradeAppliance();
cloneJobPath(project, location, source, migratingVm, cloneJob)
cloneJobPath(project: string, location: string, source: string, migratingVm: string, cloneJob: string): string;
Return a fully-qualified cloneJob resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
source |
string
|
migratingVm |
string
|
cloneJob |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
close()
close(): Promise<void>;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns | |
---|---|
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed. |
createCloneJob(request, options)
createCloneJob(request?: protos.google.cloud.vmmigration.v1.ICreateCloneJobRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Initiates a Clone of a specific migrating VM.
Parameters | |
---|---|
Name | Description |
request |
ICreateCloneJobRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Clone's parent.
*/
// const parent = 'abc123'
/**
* Required. The clone job identifier.
*/
// const cloneJobId = 'abc123'
/**
* Required. The clone request body.
*/
// const cloneJob = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateCloneJob() {
// Construct request
const request = {
parent,
cloneJobId,
cloneJob,
};
// Run request
const [operation] = await vmmigrationClient.createCloneJob(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateCloneJob();
createCloneJob(request, options, callback)
createCloneJob(request: protos.google.cloud.vmmigration.v1.ICreateCloneJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateCloneJobRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createCloneJob(request, callback)
createCloneJob(request: protos.google.cloud.vmmigration.v1.ICreateCloneJobRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateCloneJobRequest
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createCutoverJob(request, options)
createCutoverJob(request?: protos.google.cloud.vmmigration.v1.ICreateCutoverJobRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
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.
Parameters | |
---|---|
Name | Description |
request |
ICreateCutoverJobRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Cutover's parent.
*/
// const parent = 'abc123'
/**
* Required. The cutover job identifier.
*/
// const cutoverJobId = 'abc123'
/**
* Required. The cutover request body.
*/
// const cutoverJob = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateCutoverJob() {
// Construct request
const request = {
parent,
cutoverJobId,
cutoverJob,
};
// Run request
const [operation] = await vmmigrationClient.createCutoverJob(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateCutoverJob();
createCutoverJob(request, options, callback)
createCutoverJob(request: protos.google.cloud.vmmigration.v1.ICreateCutoverJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateCutoverJobRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createCutoverJob(request, callback)
createCutoverJob(request: protos.google.cloud.vmmigration.v1.ICreateCutoverJobRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateCutoverJobRequest
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createDatacenterConnector(request, options)
createDatacenterConnector(request?: protos.google.cloud.vmmigration.v1.ICreateDatacenterConnectorRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a new DatacenterConnector in a given Source.
Parameters | |
---|---|
Name | Description |
request |
ICreateDatacenterConnectorRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const parent = 'abc123'
/**
* Required. The datacenterConnector identifier.
*/
// const datacenterConnectorId = 'abc123'
/**
* Required. The create request body.
*/
// const datacenterConnector = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateDatacenterConnector() {
// Construct request
const request = {
parent,
datacenterConnectorId,
datacenterConnector,
};
// Run request
const [operation] = await vmmigrationClient.createDatacenterConnector(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateDatacenterConnector();
createDatacenterConnector(request, options, callback)
createDatacenterConnector(request: protos.google.cloud.vmmigration.v1.ICreateDatacenterConnectorRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateDatacenterConnectorRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createDatacenterConnector(request, callback)
createDatacenterConnector(request: protos.google.cloud.vmmigration.v1.ICreateDatacenterConnectorRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateDatacenterConnectorRequest
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createGroup(request, options)
createGroup(request?: protos.google.cloud.vmmigration.v1.ICreateGroupRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a new Group in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
ICreateGroupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Group's parent.
*/
// const parent = 'abc123'
/**
* Required. The group identifier.
*/
// const groupId = 'abc123'
/**
* Required. The create request body.
*/
// const group = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateGroup() {
// Construct request
const request = {
parent,
groupId,
group,
};
// Run request
const [operation] = await vmmigrationClient.createGroup(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateGroup();
createGroup(request, options, callback)
createGroup(request: protos.google.cloud.vmmigration.v1.ICreateGroupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateGroupRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createGroup(request, callback)
createGroup(request: protos.google.cloud.vmmigration.v1.ICreateGroupRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateGroupRequest
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createMigratingVm(request, options)
createMigratingVm(request?: protos.google.cloud.vmmigration.v1.ICreateMigratingVmRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a new MigratingVm in a given Source.
Parameters | |
---|---|
Name | Description |
request |
ICreateMigratingVmRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The MigratingVm's parent.
*/
// const parent = 'abc123'
/**
* Required. The migratingVm identifier.
*/
// const migratingVmId = 'abc123'
/**
* Required. The create request body.
*/
// const migratingVm = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateMigratingVm() {
// Construct request
const request = {
parent,
migratingVmId,
migratingVm,
};
// Run request
const [operation] = await vmmigrationClient.createMigratingVm(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateMigratingVm();
createMigratingVm(request, options, callback)
createMigratingVm(request: protos.google.cloud.vmmigration.v1.ICreateMigratingVmRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateMigratingVmRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createMigratingVm(request, callback)
createMigratingVm(request: protos.google.cloud.vmmigration.v1.ICreateMigratingVmRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateMigratingVmRequest
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createSource(request, options)
createSource(request?: protos.google.cloud.vmmigration.v1.ICreateSourceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a new Source in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
ICreateSourceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Source's parent.
*/
// const parent = 'abc123'
/**
* Required. The source identifier.
*/
// const sourceId = 'abc123'
/**
* Required. The create request body.
*/
// const source = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateSource() {
// Construct request
const request = {
parent,
sourceId,
source,
};
// Run request
const [operation] = await vmmigrationClient.createSource(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateSource();
createSource(request, options, callback)
createSource(request: protos.google.cloud.vmmigration.v1.ICreateSourceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateSourceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createSource(request, callback)
createSource(request: protos.google.cloud.vmmigration.v1.ICreateSourceRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateSourceRequest
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createTargetProject(request, options)
createTargetProject(request?: protos.google.cloud.vmmigration.v1.ICreateTargetProjectRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a new TargetProject in a given project.
NOTE: TargetProject is a global resource; hence the only supported value for location is global
.
Parameters | |
---|---|
Name | Description |
request |
ICreateTargetProjectRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The TargetProject's parent.
*/
// const parent = 'abc123'
/**
* Required. The target_project identifier.
*/
// const targetProjectId = 'abc123'
/**
* Required. The create request body.
*/
// const targetProject = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateTargetProject() {
// Construct request
const request = {
parent,
targetProjectId,
targetProject,
};
// Run request
const [operation] = await vmmigrationClient.createTargetProject(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateTargetProject();
createTargetProject(request, options, callback)
createTargetProject(request: protos.google.cloud.vmmigration.v1.ICreateTargetProjectRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateTargetProjectRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createTargetProject(request, callback)
createTargetProject(request: protos.google.cloud.vmmigration.v1.ICreateTargetProjectRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateTargetProjectRequest
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createUtilizationReport(request, options)
createUtilizationReport(request?: protos.google.cloud.vmmigration.v1.ICreateUtilizationReportRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a new UtilizationReport.
Parameters | |
---|---|
Name | Description |
request |
ICreateUtilizationReportRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Utilization Report's parent.
*/
// const parent = 'abc123'
/**
* Required. The report to create.
*/
// const utilizationReport = {}
/**
* 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][0-9]-/. It must start with an english letter and must not
* end with a hyphen.
*/
// const utilizationReportId = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Vmmigration library
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
// Instantiates a client
const vmmigrationClient = new VmMigrationClient();
async function callCreateUtilizationReport() {
// Construct request
const request = {
parent,
utilizationReport,
utilizationReportId,
};
// Run request
const [operation] = await vmmigrationClient.createUtilizationReport(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateUtilizationReport();
createUtilizationReport(request, options, callback)
createUtilizationReport(request: protos.google.cloud.vmmigration.v1.ICreateUtilizationReportRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateUtilizationReportRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createUtilizationReport(request, callback)
createUtilizationReport(request: protos.google.cloud.vmmigration.v1.ICreateUtilizationReportRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateUtilizationReportRequest
|
callback |
Callback<LROperation<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
cutoverJobPath(project, location, source, migratingVm, cutoverJob)
cutoverJobPath(project: string, location: string, source: string, migratingVm: string, cutoverJob: