def METHOD_NAME(self, request, project_id, cluster_id, ns_name, name):
    username = request.user.username
    namespace_dict = self.check_namespace_use_perm(request, project_id, [ns_name])
    namespace_id = namespace_dict.get(ns_name)
    try:
        utils.delete_hpa(request, project_id, cluster_id, ns_name, namespace_id, name)
    except DeleteResourceError as error:
        message = "删除HPA:{}失败, [命名空间:{}], {}".format(name, ns_name, error)
        utils.activity_log(project_id, username, name, message, False)
        raise error_codes.APIError(message)
    message = "删除HPA:{}成功, [命名空间:{}]".format(name, ns_name)
    utils.activity_log(project_id, username, name, message, True)
    return Response({})