rebootNode method

Future<RebootNodeResponse> rebootNode({
  1. required String clusterName,
  2. required String nodeId,
})

Reboots a single node of a DAX cluster. The reboot action takes place as soon as possible. During the reboot, the node status is set to REBOOTING.

May throw ClusterNotFoundFault. May throw NodeNotFoundFault. May throw InvalidClusterStateFault. May throw ServiceLinkedRoleNotFoundFault. May throw InvalidParameterValueException. May throw InvalidParameterCombinationException.

Parameter clusterName : The name of the DAX cluster containing the node to be rebooted.

Parameter nodeId : The system-assigned ID of the node to be rebooted.

Implementation

Future<RebootNodeResponse> rebootNode({
  required String clusterName,
  required String nodeId,
}) async {
  ArgumentError.checkNotNull(clusterName, 'clusterName');
  ArgumentError.checkNotNull(nodeId, 'nodeId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDAXV3.RebootNode'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ClusterName': clusterName,
      'NodeId': nodeId,
    },
  );

  return RebootNodeResponse.fromJson(jsonResponse.body);
}