cURL
curl --request GET \ --url https://api.authiqa.com/parent/cost-analysis \ --header 'Authorization: <authorization>'
Calculate AWS DynamoDB operation costs for parent and child accounts
Hide Headers
curl -X GET https://api.authiqa.com/parent/cost-analysis \ -H "Authorization: Bearer YOUR_JWT_TOKEN"
{ "operationCounts": { "parent": { "emailConfirmation": 1, "resendConfirmation": 0, "resetPassword": 1, "updatePassword": 1, "signIn": 10, "organizationUpdate": 2, "organizationDetailsRetrieval": 5, "childAccountsListRetrieval": 8, "childAccounts": 2 }, "children": { "emailConfirmation": 2, "resendConfirmation": 1, "resetPassword": 1, "updatePassword": 1, "signIn": 15 }, "totalAccounts": 2, "totalOperationsCount": 50 }, "costs": { "baseCost": 0.000425, "margin": 0.00017, "total": 0.000595, "breakdown": { "emailConfirmation": 0.0001, "resendConfirmation": 0.00005, "resetPassword": 0.00005, "updatePassword": 0.00005, "signIn": 0.0001, "organizationUpdate": 0.00005, "organizationDetailsRetrieval": 0.00005, "childAccountsListRetrieval": 0.0001, "childAccounts": 0.00007, "costCalculator": 0.000005, "IOassociatedCost": 0.00045 } }, "balance": { "accountBalance": 3.00, "availableBalance": 2.999405, "currentCharges": 0.000595, "usagePercentage": 0.02, "lowBalanceAlert": false }, "currency": "USD" }
{ "emailConfirmation": { "reads": 2, "writes": 1 }, "resendConfirmation": { "reads": 1, "writes": 1 }, "resetPassword": { "reads": 1, "writes": 1 }, "updatePassword": { "reads": 1, "writes": 1 }, "childAccounts": { "reads": 2, "writes": 1 }, "signIn": { "reads": 2, "writes": 1 }, "organizationUpdate": { "reads": 1, "writes": 1 }, "organizationDetailsRetrieval": { "reads": 1, "writes": 1 }, "childAccountsListRetrieval": { "reads": 2, "writes": 1 } }
INSUFFICIENT_BALANCE
Base Cost
baseCost = (reads * READ_PRICE + writes * WRITE_PRICE) / 1000000
Margin
margin = baseCost * 0.40
Total
total = baseCost + margin