'Delete a Client Key
Delete a client key.
:pparam string organization_slug: the slug of the organization the
client keys belong to.
:pparam string project_slug: the slug of the project the client keys
belong to.
:pparam string key_id: the ID of the key to delete.
:auth: required'

@attach_scenarios([delete_key_scenario])
def delete(self, request, project, key_id):

    try:
        key = ProjectKey.objects.get(project=project, public_key=key_id, roles=ProjectKey.roles.store)
    except ProjectKey.DoesNotExist:
        raise ResourceDoesNotExist
    self.create_audit_entry(request=request, organization=project.organization, target_object=key.id, event=AuditLogEntryEvent.PROJECTKEY_REMOVE, data=key.get_audit_log_data())
    key.delete()
    return Response(status=204)
