def cluster_applications(self, state=None, final_status=None,<EOL>user=None, queue=None, limit=None,<EOL>started_time_begin=None, started_time_end=None,<EOL>finished_time_begin=None, finished_time_end=None):
path = '<STR_LIT>'<EOL>legal_states = set([s for s, _ in YarnApplicationState])<EOL>if state is not None and state not in legal_states:<EOL><INDENT>msg = '<STR_LIT>' % (state,)<EOL>raise IllegalArgumentError(msg)<EOL><DEDENT>legal_final_statuses = set([s for s, _ in FinalApplicationStatus])<EOL>if final_status is not None and final_status not in legal_final_statuses:<EOL><INDENT>msg = '<STR_LIT>' % (final_status,)<EOL>raise IllegalArgumentError(msg)<EOL><DEDENT>loc_args = (<EOL>('<STR_LIT:state>', state),<EOL>('<STR_LIT>', final_status),<EOL>('<STR_LIT:user>', user),<EOL>('<STR_LIT>', queue),<EOL>('<STR_LIT>', limit),<EOL>('<STR_LIT>', started_time_begin),<EOL>('<STR_LIT>', started_time_end),<EOL>('<STR_LIT>', finished_time_begin),<EOL>('<STR_LIT>', finished_time_end))<EOL>params = self.construct_parameters(loc_args)<EOL>return self.request(path, **params)<EOL>
With the Applications API, you can obtain a collection of resources,
each of which represents an application.

:param str state: state of the application
:param str final_status: the final status of the
    application - reported by the application itself
:param str user: user name
:param str queue: queue name
:param str limit: total number of app objects to be returned
:param str started_time_begin: applications with start time beginning
    with this time, specified in ms since epoch
:param str started_time_end: applications with start time ending with
    this time, specified in ms since epoch
:param str finished_time_begin: applications with finish time
    beginning with this time, specified in ms since epoch
:param str finished_time_end: applications with finish time ending
    with this time, specified in ms since epoch
:returns: API response object with JSON data
:rtype: :py:class:`yarn_api_client.base.Response`
:raises yarn_api_client.errors.IllegalArgumentError: if `state` or
    `final_status` incorrect