getUsagePlanKey method
Gets a usage plan key of a given key identifier.
May throw BadRequestException. May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException.
Parameter keyId
:
Required
The key Id of the to-be-retrieved UsagePlanKey resource
representing a plan customer.
Parameter usagePlanId
:
Required
The Id of the UsagePlan resource representing the usage
plan containing the to-be-retrieved UsagePlanKey resource
representing a plan customer.
Implementation
Future<UsagePlanKey> getUsagePlanKey({
required String keyId,
required String usagePlanId,
}) async {
ArgumentError.checkNotNull(keyId, 'keyId');
ArgumentError.checkNotNull(usagePlanId, 'usagePlanId');
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/usageplans/${Uri.encodeComponent(usagePlanId)}/keys/${Uri.encodeComponent(keyId)}',
exceptionFnMap: _exceptionFns,
);
return UsagePlanKey.fromJson(response);
}