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

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

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

Associates a backup gateway with your server. After you complete the association process, you can back up and restore your VMs through the gateway.

## Headers

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

## Request body

- AssociateGatewayToServerInput
  - `GatewayArn` string, required — The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.
  - `ServerArn` string, required — The Amazon Resource Name (ARN) of the server that hosts your virtual machines.

## Response `200`

Success

- AssociateGatewayToServerOutput
  - `GatewayArn` string — The Amazon Resource Name (ARN) of a gateway.

## Other responses

- `480` — ValidationException
- `481` — ConflictException
- `482` — InternalServerException
- `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/versions/5f9c8ce5c0f7/schema)
