acceptReservedNodeExchange method

Future<AcceptReservedNodeExchangeOutputMessage> acceptReservedNodeExchange({
  1. required String reservedNodeId,
  2. required String targetReservedNodeOfferingId,
})

Exchanges a DC1 Reserved Node for a DC2 Reserved Node with no changes to the configuration (term, payment type, or number of nodes) and no additional costs.

May throw ReservedNodeNotFoundFault. May throw InvalidReservedNodeStateFault. May throw ReservedNodeAlreadyMigratedFault. May throw ReservedNodeOfferingNotFoundFault. May throw UnsupportedOperationFault. May throw DependentServiceUnavailableFault. May throw ReservedNodeAlreadyExistsFault.

Parameter reservedNodeId : A string representing the node identifier of the DC1 Reserved Node to be exchanged.

Parameter targetReservedNodeOfferingId : The unique identifier of the DC2 Reserved Node offering to be used for the exchange. You can obtain the value for the parameter by calling GetReservedNodeExchangeOfferings

Implementation

Future<AcceptReservedNodeExchangeOutputMessage> acceptReservedNodeExchange({
  required String reservedNodeId,
  required String targetReservedNodeOfferingId,
}) async {
  ArgumentError.checkNotNull(reservedNodeId, 'reservedNodeId');
  _s.validateStringLength(
    'reservedNodeId',
    reservedNodeId,
    0,
    2147483647,
    isRequired: true,
  );
  ArgumentError.checkNotNull(
      targetReservedNodeOfferingId, 'targetReservedNodeOfferingId');
  _s.validateStringLength(
    'targetReservedNodeOfferingId',
    targetReservedNodeOfferingId,
    0,
    2147483647,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['ReservedNodeId'] = reservedNodeId;
  $request['TargetReservedNodeOfferingId'] = targetReservedNodeOfferingId;
  final $result = await _protocol.send(
    $request,
    action: 'AcceptReservedNodeExchange',
    version: '2012-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['AcceptReservedNodeExchangeInputMessage'],
    shapes: shapes,
    resultWrapper: 'AcceptReservedNodeExchangeResult',
  );
  return AcceptReservedNodeExchangeOutputMessage.fromXml($result);
}