list_intent_metrics
¶
list_intent_metrics(
bot_id: Id,
start_date_time: Timestamp,
end_date_time: Timestamp,
metrics: AnalyticsIntentMetrics,
*,
config_overrides: Optional[LexModelsV2ClientConfig] = 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/lex_models_v2.py
5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 | |