Service - User Resource Use: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
(Created page with "= Overview = Records resource use allocated to each user, this can be used to bill users according to their resource use, eg after free limits have been exceeded. = Repository = https://bitbucket.org/izara-core-user-accounts/izara-core-user-accounts-user-resource-use = DynamoDB tables = == Standard Config Table Per Service == === Configuration tags === <syntaxhighlight lang="JavaScript"> { configKey: "UserAccountBalanceServiceName" configTag: "UserAccountBal...")
(No difference)

Revision as of 13:38, 18 January 2023

Overview

Records resource use allocated to each user, this can be used to bill users according to their resource use, eg after free limits have been exceeded.

Repository

https://bitbucket.org/izara-core-user-accounts/izara-core-user-accounts-user-resource-use

DynamoDB tables

Standard Config Table Per Service

Configuration tags

{
	configKey: "UserAccountBalanceServiceName"
	configTag: "UserAccountBalanceServiceName"
	configValue: xxx // eg: "AccBalance"
}

ResourceUse

{
	userIdResource: xxx
	useTime: xxx
	details: xxx
}
  • partition key: userIdResource
  • sort key: useTime
  • userIdResource: userId + "_" + "resourceTag"
  • useTime: {timestamp of use}_{uniqueRequestId}, add uniqueRequestId to ensure each record is unique
  • details: an object with additional information about the resource use, eg what Lambda function, query, etc..
  • resourceTag: Lambda/Dynamo/Neo4j/etc..

.. some way of recording resourceUse need to add to Account Balance...

Working documents

User Resource Use