list_intent_metrics
async
¶
list_intent_metrics(
bot_id: Id,
start_date_time: Timestamp,
end_date_time: Timestamp,
metrics: AnalyticsIntentMetrics,
*,
config_overrides: Optional[AsyncLexModelsV2ClientConfig] = None,
bin_by: Optional[AnalyticsBinByList] = None,
group_by: Optional[AnalyticsIntentGroupByList] = None,
filters: Optional[AnalyticsIntentFilters] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[NextToken] = None,
) -> ListIntentMetricsResponse
Retrieves summary metrics for the intents in your bot. The following fields are required:
-
metrics– A list of AnalyticsIntentMetric objects. In each object, use thenamefield to specify the metric to calculate, thestatisticfield to specify whether to calculate theSum,Average, orMaxnumber, and theorderfield to specify whether to sort the results inAscendingorDescendingorder. -
startDateTimeandendDateTime– Define a time range for which you want to retrieve results.
Of the optional fields, you can organize the results in the following ways:
-
Use the
filtersfield to filter the results, thegroupByfield to specify categories by which to group the results, and thebinByfield to specify time intervals by which to group the results. -
Use the
maxResultsfield to limit the number of results to return in a single response and thenextTokenfield to return the next batch of results if the response does not return the full set of results.
Note that an order field exists in both binBy and metrics. You can specify only one order in a given request.
Parameters:
-
bot_id(Id) –The identifier for the bot for which you want to retrieve intent metrics.
-
start_date_time(Timestamp) –The timestamp that marks the beginning of the range of time for which you want to see intent metrics.
-
end_date_time(Timestamp) –The date and time that marks the end of the range of time for which you want to see intent metrics.
-
metrics(AnalyticsIntentMetrics) –A list of objects, each of which contains a metric you want to list, the statistic for the metric you want to return, and the order by which to organize the results.
-
bin_by(Optional[AnalyticsBinByList], default:None) –A list of objects, each of which contains specifications for organizing the results by time.
-
group_by(Optional[AnalyticsIntentGroupByList], default:None) –A list of objects, each of which specifies how to group the results. You can group by the following criteria:
-
IntentName– The name of the intent. -
IntentEndState– The final state of the intent. The possible end states are detailed in Key definitions in the user guide.
-
-
filters(Optional[AnalyticsIntentFilters], default:None) –A list of objects, each of which describes a condition by which you want to filter the results.
-
max_results(Optional[MaxResults], default:None) –The maximum number of results to return in each page of results. If there are fewer results than the maximum page size, only the actual number of results are returned.
-
next_token(Optional[NextToken], default:None) –If the response from the ListIntentMetrics operation contains more results than specified in the maxResults parameter, a token is returned in the response.
Use the returned token in the nextToken parameter of a ListIntentMetrics request to return the next page of results. For a complete set of results, call the ListIntentMetrics operation until the nextToken returned in the response is null.
Raises:
-
InternalServerException–The service encountered an unexpected condition. Try your request again.
-
PreconditionFailedException–Your request couldn't be completed because one or more request fields aren't valid. Check the fields in your request and try again.
-
ServiceQuotaExceededException–You have reached a quota for your bot.
-
ThrottlingException–Your request rate is too high. Reduce the frequency of requests.
-
ValidationException–One of the input parameters in your request isn't valid. Check the parameters and try your request again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_lex_models_v2/_services/async_lex_models_v2.py
5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 | |