def api_model_exists(restApiId, modelName, region=None, key=None, keyid=None, profile=None):
 r = describe_api_model(restApiId, modelName, region=region, key=key, keyid=keyid, profile=profile)
 return {'exists': bool(r.get('model'))}

def api_model_exists ( restApiId , modelName , region = None , key = None , keyid = None , profile = None ) : r = describe_api_model ( restApiId , modelName , region = region , key = key , keyid = keyid , profile = profile ) return { 'exists' : bool ( r . get ( 'model' ) ) }
check to see if the given modelname exists in the given restapiid cli example: .