get_usage
async
¶
get_usage(
usage_plan_id: String,
start_date: String,
end_date: String,
*,
config_overrides: Optional[AsyncAPIGatewayClientConfig] = None,
key_id: Optional[String] = None,
position: Optional[String] = None,
limit: Optional[NullableInteger] = None,
) -> Usage
Gets the usage data of a usage plan in a specified time interval.
Parameters:
-
usage_plan_id(String) –The Id of the usage plan associated with the usage data.
-
key_id(Optional[String], default:None) –The Id of the API key associated with the resultant usage data.
-
start_date(String) –The starting date (e.g., 2016-01-01) of the usage data.
-
end_date(String) –The ending date (e.g., 2016-12-31) of the usage data.
-
position(Optional[String], default:None) –The current pagination position in the paged result set.
-
limit(Optional[NullableInteger], default:None) –The maximum number of returned results per page. The default value is 25 and the maximum value is 500.
Raises:
-
BadRequestException–The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.
-
NotFoundException–The requested resource is not found. Make sure that the request URI is correct.
-
TooManyRequestsException–The request has reached its throttling limit. Retry after the specified time period.
-
UnauthorizedException–The request is denied because the caller has insufficient permissions.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_api_gateway/_services/async_api_gateway.py
5305 5306 5307 5308 5309 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 | |