---
title: "POST /#X-Amz-Target=BackupOnPremises_v20210101.GetVirtualMachine"
method: POST
path: "/#X-Amz-Target=BackupOnPremises_v20210101.GetVirtualMachine"
---

# POST /#X-Amz-Target=BackupOnPremises_v20210101.GetVirtualMachine

`POST /#X-Amz-Target=BackupOnPremises_v20210101.GetVirtualMachine`

By providing the ARN (Amazon Resource Name), this API returns the virtual machine.

## Headers

- `X-Amz-Target` 'BackupOnPremises_v20210101.GetVirtualMachine', required

## Request body

- GetVirtualMachineInput
  - `ResourceArn` string, required — The Amazon Resource Name (ARN) of the virtual machine.

## Response `200`

Success

- GetVirtualMachineOutput
  - `VirtualMachine` object — This object contains the basic attributes of <code>VirtualMachine</code> contained by the output of <code>GetVirtualMachine</code>
    - `HostName` string — The host name of the virtual machine.
    - `HypervisorId` string — The ID of the virtual machine's hypervisor.
    - `Name` string — The name of the virtual machine.
    - `Path` string — The path of the virtual machine.
    - `ResourceArn` string — The Amazon Resource Name (ARN) of the virtual machine. For example, <code>arn:aws:backup-gateway:us-west-1:0000000000000:vm/vm-0000ABCDEFGIJKL</code>.
    - `LastBackupDate` string, date-time — The most recent date a virtual machine was backed up, in Unix format and UTC time.
    - `VmwareTags` VmwareTag[] — These are the details of the VMware tags associated with the specified virtual machine.
      - `VmwareCategory` string — The is the category of VMware.
      - `VmwareTagName` string — This is the user-defined name of a VMware tag.
      - `VmwareTagDescription` string — This is a user-defined description of a VMware tag.

## Other responses

- `480` — ValidationException
- `481` — InternalServerException
- `482` — ResourceNotFoundException
- `483` — ThrottlingException

---

[API](https://skmtc.net/aws/apis/backup-gateway.md) · [All operations](https://skmtc.net/aws/apis/backup-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/backup-gateway/revisions/5f9c8ce5c0f7/schema)
