associateGatewayToServer method
Associates a backup gateway with your server. After you complete the association process, you can back up and restore your VMs through the gateway.
May throw ConflictException.
Parameter gatewayArn :
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.
Parameter serverArn :
The Amazon Resource Name (ARN) of the server that hosts your virtual
machines.
Implementation
Future<AssociateGatewayToServerOutput> associateGatewayToServer({
required String gatewayArn,
required String serverArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'BackupOnPremises_v20210101.AssociateGatewayToServer'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'GatewayArn': gatewayArn,
'ServerArn': serverArn,
},
);
return AssociateGatewayToServerOutput.fromJson(jsonResponse.body);
}