---
title: "GET /v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}:fetchInventory"
method: GET
path: "/v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}:fetchInventory"
tags: ["projects"]
---

# GET /v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}:fetchInventory

`GET /v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}:fetchInventory`

## Request

- Base URL: `https://vmmigration.googleapis.com`
- URL: `https://vmmigration.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}:fetchInventory`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/cloud-platform`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

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.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required
- `sourcesId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string
- `forceRefresh` boolean
- `pageSize` integer
- `pageToken` string

## Response `200`

Successful response

- FetchInventoryResponse: Response message for fetchInventory.
  - `awsVms` AwsVmsDetails: AWSVmsDetails describes VMs in AWS.
    - `details` AwsVmDetails[]: The details of the AWS VMs.
      - `architecture` 'VM_ARCHITECTURE_UNSPECIFIED' | 'I386' | 'X86_64' | 'ARM64' | 'X86_64_MAC': The CPU architecture.
      - `bootOption` 'BOOT_OPTION_UNSPECIFIED' | 'EFI' | 'BIOS': The VM Boot Option.
      - `committedStorageMb` string, int64: The total size of the storage allocated to the VM in MB.
      - `cpuCount` integer: The number of CPU cores the VM has.
      - `diskCount` integer: The number of disks the VM has.
      - `displayName` string: The display name of the VM. Note that this value is not necessarily unique.
      - `instanceType` string: The instance type of the VM.
      - `memoryMb` integer: The memory size of the VM in MB.
      - `osDescription` string: The VM's OS.
      - `powerState` 'POWER_STATE_UNSPECIFIED' | 'ON' | 'OFF' | 'SUSPENDED' | 'PENDING': Output only. The power state of the VM at the moment list was taken.
      - `securityGroups` AwsSecurityGroup[]: The security groups the VM belongs to.
        - `id` string: The AWS security group id.
        - `name` string: The AWS security group name.
      - `sourceDescription` string: The descriptive name of the AWS's source this VM is connected to.
      - `sourceId` string: The id of the AWS's source this VM is connected to.
      - `tags` object: The tags of the VM.
      - `vcpuCount` integer: The number of vCPUs the VM has. It is calculated as the number of CPU cores * threads per CPU the VM has.
      - `virtualizationType` 'VM_VIRTUALIZATION_TYPE_UNSPECIFIED' | 'HVM' | 'PARAVIRTUAL': The virtualization type.
      - `vmId` string: The VM ID in AWS.
      - `vpcId` string: The VPC ID the VM belongs to.
      - `zone` string: The AWS zone of the VM.
  - `azureVms` AzureVmsDetails: AzureVmsDetails describes VMs in Azure.
    - `details` AzureVmDetails[]: The details of the Azure VMs.
      - `architecture` 'VM_ARCHITECTURE_UNSPECIFIED' | 'VM_ARCHITECTURE_X86_FAMILY' | 'VM_ARCHITECTURE_ARM64': The CPU architecture.
      - `bootOption` 'BOOT_OPTION_UNSPECIFIED' | 'EFI' | 'BIOS': The VM Boot Option.
      - `committedStorageMb` string, int64: The total size of the storage allocated to the VM in MB.
      - `computerName` string: The VM's ComputerName.
      - `cpuCount` integer: The number of cpus the VM has.
      - `diskCount` integer: The number of disks the VM has, including OS disk.
      - `disks` Disk[]: Description of the data disks.
        - `lun` integer: The disk's Logical Unit Number (LUN).
        - `name` string: The disk name.
        - `sizeGb` integer: The disk size in GB.
      - `memoryMb` integer: The memory size of the VM in MB.
      - `osDescription` OSDescription: A message describing the VM's OS. Including OS, Publisher, Offer and Plan if applicable.
        - `offer` string: OS offer.
        - `plan` string: OS plan.
        - `publisher` string: OS publisher.
        - `type` string: OS type.
      - `osDisk` OSDisk: A message describing the OS disk.
        - `name` string: The disk's full name.
        - `sizeGb` integer: The disk's size in GB.
        - `type` string: The disk's type.
      - `powerState` 'POWER_STATE_UNSPECIFIED' | 'STARTING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'DEALLOCATING' | 'DEALLOCATED' | 'UNKNOWN': The power state of the VM at the moment list was taken.
      - `tags` object: The tags of the VM.
      - `vmId` string: The VM full path in Azure.
      - `vmSize` string: VM size as configured in Azure. Determines the VM's hardware spec.
  - `nextPageToken` string: Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
  - `updateTime` string, google-datetime: Output only. The timestamp when the source was last queried (if the result is from the cache).
  - `vmwareVms` VmwareVmsDetails: VmwareVmsDetails describes VMs in vCenter.
    - `details` VmwareVmDetails[]: The details of the vmware VMs.
      - `architecture` 'VM_ARCHITECTURE_UNSPECIFIED' | 'VM_ARCHITECTURE_X86_FAMILY' | 'VM_ARCHITECTURE_ARM64': Output only. The CPU architecture.
      - `bootOption` 'BOOT_OPTION_UNSPECIFIED' | 'EFI' | 'BIOS': Output only. The VM Boot Option.
      - `committedStorageMb` string, int64: The total size of the storage allocated to the VM in MB.
      - `cpuCount` integer: The number of cpus in the VM.
      - `datacenterDescription` string: The descriptive name of the vCenter's datacenter this VM is contained in.
      - `datacenterId` string: The id of the vCenter's datacenter this VM is contained in.
      - `diskCount` integer: The number of disks the VM has.
      - `displayName` string: The display name of the VM. Note that this is not necessarily unique.
      - `guestDescription` string: The VM's OS. See for example https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html for types of strings this might hold.
      - `memoryMb` integer: The size of the memory of the VM in MB.
      - `powerState` 'POWER_STATE_UNSPECIFIED' | 'ON' | 'OFF' | 'SUSPENDED': The power state of the VM at the moment list was taken.
      - `uuid` string: The unique identifier of the VM in vCenter.
      - `vmId` string: The VM's id in the source (note that this is not the MigratingVm's id). This is the moref id of the VM.

---

[API](https://skmtc.dev/google/apis/vmmigration.md) - [All operations](https://skmtc.dev/google/apis/vmmigration/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/vmmigration/revisions/dc534bc294f6?raw)
