Gets a list of sentiment detection jobs that you have submitted.
Parameters:
-
filter
(Optional[SentimentDetectionJobFilter], default:
None
)
–
Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
-
next_token
(Optional[String], default:
None
)
–
Identifies the next page of results to return.
-
max_results
(Optional[MaxResultsInteger], default:
None
)
–
The maximum number of results to return in each page. The default is 100.
Raises:
Source code in docs_src/capo_comprehend/_services/async_comprehend.py
| async def list_sentiment_detection_jobs(
self,
*,
config_overrides: Optional[AsyncComprehendClientConfig] = None,
filter: Optional[
"capo_comprehend.types.sentiment_detection_job_filter.SentimentDetectionJobFilter"
] = None,
next_token: Optional["capo_comprehend.types.string.String"] = None,
max_results: Optional[
"capo_comprehend.types.max_results_integer.MaxResultsInteger"
] = None,
) -> "capo_comprehend.types.list_sentiment_detection_jobs_response.ListSentimentDetectionJobsResponse":
"""<p>Gets a list of sentiment detection jobs that you have submitted.</p>
Args:
filter: <p>Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.</p>
next_token: <p>Identifies the next page of results to return.</p>
max_results: <p>The maximum number of results to return in each page. The default is 100.</p>
Raises:
capo_comprehend.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
capo_comprehend.errors.invalid_filter_exception.InvalidFilterException: <p>The filter specified for the operation is invalid. Specify a different filter.</p>
capo_comprehend.errors.invalid_request_exception.InvalidRequestException: <p>The request is invalid.</p>
capo_comprehend.errors.too_many_requests_exception.TooManyRequestsException: <p>The number of requests exceeds the limit. Resubmit your request later.</p>
capo_comprehend.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_comprehend.types.list_sentiment_detection_jobs_request.ListSentimentDetectionJobsRequest]",
) -> AsyncOperationResponse[
"capo_comprehend.types.list_sentiment_detection_jobs_response.ListSentimentDetectionJobsResponse"
]:
import capo_comprehend._operations.comprehend_20171127.list_sentiment_detection_jobs
(
output,
http_response,
) = await capo_comprehend._operations.comprehend_20171127.list_sentiment_detection_jobs.async_list_sentiment_detection_jobs(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListSentimentDetectionJobs")
)
input_: capo_comprehend.types.list_sentiment_detection_jobs_request.ListSentimentDetectionJobsRequest = {}
if filter is not None:
input_["filter"] = filter
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|