def set_api_params(module, module_params):
 api_params = dict()
 for param in module_params:
  module_param = module.params.get(param, None)
  if module_param:
   api_params[pc(param)] = module_param
 return api_params

def set_api_params ( module , module_params ) : api_params = dict ( ) for param in module_params : module_param = module . params . get ( param , None ) if module_param : api_params [ pc ( param ) ] = module_param return api_params
sets module parameters to those expected by the boto3 api .