Migrate for Compute Engine V1 API - Class Google::Cloud::VMMigration::V1::VMMigration::Client (v0.3.0)

Stay organized with collections Save and categorize content based on your preferences.

Reference documentation and code samples for the Migrate for Compute Engine V1 API class Google::Cloud::VMMigration::V1::VMMigration::Client.

Client for the VmMigration service.

VM Migration Service

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the VmMigration Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all VmMigration clients
::Google::Cloud::VMMigration::V1::VMMigration::Client.configure do |config|
  config.timeout = 10.0
end

#add_group_migration

def add_group_migration(request, options = nil) -> ::Gapic::Operation
def add_group_migration(group: nil, migrating_vm: nil) -> ::Gapic::Operation

Adds a MigratingVm to a Group.

Overloads
def add_group_migration(request, options = nil) -> ::Gapic::Operation
Pass arguments to add_group_migration via a request object, either of type AddGroupMigrationRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::AddGroupMigrationRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def add_group_migration(group: nil, migrating_vm: nil) -> ::Gapic::Operation
Pass arguments to add_group_migration via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • group (::String) — Required. The full path name of the Group to add to.
  • migrating_vm (::String) — The full path name of the MigratingVm to add.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::AddGroupMigrationRequest.new

# Call the add_group_migration method.
result = client.add_group_migration request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#cancel_clone_job

def cancel_clone_job(request, options = nil) -> ::Gapic::Operation
def cancel_clone_job(name: nil) -> ::Gapic::Operation

Initiates the cancellation of a running clone job.

Overloads
def cancel_clone_job(request, options = nil) -> ::Gapic::Operation
Pass arguments to cancel_clone_job via a request object, either of type CancelCloneJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::CancelCloneJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def cancel_clone_job(name: nil) -> ::Gapic::Operation
Pass arguments to cancel_clone_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The clone job id
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::CancelCloneJobRequest.new

# Call the cancel_clone_job method.
result = client.cancel_clone_job request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#cancel_cutover_job

def cancel_cutover_job(request, options = nil) -> ::Gapic::Operation
def cancel_cutover_job(name: nil) -> ::Gapic::Operation

Initiates the cancellation of a running cutover job.

Overloads
def cancel_cutover_job(request, options = nil) -> ::Gapic::Operation
Pass arguments to cancel_cutover_job via a request object, either of type CancelCutoverJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::CancelCutoverJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def cancel_cutover_job(name: nil) -> ::Gapic::Operation
Pass arguments to cancel_cutover_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The cutover job id
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::CancelCutoverJobRequest.new

# Call the cancel_cutover_job method.
result = client.cancel_cutover_job request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the VmMigration Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_clone_job

def create_clone_job(request, options = nil) -> ::Gapic::Operation
def create_clone_job(parent: nil, clone_job_id: nil, clone_job: nil, request_id: nil) -> ::Gapic::Operation

Initiates a Clone of a specific migrating VM.

