def update_api_model_schema(restApiId, modelName, schema, region=None, key=None, keyid=None, profile=None):
 try:
  schema_json = (json.dumps(schema) if isinstance(schema, dict) else schema)
  conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  response = _api_model_patch_replace(conn, restApiId, modelName, '/schema', schema_json)
  return {'updated': True, 'model': _convert_datetime_str(response)}
 except ClientError as e:
  return {'updated': False, 'error': salt.utils.boto3.get_error(e)}

def update_api_model_schema ( restApiId , modelName , schema , region = None , key = None , keyid = None , profile = None ) : try : schema_json = ( json . dumps ( schema ) if isinstance ( schema , dict ) else schema ) conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) response = _api_model_patch_replace ( conn , restApiId , modelName , '/schema' , schema_json ) return { 'updated' : True , 'model' : _convert_datetime_str ( response ) } except ClientError as e : return { 'updated' : False , 'error' : salt . utils . boto3 . get_error ( e ) }
update the schema for the given model in the given restapiid cli example: .