code: public static ActionResult perform(
              ActionContext context,
              ActionModel action,
              AmazonWebServiceRequest request,
              ResultCapture<Object> extractor,
              Object token) {
  
          try {
  
              Method method = findClientMethod(
                      context.getClient(), action.getRequest().getMethod());
  
              request = generateRequest(
                      context,
                      method.getParameterTypes()[0],
                      action.getRequest(),
                      request,
                      token);
  
              Object clientResult = method.invoke(context.getClient(), request);
  
              if (extractor != null) {
                  Map<String, String> responseMetadata =
                          getResponseMetadata(context, request);
  
                  extractor.setResponseMetadata(responseMetadata);
                  extractor.setClientResult(clientResult);
              }
  
              ResponseModel responseModel = action.getResponse();
  
              Object data = null;
              List<ResourceImpl> resources = null;
              Object nextToken = null;
  
              if (responseModel != null) {
                  if (responseModel.getDataMapping() != null) {
                      data = getResultAttributes(
                          responseModel.getDataMapping().getSource(),
                          clientResult);
  
                  } else if (responseModel.getResourceMapping() != null) {
                      resources = getResultResources(
                          context,
                          responseModel.getResourceMapping(),
                          request,
                          clientResult);
  
                  } else {
                      data = clientResult;
                  }
  
                  if (responseModel.getNextTokenPath() != null) {
                      nextToken = ReflectionUtils.getByPath(
                          clientResult, responseModel.getNextTokenPath());
                  }
              }
  
              return new ActionResult(data, resources, nextToken);
  
          } catch (IllegalAccessException | InstantiationException exception) {
              throw new IllegalStateException("BOOM", exception);
  
          } catch (InvocationTargetException exception) {
              if (exception.getCause() instanceof RuntimeException) {
                  throw (RuntimeException) exception.getCause();
              }
              throw new IllegalStateException("BOOM", exception);
          }
      }
docs: Performs the given action passing the given parameters.
  
  @param context the context on which this action is being called
  @param action the model of the action to perform
  @param request the client-supplied request object
  @param token the pagination token for the action
  @param extractor a result extractor object
  @return the result of the action