def list_runs(
self,
arn: "capo_device_farm.types.amazon_resource_name.AmazonResourceName",
*,
config_overrides: Optional[DeviceFarmClientConfig] = None,
next_token: Optional[
"capo_device_farm.types.pagination_token.PaginationToken"
] = None,
) -> "capo_device_farm.types.list_runs_result.ListRunsResult":
"""<p>Gets information about runs, given an AWS Device Farm project ARN.</p>
Args:
arn: <p>The Amazon Resource Name (ARN) of the project for which you want to list runs.</p>
next_token: <p>An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.</p>
Raises:
capo_device_farm.errors.argument_exception.ArgumentException: <p>An invalid argument was specified.</p>
capo_device_farm.errors.limit_exceeded_exception.LimitExceededException: <p>A limit was exceeded.</p>
capo_device_farm.errors.not_found_exception.NotFoundException: <p>The specified entity was not found.</p>
capo_device_farm.errors.service_account_exception.ServiceAccountException: <p>There was a problem with the service account.</p>
capo_device_farm.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_device_farm.types.list_runs_request.ListRunsRequest]",
) -> OperationResponse[
"capo_device_farm.types.list_runs_result.ListRunsResult"
]:
import capo_device_farm._operations.device_farm_20150623.list_runs
output, http_response = (
capo_device_farm._operations.device_farm_20150623.list_runs.list_runs(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_device_farm.types.list_runs_result.ListRunsResult",
) -> dict[str, Any]:
import capo_device_farm.types.list_runs_result
return capo_device_farm.types.list_runs_result.redact_sensitive(output)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListRuns", redact_output=_redact_output)
)
input_: capo_device_farm.types.list_runs_request.ListRunsRequest = {"arn": arn}
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output