forked from silvermine/dynamodb-capacity-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
49 lines (41 loc) · 1.65 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
'use strict';
var _ = require('underscore'),
DEFAULT_RESOURCE_CONFIG;
DEFAULT_RESOURCE_CONFIG = {
AbsoluteMinimumProvisioned: 1,
AbsoluteMaximumProvisioned: 10,
MinutesOfStatsToRetrieve: 20,
MinutesOfStatsToIgnore: 2,
MinutesToForecast: 5,
PreferredForecastPadding: [
{ IfGreaterThan: 0, IfLessThanOrEqual: 30, Percentage: 100 },
{ IfGreaterThan: 30, IfLessThanOrEqual: 100, Percentage: 50 },
{ IfGreaterThan: 100, IfLessThanOrEqual: 1000, Percentage: 25 },
{ IfGreaterThan: 1000, IfLessThanOrEqual: 1000000, Percentage: 15 },
],
MinimumMinutesBetweenIncreases: 0,
MaximumIncreaseAmount: [
{ IfGreaterThan: 0, IfLessThanOrEqual: 10, Percentage: 100 },
{ IfGreaterThan: 10, IfLessThanOrEqual: 100, Percentage: 50 },
{ IfGreaterThan: 100, IfLessThanOrEqual: 1000, Percentage: 20 },
],
MinimumMinutesBetweenDecreases: 45,
MinimumDecreaseAmount: [
{ IfGreaterThan: 0, IfLessThanOrEqual: 100, Percentage: 50 },
{ IfGreaterThan: 100, IfLessThanOrEqual: 1000000, Percentage: 30 },
],
MinimumMinutesBeforeDecreaseAfterIncrease: 15,
MaximumDecreasesToUsePerDay: 4,
};
module.exports = {
READ: 'ReadCapacityUnits',
WRITE: 'WriteCapacityUnits',
DEFAULT_RESOURCE_CONFIG: DEFAULT_RESOURCE_CONFIG,
makeResourceName: function makeResourceName(tableName, indexName) {
return tableName + (indexName ? ('::' + indexName) : '');
},
};
/* eslint-disable global-require */
_.extend(module.exports, { Builder: require('./Builder') });
_.extend(module.exports, require('./resource-listers/all'));
/* eslint-enable global-require */ // eslint-disable-line lines-around-comment