Lists applications based on a set of parameters.
Parameters:
-
next_token
(Optional[NextToken], default:
None
)
–
The token for the next set of application results.
-
max_results
(Optional[int], default:
None
)
–
The maximum number of applications that can be listed.
-
states
(Optional[ApplicationStateSet], default:
None
)
–
An optional filter for application states. Note that if this filter contains multiple states, the resulting list will be grouped by the state.
Raises:
Source code in docs_src/capo_emr_serverless/_services/emr_serverless.py
| def list_applications(
self,
*,
config_overrides: Optional[EMRServerlessClientConfig] = None,
next_token: Optional["capo_emr_serverless.types.next_token.NextToken"] = None,
max_results: Optional[int] = None,
states: Optional[
"capo_emr_serverless.types.application_state_set.ApplicationStateSet"
] = None,
) -> (
"capo_emr_serverless.types.list_applications_response.ListApplicationsResponse"
):
"""<p>Lists applications based on a set of parameters.</p>
Args:
next_token: <p>The token for the next set of application results.</p>
max_results: <p>The maximum number of applications that can be listed.</p>
states: <p>An optional filter for application states. Note that if this filter contains multiple states, the resulting list will be grouped by the state.</p>
Raises:
capo_emr_serverless.errors.internal_server_exception.InternalServerException: <p>Request processing failed because of an error or failure with the service.</p>
capo_emr_serverless.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_emr_serverless.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_emr_serverless.types.list_applications_request.ListApplicationsRequest]",
) -> OperationResponse[
"capo_emr_serverless.types.list_applications_response.ListApplicationsResponse"
]:
import capo_emr_serverless._operations.aws_toledo_web_service.list_applications
output, http_response = (
capo_emr_serverless._operations.aws_toledo_web_service.list_applications.list_applications(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListApplications")
)
input_: capo_emr_serverless.types.list_applications_request.ListApplicationsRequest = {}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
if states is not None:
input_["states"] = states
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|