Method: projects.locations.sources.fetchInventory

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

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

Response message for fetchInventory.

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

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

  // Union field SourceVms can be only one of the following:
  "vmwareVms": {
    object (VmwareVmsDetails)
  },
  "awsVms": {
    object (AwsVmsDetails)
  },
  "azureVms": {
    object (AzureVmsDetails)
  }
  // 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.

azureVms

object (AzureVmsDetails)

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

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,
  "virtualizationType": enum (VmVirtualizationType),
  "architecture": enum (VmArchitecture)
}
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.

virtualizationType

enum (VmVirtualizationType)

The virtualization type.

architecture

enum (VmArchitecture)

The CPU architecture.

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.

VmVirtualizationType

Possible values for the virtualization types of the VM.

Enums
VM_VIRTUALIZATION_TYPE_UNSPECIFIED The virtualization type is unknown.
HVM The virtualziation type is HVM.
PARAVIRTUAL The virtualziation type is PARAVIRTUAL.

VmArchitecture

Possible values for the architectures of the VM.

Enums
VM_ARCHITECTURE_UNSPECIFIED The architecture is unknown.
I386 The architecture is I386.
X86_64 The architecture is X86_64.
ARM64 The architecture is ARM64.
X86_64_MAC The architecture is X86_64_MAC.

AzureVmsDetails

AzureVmsDetails describes VMs in Azure.

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

object (AzureVmDetails)

The details of the Azure VMs.

AzureVmDetails

AzureVmDetails describes a VM in Azure.

JSON representation
{
  "vmId": string,
  "powerState": enum (PowerState),
  "vmSize": string,
  "cpuCount": integer,
  "memoryMb": integer,
  "diskCount": integer,
  "committedStorageMb": string,
  "osDisk": {
    object (OSDisk)
  },
  "disks": [
    {
      object (Disk)
    }
  ],
  "osDescription": {
    object (OSDescription)
  },
  "bootOption": enum (BootOption),
  "tags": {
    string: string,
    ...
  },
  "computerName": string
}
Fields
vmId

string

The VM full path in Azure.

powerState

enum (PowerState)

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

vmSize

string

VM size as configured in Azure. Determines the VM's hardware spec.

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, including OS disk.

committedStorageMb

string (int64 format)

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

osDisk

object (OSDisk)

Description of the OS disk.

disks[]

object (Disk)

Description of the data disks.

osDescription

object (OSDescription)

Description of the OS.

bootOption

enum (BootOption)

The VM Boot Option.

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" }.

computerName

string

The VM's ComputerName.

PowerState

Possible values for the power state of the VM.

Enums
POWER_STATE_UNSPECIFIED Power state is not specified.
STARTING The VM is starting.
RUNNING The VM is running.
STOPPING The VM is stopping.
STOPPED The VM is stopped.
DEALLOCATING The VM is deallocating.
DEALLOCATED The VM is deallocated.
UNKNOWN The VM's power state is unknown.

OSDisk

A message describing the OS disk.

JSON representation
{
  "type": string,
  "name": string,
  "sizeGb": integer
}
Fields
type

string

The disk's type.

name

string

The disk's full name.

sizeGb

integer

The disk's size in GB.

Disk

A message describing a data disk.

JSON representation
{
  "name": string,
  "sizeGb": integer,
  "lun": integer
}
Fields
name

string

The disk name.

sizeGb

integer

The disk size in GB.

lun

integer

The disk's Logical Unit Number (LUN).

OSDescription

A message describing the VM's OS. Including OS, Publisher, Offer and Plan if applicable.

JSON representation
{
  "type": string,
  "publisher": string,
  "offer": string,
  "plan": string
}
Fields
type

string

OS type.

publisher

string

OS publisher.

offer

string

OS offer.

plan

string

OS plan.

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 BIOS.