You are now viewing Migrate to Virtual Machines (formerly Migrate for Compute Engine). For Migrate for Compute Engine versions 4.x, see the 4.x documentation.

Method: projects.locations.sources.fetchInventory

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

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.

HTTP request

GET https://vmmigration.googleapis.com/v1alpha1/{source=projects/*/locations/*/sources/*}:fetchInventory

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
source

string

Required. The name of the Source.

Authorization requires the following IAM permission on the specified resource source:

  • vmmigration.sources.get

Query parameters

Parameters
forceRefresh

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.

pageSize

integer

The maximum number of VMs to return. The service may return fewer than this value. For AWS source: If unspecified, at most 500 VMs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. For VMWare source: If unspecified, all VMs will be returned. There is no limit for maximum value.

pageToken

string

A page token, received from a previous sources.fetchInventory call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to sources.fetchInventory must match the call that provided the page token.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Response message for fetchInventory.

JSON representation
{
  "updateTime": string,
  "nextPageToken": string,

  // Union field SourceVms can be only one of the following:
  "vmwareVms": {
    object (VmwareVmsDetails)
  },
  "awsVms": {
    object (AwsVmsDetails)
  }
  // End of list of possible types for union field SourceVms.
}
Fields
updateTime

string (Timestamp format)

Output only. The timestamp when the source was last queried (if the result is from the cache).

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

nextPageToken

string

Output only. A token, which can be sent as pageToken to retrieve the next page. If this field is omitted, there are no subsequent pages.

Union field SourceVms.

SourceVms can be only one of the following:

vmwareVms

object (VmwareVmsDetails)

The description of the VMs in a Source of type Vmware.

awsVms

object (AwsVmsDetails)

The description of the VMs in a Source of type AWS.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

VmwareVmsDetails

VmwareVmsDetails describes VMs in vCenter.

JSON representation
{
  "details": [
    {
      object (VmwareVmDetails)
    }
  ]
}
Fields
details[]

object (VmwareVmDetails)

The details of the vmware VMs.

AwsVmsDetails

AWSVmsDetails describes VMs in AWS.

JSON representation
{
  "details": [
    {
      object (AwsVmDetails)
    }
  ]
}
Fields
details[]

object (AwsVmDetails)

The details of the AWS VMs.

AwsVmDetails

AwsVmDetails describes a VM in AWS.

JSON representation
{
  "vmId": string,
  "displayName": string,
  "sourceId": string,
  "sourceDescription": string,
  "powerState": enum (PowerState),
  "cpuCount": integer,
  "memoryMb": integer,
  "diskCount": integer,
  "committedStorageMb": string,
  "osDescription": string,
  "bootOption": enum (BootOption),
  "instanceType": string,
  "vpcId": string,
  "securityGroups": [
    {
      object (AwsSecurityGroup)
    }
  ],
  "tags": {
    string: string,
    ...
  },
  "zone": string
}
Fields
vmId

string

The VM ID in AWS.

displayName

string

The display name of the VM. Note that this value is not necessarily unique.

sourceId

string

The id of the AWS's source this VM is connected to.

sourceDescription

string

The descriptive name of the AWS's source this VM is connected to.

powerState

enum (PowerState)

Output only. The power state of the VM at the moment list was taken.

cpuCount

integer

The number of cpus the VM has.

memoryMb

integer

The memory size of the VM in MB.

diskCount

integer

The number of disks the VM has.

committedStorageMb

string (int64 format)

The total size of the storage allocated to the VM in MB.

osDescription

string

The VM's OS.

bootOption

enum (BootOption)

The VM Boot Option.

instanceType

string

The instance type of the VM.

vpcId

string

The VPC ID the VM belongs to.

securityGroups[]

object (AwsSecurityGroup)

The security groups the VM belongs to.

tags

map (key: string, value: string)

The tags of the VM.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

zone

string

The AWS zone of the VM.

PowerState

Possible values for the power state of the VM.

Enums
POWER_STATE_UNSPECIFIED Power state is not specified.
ON The VM is turned on.
OFF The VM is turned off.
SUSPENDED The VM is suspended. This is similar to hibernation or sleep mode.
PENDING The VM is starting.

BootOption

The possible values for the vm boot option.

Enums
BOOT_OPTION_UNSPECIFIED The boot option is unknown.
EFI The boot option is UEFI.
BIOS The boot option is LEGACY-BIOS.

AwsSecurityGroup

AwsSecurityGroup describes a security group of an AWS VM.

JSON representation
{
  "id": string,
  "name": string
}
Fields
id

string

The AWS security group id.

name

string

The AWS security group name.