AssociateGatewayToServerCommand

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

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { BackupGatewayClient, AssociateGatewayToServerCommand } from "@aws-sdk/client-backup-gateway"; // ES Modules import
// const { BackupGatewayClient, AssociateGatewayToServerCommand } = require("@aws-sdk/client-backup-gateway"); // CommonJS import
const client = new BackupGatewayClient(config);
const input = { // AssociateGatewayToServerInput
  GatewayArn: "STRING_VALUE", // required
  ServerArn: "STRING_VALUE", // required
};
const command = new AssociateGatewayToServerCommand(input);
const response = await client.send(command);
// { // AssociateGatewayToServerOutput
//   GatewayArn: "STRING_VALUE",
// };

AssociateGatewayToServerCommand Input

Parameter
Type
Description
GatewayArn
Required
string | undefined

The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and Amazon Web Services Region.

ServerArn
Required
string | undefined

The Amazon Resource Name (ARN) of the server that hosts your virtual machines.

AssociateGatewayToServerCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
GatewayArn
string | undefined

The Amazon Resource Name (ARN) of a gateway.

Throws

Name
Fault
Details
ConflictException
client

The operation cannot proceed because it is not supported.

InternalServerException
server

The operation did not succeed because an internal error occurred. Try again later.

ThrottlingException
client

TPS has been limited to protect against intentional or unintentional high request volumes.

ValidationException
client

The operation did not succeed because a validation error occurred.

BackupGatewayServiceException
Base exception class for all service exceptions from BackupGateway service.