deleteUsagePlanKey method

Future<void> deleteUsagePlanKey({
  1. required String keyId,
  2. required String usagePlanId,
})

Deletes a usage plan key and remove the underlying API key from the associated usage plan.

May throw BadRequestException. May throw ConflictException. May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter keyId : Required The Id of the UsagePlanKey resource to be deleted.

Parameter usagePlanId : Required The Id of the UsagePlan resource representing the usage plan containing the to-be-deleted UsagePlanKey resource representing a plan customer.

Implementation

Future<void> deleteUsagePlanKey({
  required String keyId,
  required String usagePlanId,
}) async {
  ArgumentError.checkNotNull(keyId, 'keyId');
  ArgumentError.checkNotNull(usagePlanId, 'usagePlanId');
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/usageplans/${Uri.encodeComponent(usagePlanId)}/keys/${Uri.encodeComponent(keyId)}',
    exceptionFnMap: _exceptionFns,
  );
}