Overloads
def create_clone_job(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_clone_job via a request object, either of type CreateCloneJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::CreateCloneJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_clone_job(parent: nil, clone_job_id: nil, clone_job: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_clone_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The Clone's parent.
  • clone_job_id (::String) — Required. The clone job identifier.
  • clone_job (::Google::Cloud::VMMigration::V1::CloneJob, ::Hash) — Required. The clone request body.
  • request_id (::String) — 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::CreateCloneJobRequest.new

# Call the create_clone_job method.
result = client.create_clone_job request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#create_cutover_job

def create_cutover_job(request, options = nil) -> ::Gapic::Operation
def create_cutover_job(parent: nil, cutover_job_id: nil, cutover_job: nil, request_id: nil) -> ::Gapic::Operation

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.

Overloads
def create_cutover_job(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_cutover_job via a request object, either of type CreateCutoverJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::CreateCutoverJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_cutover_job(parent: nil, cutover_job_id: nil, cutover_job: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_cutover_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The Cutover's parent.
  • cutover_job_id (::String) — Required. The cutover job identifier.
  • cutover_job (::Google::Cloud::VMMigration::V1::CutoverJob, ::Hash) — Required. The cutover request body.
  • request_id (::String) — 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::CreateCutoverJobRequest.new

# Call the create_cutover_job method.
result = client.create_cutover_job request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#create_datacenter_connector

def create_datacenter_connector(request, options = nil) -> ::Gapic::Operation
def create_datacenter_connector(parent: nil, datacenter_connector_id: nil, datacenter_connector: nil, request_id: nil) -> ::Gapic::Operation

Creates a new DatacenterConnector in a given Source.

Overloads
def create_datacenter_connector(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_datacenter_connector via a request object, either of type CreateDatacenterConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::CreateDatacenterConnectorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_datacenter_connector(parent: nil, datacenter_connector_id: nil, datacenter_connector: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_datacenter_connector via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The DatacenterConnector's parent. Required. The Source in where the new DatacenterConnector will be created. For example: projects/my-project/locations/us-central1/sources/my-source
  • datacenter_connector_id (::String) — Required. The datacenterConnector identifier.
  • datacenter_connector (::Google::Cloud::VMMigration::V1::DatacenterConnector, ::Hash) — Required. The create request body.
  • request_id (::String) — 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::CreateDatacenterConnectorRequest.new

# Call the create_datacenter_connector method.
result = client.create_datacenter_connector request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#create_group

def create_group(request, options = nil) -> ::Gapic::Operation
def create_group(parent: nil, group_id: nil, group: nil, request_id: nil) -> ::Gapic::Operation

Creates a new Group in a given project and location.

Overloads
def create_group(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_group via a request object, either of type CreateGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::CreateGroupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_group(parent: nil, group_id: nil, group: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The Group's parent.
  • group_id (::String) — Required. The group identifier.
  • group (::Google::Cloud::VMMigration::V1::Group, ::Hash) — Required. The create request body.
  • request_id (::String) — 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::CreateGroupRequest.new

# Call the create_group method.
result = client.create_group request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#create_migrating_vm

def create_migrating_vm(request, options = nil) -> ::Gapic::Operation
def create_migrating_vm(parent: nil, migrating_vm_id: nil, migrating_vm: nil, request_id: nil) -> ::Gapic::Operation

Creates a new MigratingVm in a given Source.

Overloads
def create_migrating_vm(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_migrating_vm via a request object, either of type CreateMigratingVmRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::CreateMigratingVmRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_migrating_vm(parent: nil, migrating_vm_id: nil, migrating_vm: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_migrating_vm via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The MigratingVm's parent.
  • migrating_vm_id (::String) — Required. The migratingVm identifier.
  • migrating_vm (::Google::Cloud::VMMigration::V1::MigratingVm, ::Hash) — Required. The create request body.
  • request_id (::String) — 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::CreateMigratingVmRequest.new

# Call the create_migrating_vm method.
result = client.create_migrating_vm request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#create_source

def create_source(request, options = nil) -> ::Gapic::Operation
def create_source(parent: nil, source_id: nil, source: nil, request_id: nil) -> ::Gapic::Operation

Creates a new Source in a given project and location.

Overloads
def create_source(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_source via a request object, either of type CreateSourceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::CreateSourceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_source(parent: nil, source_id: nil, source: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_source via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The Source's parent.
  • source_id (::String) — Required. The source identifier.
  • source (::Google::Cloud::VMMigration::V1::Source, ::Hash) — Required. The create request body.
  • request_id (::String) — 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::CreateSourceRequest.new

# Call the create_source method.
result = client.create_source request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#create_target_project

def create_target_project(request, options = nil) -> ::Gapic::Operation
def create_target_project(parent: nil, target_project_id: nil, target_project: nil, request_id: nil) -> ::Gapic::Operation

Creates a new TargetProject in a given project.

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

Overloads
def create_target_project(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_target_project via a request object, either of type CreateTargetProjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::CreateTargetProjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_target_project(parent: nil, target_project_id: nil, target_project: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_target_project via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The TargetProject's parent.
  • target_project_id (::String) — Required. The target_project identifier.
  • target_project (::Google::Cloud::VMMigration::V1::TargetProject, ::Hash) — Required. The create request body.
  • request_id (::String) — 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::CreateTargetProjectRequest.new

# Call the create_target_project method.
result = client.create_target_project request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#create_utilization_report

def create_utilization_report(request, options = nil) -> ::Gapic::Operation
def create_utilization_report(parent: nil, utilization_report: nil, utilization_report_id: nil, request_id: nil) -> ::Gapic::Operation

Creates a new UtilizationReport.

Overloads
def create_utilization_report(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_utilization_report via a request object, either of type CreateUtilizationReportRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::CreateUtilizationReportRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_utilization_report(parent: nil, utilization_report: nil, utilization_report_id: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_utilization_report via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The Utilization Report's parent.
  • utilization_report (::Google::Cloud::VMMigration::V1::UtilizationReport, ::Hash) — Required. The report to create.
  • utilization_report_id (::String) — Required. The ID to use for the report, which will become the final component of the reports's resource name.

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

  • request_id (::String) — 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::CreateUtilizationReportRequest.new

# Call the create_utilization_report method.
result = client.create_utilization_report request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_datacenter_connector

def delete_datacenter_connector(request, options = nil) -> ::Gapic::Operation
def delete_datacenter_connector(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single DatacenterConnector.

Overloads
def delete_datacenter_connector(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_datacenter_connector via a request object, either of type DeleteDatacenterConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::DeleteDatacenterConnectorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_datacenter_connector(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_datacenter_connector via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The DatacenterConnector name.
  • request_id (::String) — 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::DeleteDatacenterConnectorRequest.new

# Call the delete_datacenter_connector method.
result = client.delete_datacenter_connector request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_group

def delete_group(request, options = nil) -> ::Gapic::Operation
def delete_group(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single Group.

Overloads
def delete_group(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_group via a request object, either of type DeleteGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::DeleteGroupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_group(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The Group name.
  • request_id (::String) — 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::DeleteGroupRequest.new

# Call the delete_group method.
result = client.delete_group request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_migrating_vm

def delete_migrating_vm(request, options = nil) -> ::Gapic::Operation
def delete_migrating_vm(name: nil) -> ::Gapic::Operation

Deletes a single MigratingVm.

Overloads
def delete_migrating_vm(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_migrating_vm via a request object, either of type DeleteMigratingVmRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::DeleteMigratingVmRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_migrating_vm(name: nil) -> ::Gapic::Operation
Pass arguments to delete_migrating_vm via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the MigratingVm.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::DeleteMigratingVmRequest.new

# Call the delete_migrating_vm method.
result = client.delete_migrating_vm request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_source

def delete_source(request, options = nil) -> ::Gapic::Operation
def delete_source(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single Source.

Overloads
def delete_source(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_source via a request object, either of type DeleteSourceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::DeleteSourceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_source(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_source via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The Source name.
  • request_id (::String) — 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::DeleteSourceRequest.new

# Call the delete_source method.
result = client.delete_source request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_target_project

def delete_target_project(request, options = nil) -> ::Gapic::Operation
def delete_target_project(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single TargetProject.

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

Overloads
def delete_target_project(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_target_project via a request object, either of type DeleteTargetProjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::DeleteTargetProjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_target_project(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_target_project via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The TargetProject name.
  • request_id (::String) — 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::DeleteTargetProjectRequest.new

# Call the delete_target_project method.
result = client.delete_target_project request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_utilization_report

def delete_utilization_report(request, options = nil) -> ::Gapic::Operation
def delete_utilization_report(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single Utilization Report.

Overloads
def delete_utilization_report(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_utilization_report via a request object, either of type DeleteUtilizationReportRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::DeleteUtilizationReportRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_utilization_report(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_utilization_report via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The Utilization Report name.
  • request_id (::String) — 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::DeleteUtilizationReportRequest.new

# Call the delete_utilization_report method.
result = client.delete_utilization_report request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#fetch_inventory

def fetch_inventory(request, options = nil) -> ::Google::Cloud::VMMigration::V1::FetchInventoryResponse
def fetch_inventory(source: nil, force_refresh: nil) -> ::Google::Cloud::VMMigration::V1::FetchInventoryResponse

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

Overloads
def fetch_inventory(request, options = nil) -> ::Google::Cloud::VMMigration::V1::FetchInventoryResponse
Pass arguments to fetch_inventory via a request object, either of type FetchInventoryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::FetchInventoryRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def fetch_inventory(source: nil, force_refresh: nil) -> ::Google::Cloud::VMMigration::V1::FetchInventoryResponse
Pass arguments to fetch_inventory via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • source (::String) — Required. The name of the Source.
  • force_refresh (::Boolean) — If this flag is set to true, the source will be queried instead of using cached results. Using this flag will make the call slower.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::FetchInventoryRequest.new

# Call the fetch_inventory method.
result = client.fetch_inventory request

# The returned object is of type Google::Cloud::VMMigration::V1::FetchInventoryResponse.
p result

#finalize_migration

def finalize_migration(request, options = nil) -> ::Gapic::Operation
def finalize_migration(migrating_vm: nil) -> ::Gapic::Operation

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

Overloads
def finalize_migration(request, options = nil) -> ::Gapic::Operation
Pass arguments to finalize_migration via a request object, either of type FinalizeMigrationRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::FinalizeMigrationRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def finalize_migration(migrating_vm: nil) -> ::Gapic::Operation
Pass arguments to finalize_migration via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • migrating_vm (::String) — Required. The name of the MigratingVm.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::FinalizeMigrationRequest.new

# Call the finalize_migration method.
result = client.finalize_migration request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#get_clone_job

def get_clone_job(request, options = nil) -> ::Google::Cloud::VMMigration::V1::CloneJob
def get_clone_job(name: nil) -> ::Google::Cloud::VMMigration::V1::CloneJob

Gets details of a single CloneJob.

Overloads
def get_clone_job(request, options = nil) -> ::Google::Cloud::VMMigration::V1::CloneJob
Pass arguments to get_clone_job via a request object, either of type GetCloneJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::GetCloneJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_clone_job(name: nil) -> ::Google::Cloud::VMMigration::V1::CloneJob
Pass arguments to get_clone_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the CloneJob.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::GetCloneJobRequest.new

# Call the get_clone_job method.
result = client.get_clone_job request

# The returned object is of type Google::Cloud::VMMigration::V1::CloneJob.
p result

#get_cutover_job

def get_cutover_job(request, options = nil) -> ::Google::Cloud::VMMigration::V1::CutoverJob
def get_cutover_job(name: nil) -> ::Google::Cloud::VMMigration::V1::CutoverJob

Gets details of a single CutoverJob.

Overloads
def get_cutover_job(request, options = nil) -> ::Google::Cloud::VMMigration::V1::CutoverJob
Pass arguments to get_cutover_job via a request object, either of type GetCutoverJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::GetCutoverJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_cutover_job(name: nil) -> ::Google::Cloud::VMMigration::V1::CutoverJob
Pass arguments to get_cutover_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the CutoverJob.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::GetCutoverJobRequest.new

# Call the get_cutover_job method.
result = client.get_cutover_job request

# The returned object is of type Google::Cloud::VMMigration::V1::CutoverJob.
p result

#get_datacenter_connector

def get_datacenter_connector(request, options = nil) -> ::Google::Cloud::VMMigration::V1::DatacenterConnector
def get_datacenter_connector(name: nil) -> ::Google::Cloud::VMMigration::V1::DatacenterConnector

Gets details of a single DatacenterConnector.

Overloads
def get_datacenter_connector(request, options = nil) -> ::Google::Cloud::VMMigration::V1::DatacenterConnector
Pass arguments to get_datacenter_connector via a request object, either of type GetDatacenterConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::GetDatacenterConnectorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_datacenter_connector(name: nil) -> ::Google::Cloud::VMMigration::V1::DatacenterConnector
Pass arguments to get_datacenter_connector via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the DatacenterConnector.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::GetDatacenterConnectorRequest.new

# Call the get_datacenter_connector method.
result = client.get_datacenter_connector request

# The returned object is of type Google::Cloud::VMMigration::V1::DatacenterConnector.
p result

#get_group

def get_group(request, options = nil) -> ::Google::Cloud::VMMigration::V1::Group
def get_group(name: nil) -> ::Google::Cloud::VMMigration::V1::Group

Gets details of a single Group.

Overloads
def get_group(request, options = nil) -> ::Google::Cloud::VMMigration::V1::Group
Pass arguments to get_group via a request object, either of type GetGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::GetGroupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_group(name: nil) -> ::Google::Cloud::VMMigration::V1::Group
Pass arguments to get_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The group name.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::GetGroupRequest.new

# Call the get_group method.
result = client.get_group request

# The returned object is of type Google::Cloud::VMMigration::V1::Group.
p result

#get_migrating_vm

def get_migrating_vm(request, options = nil) -> ::Google::Cloud::VMMigration::V1::MigratingVm
def get_migrating_vm(name: nil, view: nil) -> ::Google::Cloud::VMMigration::V1::MigratingVm

Gets details of a single MigratingVm.

Overloads
def get_migrating_vm(request, options = nil) -> ::Google::Cloud::VMMigration::V1::MigratingVm
Pass arguments to get_migrating_vm via a request object, either of type GetMigratingVmRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::GetMigratingVmRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_migrating_vm(name: nil, view: nil) -> ::Google::Cloud::VMMigration::V1::MigratingVm
Pass arguments to get_migrating_vm via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::GetMigratingVmRequest.new

# Call the get_migrating_vm method.
result = client.get_migrating_vm request

# The returned object is of type Google::Cloud::VMMigration::V1::MigratingVm.
p result

#get_source

def get_source(request, options = nil) -> ::Google::Cloud::VMMigration::V1::Source
def get_source(name: nil) -> ::Google::Cloud::VMMigration::V1::Source

Gets details of a single Source.

Overloads
def get_source(request, options = nil) -> ::Google::Cloud::VMMigration::V1::Source
Pass arguments to get_source via a request object, either of type GetSourceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::GetSourceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_source(name: nil) -> ::Google::Cloud::VMMigration::V1::Source
Pass arguments to get_source via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The Source name.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::GetSourceRequest.new

# Call the get_source method.
result = client.get_source request

# The returned object is of type Google::Cloud::VMMigration::V1::Source.
p result

#get_target_project

def get_target_project(request, options = nil) -> ::Google::Cloud::VMMigration::V1::TargetProject
def get_target_project(name: nil) -> ::Google::Cloud::VMMigration::V1::TargetProject

Gets details of a single TargetProject.

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

Overloads
def get_target_project(request, options = nil) -> ::Google::Cloud::VMMigration::V1::TargetProject
Pass arguments to get_target_project via a request object, either of type GetTargetProjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::GetTargetProjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_target_project(name: nil) -> ::Google::Cloud::VMMigration::V1::TargetProject
Pass arguments to get_target_project via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The TargetProject name.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::GetTargetProjectRequest.new

# Call the get_target_project method.
result = client.get_target_project request

# The returned object is of type Google::Cloud::VMMigration::V1::TargetProject.
p result

#get_utilization_report

def get_utilization_report(request, options = nil) -> ::Google::Cloud::VMMigration::V1::UtilizationReport
def get_utilization_report(name: nil, view: nil) -> ::Google::Cloud::VMMigration::V1::UtilizationReport

Gets a single Utilization Report.

Overloads
def get_utilization_report(request, options = nil) -> ::Google::Cloud::VMMigration::V1::UtilizationReport
Pass arguments to get_utilization_report via a request object, either of type GetUtilizationReportRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VMMigration::V1::GetUtilizationReportRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_utilization_report(name: nil, view: nil) -> ::Google::Cloud::VMMigration::V1::UtilizationReport
Pass arguments to get_utilization_report via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/vm_migration/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VMMigration::V1::GetUtilizationReportRequest.new

# Call the get_utilization_report method.
result = client.get_utilization_report request

# The returned object is of type Google::Cloud::VMMigration::V1::UtilizationReport.
p result

#initialize

def initialize() { |config| ... } -> Client

Create a new VmMigration client object.

Yields
  • (config) — Configure the VmMigration client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::VMMigration::V1::VMMigration::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::VMMigration::V1::VMMigration::Client.new do |config|
  config.timeout = 10.0
end

#list_clone_jobs