get_usage
¶
get_usage(
usage_plan_id: String,
start_date: String,
end_date: String,
*,
config_overrides: Optional[APIGatewayClientConfig] = 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/api_gateway.py
5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 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 | |