getUsagePlanKeys method
Gets all the usage plan keys representing the API keys added to a specified usage plan.
May throw BadRequestException.
May throw NotFoundException.
May throw TooManyRequestsException.
May throw UnauthorizedException.
Parameter usagePlanId :
The Id of the UsagePlan resource representing the usage plan containing
the to-be-retrieved UsagePlanKey resource representing a plan customer.
Parameter limit :
The maximum number of returned results per page. The default value is 25
and the maximum value is 500.
Parameter nameQuery :
A query parameter specifying the name of the to-be-returned usage plan
keys.
Parameter position :
The current pagination position in the paged result set.
Implementation
Future<UsagePlanKeys> getUsagePlanKeys({
required String usagePlanId,
int? limit,
String? nameQuery,
String? position,
}) async {
final $query = <String, List<String>>{
if (limit != null) 'limit': [limit.toString()],
if (nameQuery != null) 'name': [nameQuery],
if (position != null) 'position': [position],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/usageplans/${Uri.encodeComponent(usagePlanId)}/keys',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return UsagePlanKeys.fromJson(response);
}